profile-bee
profile-bee copied to clipboard
Support Dwarf for No frame pointer Stack Unwinding in eBPF
We need DWARF stalk walking in eBPF to make this useful for native profiling and other eBPF tracing applications without compiling all applications with frame pointers.
See https://www.polarsignals.com/blog/posts/2022/11/29/profiling-without-frame-pointers
Reference of eh parsing and stack unwinding implementations
Rust
- Elf info (https://github.com/kevin-lesenechal/elf-info/blob/master/src/eh.rs)
- Unwinding (Dwarf expression https://github.com/nbdd0121/unwinding/blob/d1ae69f6/src/unwinder/frame.rs)
- Cargo Trace (https://github.com/dvc94ch/cargo-trace/blob/88e3e5abd3fc4c6d345dcbc797efcbf7b477b162/ehframe/src/lib.rs#L203)
Go
- Symbols https://github.com/parca-dev/parca-agent/blob/v0.10.1/pkg/stack/unwind/unwind_table.go
- Native undwinder - https://github.com/grafana/opentelemetry-ebpf-profiler/blob/fe88872504be9b779be5e3efbdd4b7ce5d9957ee/nativeunwind/elfunwindinfo/README.md