Hacker News new | ask | show | jobs
by brancz 1500 days ago
I don't know enough about wasm runtimes, but for example JIT runtimes like nodejs (or JVM via perf-map-agent [0]) allow writing out debug infos via the Linux Kernel JIT-Interface [1], which debuggers and profilers can then pick up to symbolize stack traces. Not saying that it has to be the Linux JIT perf-map interface, but it'd be nice if it's something implementors of the runtimes kept in mind (not implying that they're not, I just haven't read anything).

[0] https://github.com/jvm-profiling-tools/perf-map-agent

[1] https://github.com/torvalds/linux/blob/master/tools/perf/Doc...

1 comments

That looks similar to how I profile my webassembly in wasmtime: https://docs.wasmtime.dev/examples-profiling-perf.html , so that might be what you're looking for! It works pretty well.

Wasmtime also has this page on debugging with supported debuggers when the webassembly was compiled with debug information: https://docs.wasmtime.dev/examples-debugging.html