Skip to content

Conversation

@brandtbucher
Copy link
Member

@brandtbucher brandtbucher commented Jan 8, 2026

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.

@brandtbucher brandtbucher requested a review from pablogsal January 8, 2026 07:03
@brandtbucher brandtbucher changed the title Allow native profilers and debuggers to unwind through JIT frames GH-126910: Allow native profilers and debuggers to unwind through JIT frames Jan 8, 2026
@pablogsal
Copy link
Member

This patch enables frame pointers in JIT code on x86-64 Linux

What's the situation in aarch64?

@Fidget-Spinner
Copy link
Member

Can confirm this works for everything except GNU backtrace, and for that one I think we're just missing debug info.

@pablogsal
Copy link
Member

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....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants