@brendangregg As someone who has worked in smaller organizations which didn't at the time consider it practical to recompile everything (and be responsible for the consequences of such), this makes me so happy.
(But angry that it took us so long in the x86_64 era to get there)
@brendangregg As another data point: In the Wasmtime JIT for WebAssembly we've had frame pointers turned on unconditionally on x86-64 for several years, and started doing that for all architectures a couple years ago because we need to quickly capture a stack trace if the guest traps.
That said I'm confused by your suggestion that JITs can't produce DWARF, since Wasmtime does. That code is a regular source of bugs, and I'm not certain whether profilers can see the generated DWARF, but when it works, I believe at least gdb supports it.
That doesn't change your point that DWARF isn't a great choice for profiling, and for the same reasons we don't want to use DWARF for stack-walking.
But we've discussed that we may have to stop relying on frame pointers in the future to support WebAssembly exceptions proposals. We also don't currently do any inlining, so frame pointers can potentially be a significant hit if we have a ton of tiny leaf functions. So we still have open questions about what's the best thing for us to do.
@brendangregg you might want to check the framehop and wholesym Rust crates developed by my colleague @mstange
They've been written to provide very high quality stack traces while also offering very high performance, so that they can be used during online profiling:
https://crates.io/crates/framehop
https://crates.io/crates/wholesym
@brendangregg The 2nd China eBPF Developers Conference Invitation!
Dear Mr. Brendan Gregg,
I hope this message finds you well. My name is Zhao Chenyu, representing Thoughtworks China and Xi'an University of Posts and Telecommunications in China. It is with great sincerity that I extend this invitation to you to participate in the upcoming 2nd eBPF Developer Conference in China as a keynote speaker.
Please contact me for more detailed information.