demange names in guest-profiler output#7809
Conversation
0ae3e30 to
5ed0483
Compare
5ed0483 to
daa7ef0
Compare
Subscribe to Label Actioncc @peterhuene DetailsThis issue or pull request has been labeled: "wasmtime:api"Thus the following users have been cc'd because of the following labels:
To subscribe or unsubscribe from this label, edit the |
jameysharp
left a comment
There was a problem hiding this comment.
This is great, thank you!
I hesitated about the use of unwrap, but demangle_function_name can only fail if the writer fails, and I don't think the Write implementation for String can fail, so I'll sign off that this use is fine. We have another unwrap on the use of this function in CompiledModule::register_debug_and_profiling, anyway.
While looking at that, I just noticed that there's a demangle_function_name_or_index function which is very similar to what this whole match statement does. I think it's harmless to duplicate that here, with a slightly different format for the fallback case when there's no function name.
I'm going to merge this as-is. But if you want to open a follow-up PR, I think it would be an improvement to use demangle_function_name_or_index here.
issue #7665