Get the latest tech news
Limitations of frame pointer unwinding
An exploration of the overlooked limitations of unwinding with frame pointers and why enabling frame pointers does not constitute a full solution to enable profiling.
Since around 2011 with GCC version 4.6, the default has been to omit the frame pointer register, which means that debugging and profiling tools must use call-frame information to produce stack traces. Second, the profiles produced by frame pointer unwinding will inevitably exhibit gaps around function prologues and epilogues and in procedure lookup table (PLT) sections. We can use the following perf command to check the number of samples that fall into the first 8 bytes of a function and are thus guaranteed to have an inaccurate frame pointer:
Or read this on Hacker News