Stream: git-wasmtime

Topic: wasmtime / issue #7669 Annotate guest profiler stack fram...


view this post on Zulip Wasmtime GitHub notifications bot (Dec 09 2023 at 01:24):

jameysharp added the wasmtime label to Issue #7669.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 09 2023 at 01:24):

jameysharp added the enhancement label to Issue #7669.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 09 2023 at 01:24):

jameysharp opened issue #7669:

Feature

So far usually a guest has consisted of only one core WebAssembly module, but with the component model on its way, that's changing. For each stack frame in a profile, the guest profiler should indicate which module that frame's function came from. If the same module is instantiated multiple times, ideally the profile would also report which instance was running.

Benefit

In multi-module guests, seeing only a function name is confusing. Including the module identity will help the user understand which part of their code is running.

Implementation

I'm not sure how to identify a module in a human-meaningful way. I'm not sure if modules have useful names inside components, or how to find those names if they exist. Similarly I don't think instances have an identity that we can find while stack-walking or that means anything to the user; I believe this is an open issue for our core-dump support as well.

Alternatives

We could continue to make the user guess which module each frame is from. In many cases probably the important function names are unique across modules anyway. For the moment, while multi-module guests remain unusual, the _status quo_ is probably fine.


Last updated: Nov 22 2024 at 16:03 UTC