Brussels / 4 & 5 February 2023


Stack walking/unwinding without frame pointers

Sampling CPU profilers periodically fetch the stacks of the profiled processes that are running on the CPU at a given time. Walking the stacks of native processes with a little work is easily possible when frame pointers(FPs) are present. But most binaries in the real world are not compiled with FPs. So it can get quite complicated if profilers have to walk the stacks when frame pointers are omitted. In this talk, we will talk about how we can walk the stacks using the DWARF CFI (mainly .eh_frame). We will also discuss how eBPF is helping us with that and how extending the current stack walking facilities can be useful especially in interpreted languages, such as Ruby, as well as runtimes with JITs, like the JVM.


Vaishali Thakkar