GH-126910: Allow native profilers and debuggers to unwind through JIT frames#143548
GH-126910: Allow native profilers and debuggers to unwind through JIT frames#143548brandtbucher wants to merge 5 commits intopython:mainfrom
Conversation
What's the situation in aarch64? |
|
Can confirm this works for everything except GNU backtrace, and for that one I think we're just missing debug info. |
|
BTW we should check gdb and lldb as well but my guess is that those have the biggest set of tricks under the sleeve so I assume this won't be a problem.... |
|
PYTHON_JIT=0 PYTHON_JIT=1 |
Replied here: #126910 (comment) |
diegorusso
left a comment
There was a problem hiding this comment.
Can we get this enabled for AArch64 as well?
|
When you're done making the requested changes, leave the comment: |
|
This would also work for Windows 32bit. I've done successful experiments with @diegorusso's #144137 back then. I just don't know how much we're willing to do wrt jit and Windows 32bit? |
Most unwinders will optimistically fall back to frame pointers if DWARF unwind info isn't present for a given frame. This patch enables frame pointers in JIT code on x86-64 Linux, by setting them in the "shim" frame and reserving the frame pointer register in the rest of the JIT code. @Fidget-Spinner can confirm that this works for the unwinders in https://github.com/pablogsal/cpython-unwind.
Perf impact is neutral.