-
Notifications
You must be signed in to change notification settings - Fork 317
BPF: hotspot: add limited heuristic for x86-64 epilogue #138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Add a simple heuristic for x86-64 epilogue checking that should be able to not produce too many false positives and yet catch the most probable asynchronous stop points where the CPU perf might fire. Also ensure that epilogue parsing is attempted only on the top frames to further reduce likelyness of false positives and reduce ebpf code size. fixes open-telemetry#136
578e81b
to
3e0472d
Compare
The maximum distance from 'popq %rbp' to 'retq' seems to be 12 bytes, and we need at least one byte before rip. Report the used epilogue method in debug messages
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! ARM64 coredump tests all still passing (I'm assuming that you checked X86 -- don't have a machine at hand).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works fine here and also tested with the x86 coredumps 👍
…ry#138) Add a simple heuristic for x86-64 epilogue checking that should be able to not produce too many false positives and yet catch the most probable asynchronous stop points where the CPU perf might fire. Also ensure that epilogue parsing is attempted only on the top frames to further reduce likelyness of false positives and reduce ebpf code size. fixes open-telemetry#136
Add a simple heuristic for x86-64 epilogue checking that should be able to not produce too many false positives and yet catch the most probable asynchronous stop points where the CPU perf might fire.
Also ensure that epilogue parsing is attempted only on the top frames to further reduce likelyness of false positives and reduce ebpf code size.
fixes #136