top | item 34805014

(no title)

zznzz | 3 years ago

I cannot comment on whether “everyone” is oblivious but yes, this is still the case - frame pointer based unwinding sometimes skips the caller when the IP is sampled before the callee sets up a frame.

This is also common for samples in leaf functions.

compiler & tool chain folks tend to think (quite justifiably imo) that this and similar stuff is fine because dwarf allows reconstructing everything perfectly. The problem is just that the user experience of dwarf-based unwinding is poor, because the only implemented method in Linux is sampling the contents of the stack and doing the unwind in post processing.

discuss

order

DaveFlater|3 years ago

AFAIK, the optimization undermined the only use case that -fno-omit-frame-pointer actually had on x86_64. Is there a real use case that benefitted from allowing the frame pointer push to wander? Why why why

sitkack|3 years ago

That is too bad, it does mention `-fno-schedule-insns2` in the comments. I'll have to see how well that works in practice.

Having high quality low cost stack straces is important for continuous profiling. ref Knuth.