profile-bee icon indicating copy to clipboard operation
profile-bee copied to clipboard

Support Dwarf for No frame pointer Stack Unwinding in eBPF

Open zz85 opened this issue 11 months ago • 1 comments

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

zz85 avatar Jun 03 '25 00:06 zz85

Reference of eh parsing and stack unwinding implementations

Rust

  1. Elf info (https://github.com/kevin-lesenechal/elf-info/blob/master/src/eh.rs)
  2. Unwinding (Dwarf expression https://github.com/nbdd0121/unwinding/blob/d1ae69f6/src/unwinder/frame.rs)
  3. 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

zz85 avatar Jun 09 '25 11:06 zz85