jlfwong / speedscope

🔬 A fast, interactive web-based viewer for performance profiles.
https://www.speedscope.app
MIT License
5.45k stars 237 forks source link

Add support for Rust v0 symbol mangling scheme #474

Open cerisier opened 4 months ago

cerisier commented 4 months ago

Rust has defined its own symbol mangling scheme (https://rust-lang.github.io/rfcs/2603-rust-symbol-name-mangling-v0.html) which is currently not supported since it differs completely from the C++ name mangling scheme speedscope already support.

I can see that the C++ demangling support was taken from what seems like a pre WASM C++/Javascript transpilation process but not sure what?

If Rust demangling support makes sense for speedscope, what would be the best way to add support for it ? Would you be open to loading WASM modules for demangling support ?

That way we could just use the official demangle from https://github.com/rust-lang/rustc-demangle We could even do the same for C++ with abi::__cxa_demangle from cxxabi.h.