Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try demangling names before forwarding them to the profiler #3683

Merged
merged 1 commit into from
Jan 12, 2022

Conversation

bnjbvr
Copy link
Member

@bnjbvr bnjbvr commented Jan 12, 2022

Before this PR, each profiler (perf/vtune, at the moment) had to have a
demangler for each of the programming languages that could have been
compiled to wasm and fed into wasmtime. With this, wasmtime now
demangles names before even forwarding them to the underlying profiler,
which makes for a unified representation in profilers, and avoids
incorrect demangling in profilers.

Before this PR, each profiler (perf/vtune, at the moment) had to have a
demangler for each of the programming languages that could have been
compiled to wasm and fed into wasmtime. With this, wasmtime now
demangles names before even forwarding them to the underlying profiler,
which makes for a unified representation in profilers, and avoids
incorrect demangling in profilers.
@fitzgen fitzgen merged commit eeca41d into main Jan 12, 2022
@fitzgen fitzgen deleted the demangle-names-in-profiling branch January 12, 2022 18:31
@alexcrichton
Copy link
Member

Oh oops looks like I was too slow, but in any case this is actually a duplicate of this demangling logic so if you're up for it it'd be great to have some sort of helper function in wasmtime-jit which wasmtime::Trap calls into and this function shares as well.

Similarly if you're interested in pushing on vtune one feature the vtune support is missing is loading profiling information for trampolines. Trampolines were added recently to jitdump support but were skipped as part of vtune since I didn't know how to modify it.

@bnjbvr
Copy link
Member Author

bnjbvr commented Jan 13, 2022

@alexcrichton, I will look into this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants