René's URL Explorer Experiment


Title: Supporting stack unwinding in the JIT compiler · Issue #126910 · python/cpython · GitHub

Open Graph Title: Supporting stack unwinding in the JIT compiler · Issue #126910 · python/cpython

X Title: Supporting stack unwinding in the JIT compiler · Issue #126910 · python/cpython

Description: TLDR This is a lot of text because the issue is complex but if you want the gist: To not break a lot of tools that rely on unwinding, I propose to fix this by compiling the JIT stencils with frame pointers which has a trivial maintenance...

Open Graph Description: TLDR This is a lot of text because the issue is complex but if you want the gist: To not break a lot of tools that rely on unwinding, I propose to fix this by compiling the JIT stencils with frame ...

X Description: TLDR This is a lot of text because the issue is complex but if you want the gist: To not break a lot of tools that rely on unwinding, I propose to fix this by compiling the JIT stencils with frame ...

Opengraph URL: https://github.com/python/cpython/issues/126910

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Supporting stack unwinding in the JIT compiler","articleBody":"# TLDR\r\n\r\nThis is a lot of text because the issue is complex but if you want the gist:\r\n\r\nTo not break a lot of tools that rely on unwinding, I propose to fix this by **compiling the JIT stencils with frame pointers** which has a **trivial maintenance cost** (2 lines) and only **involves a 2% hit** on speed when using the JIT while making **almost all existing debuggers and profilers just work™** in the presence of the JIT.\r\n\r\n**Although this doesn't fix everything** sadly I think is the **best compromise that I can find** (and we are quite lucky to have it as normally fixing this is a nightmare - as in thousands of complex lines of code and 50% slowdown nightmare).\r\n\r\n------\r\n\r\n# The issue + proposal\r\n\r\nCPython's JIT compiler must provide robust stack unwinding support to maintain compatibility with the Python ecosystem's debugging and profiling tools. This requirement is particularly critical given Python's reliance on native extensions written in C, C++, and Rust. As more performance-critical code moves to these native implementations, the ability to properly unwind through mixed Python and native frames becomes fundamental for effective debugging and profiling. This capability is even more crucial with the introduction of both JIT compilation and free-threaded modes, which significantly increase the complexity of runtime behavior. Without proper unwinding support, debugging te issues that can appear in the presence of these new modes becomes extremely challenging – developers would be unable to generate meaningful stack traces, hampering their ability to understand where and why their programs failed. Consider debugging a deadlock in free threadded code and a Rust extension, or investigating a crash in native code called from JIT-compiled Python – without proper unwinding support, error reports would be incomplete or misleading, making production issues significantly harder to diagnose and fix. The ability to get complete, accurate stack traces in these scenarios is not just a convenience; it's essential for maintaining production applications where Python increasingly interacts with native code through multiple execution modes.\r\n\r\nProfiling is equally affected – modern performance analysis tools like py-spy, Austin, or eBPF-based solutions need to understand the complete call stack, including JIT-compiled code, native extensions, and regular Python frames, to provide accurate performance insights.\r\n\r\nSome of the popular tools that use native unwinding in some way or form:\r\n\r\n- Austin (statistical profiler). Uses libunwind\r\n- py-spy (statistical profiler).Uses libunwind\r\n- memray: uses C++ unwinder for macOS and libunwind for Linux\r\n- pystack: uses elfutils (as is the only one supporting core files).\r\n- EBPf unwinders : normally rely on frame pointers or rely on the C++ unwinder (https://israelo.io/blog/ehframes/, https://www.polarsignals.com/blog/posts/2022/11/29/dwarf-based-stack-walking-using-ebpf).\r\n- Additionally, most JIT compilers implement not only frame pointers to make possible to profile and debug, but also implement either C++ exception unwinder  via eh_frames or even more hardcore support for gdb and other debuggers.\r\n- Gdb and hdb-helpers: a combination of libdw, libunwind or custom\r\n- Perf: frame pointers, lubunwind or libdw\r\n- Lldb: libunwind or custom\r\n- valgrind: uses a custom unwinder based on libdw \r\n\r\nThis doesn't include the considerable amount of custom tools that are not open source either in the debugging or profiling space. \r\n\r\n## Unwinding Libraries and Their Capabilities\r\n\r\nSeveral libraries provide stack unwinding capabilities, each with its own strengths and limitations. \r\n\r\n| Library | Platforms | Local Unwinding | Remote Unwinding | Core Files | Registration API | Remote Registration Support | Main Users |\r\n|---------|-----------|-----------------|------------------|------------|------------------|---------------------------|------------|\r\n| libunwind | Linux only | Yes (fast) | Yes | No | `_U_dyn_register` | No | Profilers, debuggers |\r\n| Native Unwinder (LLVM/GDB) | Linux, MacOS | Yes (optimized) | No | No | `__register_frame` | No | C++ exceptions, `backtrace()` |\r\n| libdw (elfutils) | Linux only | Yes | Yes | Yes | None (ELF parsing) | No | GDB, debuggers like pystack |\r\n| GDB/LLDB built-in | Cross-platform | Yes | Yes | Yes | `__jit_debug_register_code` | No | Debug tools |\r\n\r\n# Implementation Plan for Stack Unwinding Support\r\n\r\nAfter extensive experimentation and analysis (believe me this was **a lot of very difficult research work**, @brandtbucher and I found that since we have `preserve_none` and LLVM 19 we can just compile the JIT stencils with frame pointers and that makes *most* tools just work. Based on this I propose implementing frame pointer support as the primary strategy for stack unwinding in CPython's JIT. This approach has proven to be the most pragmatic and effective solution, providing broad compatibility with existing tools while maintaining reasonable performance characteristics. I do think we got very lucky this fixes most of the tools since adding unwinding support for JITs otherwise is **very** challenging (see following sections).\r\n\r\nFrame pointer support can be enabled through a minimal change to the JIT compiler flags:\r\n\r\n```diff\r\ndiff --git a/Tools/jit/_targets.py b/Tools/jit/_targets.py\r\nindex d8dce0a905c..7c3b2e5aab7 100644\r\n--- a/Tools/jit/_targets.py\r\n+++ b/Tools/jit/_targets.py\r\n@@ -135,6 +135,8 @@ async def _compile(\r\n             # Don't call stack-smashing canaries that we can't find or patch:\r\n             \"-fno-stack-protector\",\r\n             \"-std=c11\",\r\n+            \"-fno-omit-frame-pointer\",\r\n+            \"-mno-omit-leaf-frame-pointer\",\r\n             \"-o\",\r\n             f\"{o}\",\r\n             f\"{c}\",\r\n```\r\n\r\nThis simple change enables compatibility with a wide range of tools:\r\n- libunwind (both local and remote unwinding)\r\n- libdw (supporting core file analysis, remote and local unwinding)\r\n- GDB and LLDB\r\n- eBPF-based unwinders\r\n\r\nMost of the popular tools will just work with this change, instead of having to implement tons of different unwinding information support, [which is a nightmare](https://www.corsix.org/content/libunwind-dynamic-code-x86-64))\r\n\r\n## Performance Impact\r\n\r\nhttps://github.com/faster-cpython/benchmarking-public/blob/main/results/bm-20241114-3.14.0a1%2B-925b70b-JIT/bm-20241114-linux-x86_64-brandtbucher-justin_frame_pointer-3.14.0a1%2B-925b70b-vs-base.md\r\n\r\nThe performance impact of this change has been carefully measured:\r\n- AMD64: Approximately 2% overhead, as shown in [recent benchmarks](https://raw.githubusercontent.com/faster-cpython/benchmarking-public/refs/heads/main/results/bm-20241114-3.14.0a1%2B-925b70b-JIT/bm-20241114-linux-x86_64-brandtbucher-justin_frame_pointer-3.14.0a1%2B-925b70b-vs-base.svg)\r\n- ARM64 and macOS: Even lower overhead due to the presence of dedicated link registers\r\n\r\nThis modest performance cost is significantly outweighed by the expected JIT performance improvements. Moreover, the maintenance burden is minimal compared to alternative approaches like implementing custom unwinding support for each tool.\r\n\r\n## Additional Optimization\r\n\r\nWe can further enhance compatibility by generating eh-frames in the JIT stencils and calling `__register_frame_table` (a bulk version of `__register_frame`). Benchmarks show this additional feature has neutral performance impact while enabling native unwinder support. This makes the solution even more robust without additional overhead.\r\n\r\nGiven these considerations - the minimal implementation complexity, broad tool compatibility, reasonable performance characteristics, and the ability to extend support to native unwinders - frame pointer support represents the optimal path forward for CPython's JIT implementation.\r\n\r\n## Why this must be activated by default\r\n\r\nThe decision to enable frame pointers by default is driven by two critical production requirements.\r\n\r\n* When applications crash or hang, tools like pystack need to analyze program state without the luxury of reproduction – you cannot simply \"run it again with debug options enabled.\" You need to unwind the stack either remotely or from a core file. \r\n* Performance profiling in production requires safely inspecting program state from another process or the kernel. Tools like Austin, py-spy, and eBPF-based profilers need to periodically sample stack traces without interrupting the target process. Both scenarios require frame pointers to work reliably.\r\n\r\nThis must be enabled by default because most Python users don't compile Python themselves – they install it through package managers or tools like uv. Unless frame pointers are enabled by default, these critical debugging and profiling capabilities won't be available in most Python installations, severely impacting the quality of bug reports to both CPython and C extensions. Given the minimal performance impact of 2% frame pointers should be enabled by default, following the principle of being \"safe by default.\" While we should provide the option to disable them, this should be a conscious decision made by end users who understand they're trading away the ability to properly profile and debug their applications in production – not a choice made by intermediate distributors or package managers.\r\n\r\n## Additional information\r\n\r\nUsing frame pointers aligns with a broader industry trend where major tech companies and Linux distributions are reverting previous optimization decisions and re-enabling frame pointers. Companies like Meta and Google now compile their entire software stack, including their Python installations, with frame pointers enabled. This shift is driven by the recognition that observability and debugging capabilities in production environments far outweigh the minor performance impact of frame pointers. Ubuntu has also adopted this approach, now compiling virtually all packages with frame pointers enabled (with Python being a notable exception we aim to address). This industry-wide move reflects a fundamental reality: in modern production environments, the ability to profile, monitor, and debug applications effectively is crucial, and frame pointers provide the most reliable and universal way to achieve this. The performance cost, typically around 1-5%, is normally considered to be a worthwhile trade-off for the improved observability they enable. This is particularly relevant for server workloads where understanding performance characteristics and debugging production issues is far more valuable than the small overhead frame pointers introduce. The fact that major tech companies maintain this policy even for performance-critical services demonstrates that the benefits of comprehensive profiling and debugging support outweigh the minimal performance impact. Some links:\r\n\r\nhttps://ubuntu.com/blog/ubuntu-performance-engineering-with-frame-pointers-by-default\r\nhttps://www.brendangregg.com/blog/2024-03-17/the-return-of-the-frame-pointers.html\r\nhttps://www.polarsignals.com/blog/posts/2023/12/13/embracing-frame-pointers-in-ubuntu-24-04-lts\r\n\r\n-------------\r\n\r\n# Background on Stack Unwinding Support Requirements\r\n\r\nAdding JIT compilation to CPython requires careful consideration of stack unwinding support. Without proper unwinding capabilities, we risk breaking compatibility with essential development tools that Python developers rely on daily. To understand the scope of this requirement, we need to examine the landscape of tools that depend on stack unwinding.\r\n\r\n## Tools Requiring Stack Unwinding\r\n\r\nStack unwinding is a critical capability used by three major categories of tools in the Python ecosystem:\r\n\r\n* **Debuggers** (GDB, LLDB, pystack) rely on unwinding to show developers where their program is currently executing. These tools deal with remote processes or core files.\r\n\r\n* **Profilers** use unwinding to understand program performance. \r\n\r\n* **C++ Exception Handling** depends on unwinding information to:\r\n  - Propagate exceptions through the stack\r\n  - Clean up resources during stack unwinding\r\n\r\n## Unwinding Mechanisms\r\n\r\nStack unwinding occurs in two fundamentally different contexts:\r\n\r\n* **In-process unwinding**:\r\n  - Code examines its own stack\r\n  - Used by tracing profilers and exception handlers\r\n  - Has direct access to program memory and CPU registers\r\n  - Primarily used for live analysis\r\n\r\n* **Out-of-process unwinding**:\r\n  - External program examines another program's stack\r\n  - Used by debuggers and statistical profilers\r\n  - Includes core dump analysis\r\n\r\n## Types of Analysis Tools\r\n\r\nThe tools that perform unwinding can be categorized by their data collection method:\r\n\r\n* **Tracing Profilers**:\r\n  - Run inside the target process\r\n  - Instrument function entries and exits\r\n  - Collect detailed execution information\r\n  - Higher overhead but more precise\r\n  - Rely on local unwinding capabilities\r\n  - Examples: cProfile, memray\r\n\r\n* **Statistical Profilers**:\r\n  - Run outside the target process\r\n  - Sample program state periodically\r\n  - Much lower overhead\r\n  - Suitable for production use\r\n  - Growing eBPF ecosystem:\r\n    - Enables efficient system-wide analysis\r\n    - Becoming standard for production monitoring\r\n    - Requires reliable stack unwinding support\r\n    - Examples: perf, py-spy, bcc tools\r\n\r\n# Unwinding Libraries and Their Capabilities\r\n\r\nSeveral libraries provide stack unwinding capabilities, each with its own strengths and limitations. The strategies to support unwinding for JIT compiled code are:\r\n\r\n* Allow frame pointers: makes libdw, gdb, lldb and lubinwind work. libunwind and libdw work in remote mode, including core files.\r\n\r\n* Per unwinder support for dynamically generated code using DWARF (only local mode and only if it supports it - libdw has no support):\r\n    * libunwind: Construct ELF .debug_frame data structures, and table_entry data structures, and a unw_dyn_table_info data structure, and a unw_dyn_info_t structure, then call _U_dyn_register.\r\n    *  C++ exception unwinder: Construct ELF .eh_frame data structures, then call __register_frame \r\n    *  GDB: Construct a full in-memory ELF object, manually maintain a doubly-linked list of all such objects in a global variable called __jit_debug_descriptor, and call a global function called __jit_debug_register_code when this list is changed\r\n\r\nAny other library  has **no support**. \r\n\r\n## Other JITs\r\n\r\nMost JIT compilers implement not only frame pointers to make it possible to profile and debug, but also implement either C++ exception unwinder via eh_frames or even more hardcore support for gdb and other debuggers. Some links:\r\n\r\nLuaJIT: https://github.com/LuaJIT/LuaJIT/blob/fe71d0fb54ceadfb5b5f3b6baf29e486d97f6059/src/lj_err.c#L620\r\nDotNet: https://github.com/dotnet/coreclr/pull/468/files\r\nDotNet remote unwinding: https://github.com/dotnet/runtime/blob/d9855f27f7d5d5138452009e9f0dd7a81c5c8b74/src/coreclr/pal/src/exception/remote-unwind.cpp\r\nJulia (frame pointers and __register_frame): https://github.com/JuliaLang/julia/blob/caa2f7d52b430f50c8038a7f6766edba28a3fb65/src/debuginfo.cpp#L554\r\nLLVM's ORC jit (frame pointers, __register_frame and much more): https://github.com/llvm/llvm-project/blob/935d753c6dca0cd9bc5ea14fde5b00386ebcc5be/compiler-rt/lib/orc/elfnix_platform.cpp#L191\r\nV8: Frame pointers, __register_frame and much more: https://www.kvakil.me/posts/2022-10-17-ustackjs-unwind-javascript-stacks-in-ebpf.html, https://github.com/v8/v8/blob/b70457462cb22753a011096c9c9be20275dc4437/src/diagnostics/gdb-jit.cc#L1674, https://github.com/v8/v8/blob/b70457462cb22753a011096c9c9be20275dc4437/src/diagnostics/unwinder.cc#L100, https://github.com/v8/v8/blob/b70457462cb22753a011096c9c9be20275dc4437/src/diagnostics/eh-frame.cc\r\n\r\n\n\n\u003c!-- gh-linked-prs -->\n### Linked PRs\n* gh-143548\n* gh-144137\n* gh-146071\n* gh-146520\n* gh-146521\n* gh-146524\n* gh-147945\n* gh-147994\n* gh-148002\n* gh-148872\n* gh-149103\n* gh-149104\n\u003c!-- /gh-linked-prs -->\n","author":{"url":"https://github.com/pablogsal","@type":"Person","name":"pablogsal"},"datePublished":"2024-11-16T19:33:22Z","url":"https://github.com/python/cpython/issues/126910"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:7678e089-7d75-2e33-4496-1deeba2c5eb3
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id8390:1BFAF2:92B184:D09730:6AECAA8D
html-safe-noncee160f251eb62fc72ba9d53efd8c7b852c8fb2583b3ff862f7563025b034aec02
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MzkwOjFCRkFGMjo5MkIxODQ6RDA5NzMwOjZBRUNBQThEIiwidmlzaXRvcl9pZCI6IjU5ODc1Mjc0NDcxNjA4NTkyNzciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacd1062bf34b1634c222ce3048a3885ed934abe969faf26e845e65834ee26c3e43
hovercard-subject-tagissue:2664846574
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/126910/issue_layout
twitter:imagehttps://opengraph.githubassets.com/0c7bc43902e83508c83e4b001fa4440321694f461a666c0f5e11bb377eaf9459/python/cpython/issues/126910
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/0c7bc43902e83508c83e4b001fa4440321694f461a666c0f5e11bb377eaf9459/python/cpython/issues/126910
og:image:altTLDR This is a lot of text because the issue is complex but if you want the gist: To not break a lot of tools that rely on unwinding, I propose to fix this by compiling the JIT stencils with frame ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamepablogsal
hostnamegithub.com
expected-hostnamegithub.com
None12ae3fe4115aefbcf0540107cc6e7e5771be614143d37177f54a10279eb0981f
turbo-cache-controlno-preview
go-importgithub.com/python/cpython git https://github.com/python/cpython.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id81598961
octolytics-dimension-repository_nwopython/cpython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id81598961
octolytics-dimension-repository_network_root_nwopython/cpython
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release357f5fce9de7eb41b33b7393beee61fde611e769
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/python/cpython/issues/126910#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F126910
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F126910
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/issues/126910
Reloadhttps://github.com/python/cpython/issues/126910
Reloadhttps://github.com/python/cpython/issues/126910
pythonhttps://github.com/python
cpythonhttps://github.com/python/cpython
Codehttps://github.com/python/cpython
Issues5k+ (5k+)https://github.com/python/cpython/issues
Pull requests2.3k (2.3k)https://github.com/python/cpython/pulls
Actionshttps://github.com/python/cpython/actions
Projectshttps://github.com/python/cpython/projects
Security and qualityhttps://github.com/python/cpython/security
Insightshttps://github.com/python/cpython/pulse
https://github.com/python/cpython
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/126910
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/126910
Supporting stack unwinding in the JIT compilerhttps://github.com/python/cpython/issues/126910#top
https://github.com/pablogsal
https://github.com/brandtbucher
3.14bugs and security fixeshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%223.14%22
interpreter-core(Objects, Python, Grammar, and Parser dirs)https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22interpreter-core%22
topic-JIThttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22topic-JIT%22
https://github.com/pablogsal
pablogsalhttps://github.com/pablogsal
on Nov 16, 2024https://github.com/python/cpython/issues/126910#issue-2664846574
https://israelo.io/blog/ehframes/https://israelo.io/blog/ehframes/
https://www.polarsignals.com/blog/posts/2022/11/29/dwarf-based-stack-walking-using-ebpfhttps://www.polarsignals.com/blog/posts/2022/11/29/dwarf-based-stack-walking-using-ebpf
@brandtbucherhttps://github.com/brandtbucher
which is a nightmarehttps://www.corsix.org/content/libunwind-dynamic-code-x86-64
https://github.com/faster-cpython/benchmarking-public/blob/main/results/bm-20241114-3.14.0a1%2B-925b70b-JIT/bm-20241114-linux-x86_64-brandtbucher-justin_frame_pointer-3.14.0a1%2B-925b70b-vs-base.mdhttps://github.com/faster-cpython/benchmarking-public/blob/main/results/bm-20241114-3.14.0a1%2B-925b70b-JIT/bm-20241114-linux-x86_64-brandtbucher-justin_frame_pointer-3.14.0a1%2B-925b70b-vs-base.md
recent benchmarkshttps://raw.githubusercontent.com/faster-cpython/benchmarking-public/refs/heads/main/results/bm-20241114-3.14.0a1%2B-925b70b-JIT/bm-20241114-linux-x86_64-brandtbucher-justin_frame_pointer-3.14.0a1%2B-925b70b-vs-base.svg
https://ubuntu.com/blog/ubuntu-performance-engineering-with-frame-pointers-by-defaulthttps://ubuntu.com/blog/ubuntu-performance-engineering-with-frame-pointers-by-default
https://www.brendangregg.com/blog/2024-03-17/the-return-of-the-frame-pointers.htmlhttps://www.brendangregg.com/blog/2024-03-17/the-return-of-the-frame-pointers.html
https://www.polarsignals.com/blog/posts/2023/12/13/embracing-frame-pointers-in-ubuntu-24-04-ltshttps://www.polarsignals.com/blog/posts/2023/12/13/embracing-frame-pointers-in-ubuntu-24-04-lts
https://github.com/LuaJIT/LuaJIT/blob/fe71d0fb54ceadfb5b5f3b6baf29e486d97f6059/src/lj_err.c#L620https://github.com/LuaJIT/LuaJIT/blob/fe71d0fb54ceadfb5b5f3b6baf29e486d97f6059/src/lj_err.c#L620
https://github.com/dotnet/coreclr/pull/468/fileshttps://github.com/dotnet/coreclr/pull/468/files
https://github.com/dotnet/runtime/blob/d9855f27f7d5d5138452009e9f0dd7a81c5c8b74/src/coreclr/pal/src/exception/remote-unwind.cpphttps://github.com/dotnet/runtime/blob/d9855f27f7d5d5138452009e9f0dd7a81c5c8b74/src/coreclr/pal/src/exception/remote-unwind.cpp
https://github.com/JuliaLang/julia/blob/caa2f7d52b430f50c8038a7f6766edba28a3fb65/src/debuginfo.cpp#L554https://github.com/JuliaLang/julia/blob/caa2f7d52b430f50c8038a7f6766edba28a3fb65/src/debuginfo.cpp#L554
https://github.com/llvm/llvm-project/blob/935d753c6dca0cd9bc5ea14fde5b00386ebcc5be/compiler-rt/lib/orc/elfnix_platform.cpp#L191https://github.com/llvm/llvm-project/blob/935d753c6dca0cd9bc5ea14fde5b00386ebcc5be/compiler-rt/lib/orc/elfnix_platform.cpp#L191
https://www.kvakil.me/posts/2022-10-17-ustackjs-unwind-javascript-stacks-in-ebpf.htmlhttps://www.kvakil.me/posts/2022-10-17-ustackjs-unwind-javascript-stacks-in-ebpf.html
https://github.com/v8/v8/blob/b70457462cb22753a011096c9c9be20275dc4437/src/diagnostics/gdb-jit.cc#L1674https://github.com/v8/v8/blob/b70457462cb22753a011096c9c9be20275dc4437/src/diagnostics/gdb-jit.cc#L1674
https://github.com/v8/v8/blob/b70457462cb22753a011096c9c9be20275dc4437/src/diagnostics/unwinder.cc#L100https://github.com/v8/v8/blob/b70457462cb22753a011096c9c9be20275dc4437/src/diagnostics/unwinder.cc#L100
https://github.com/v8/v8/blob/b70457462cb22753a011096c9c9be20275dc4437/src/diagnostics/eh-frame.cchttps://github.com/v8/v8/blob/b70457462cb22753a011096c9c9be20275dc4437/src/diagnostics/eh-frame.cc
GH-126910: Allow native profilers and debuggers to unwind through JIT frames #143548https://github.com/python/cpython/pull/143548
GH-126910: add test for manual frame unwinding #144137https://github.com/python/cpython/pull/144137
GH-126910: Add gdb support for unwinding JIT frames #146071https://github.com/python/cpython/pull/146071
GH-126910: reserve FP on AArch64 when generating JIT stencils #146520https://github.com/python/cpython/pull/146520
GH-126910: avoid reading the FP for getting the SP #146521https://github.com/python/cpython/pull/146521
gh-126910: Verify that JIT stencils preserve frame pointer #146524https://github.com/python/cpython/pull/146524
GH-126910: Make _Py_get_machine_stack_pointer return the stack pointer #147945https://github.com/python/cpython/pull/147945
GH-126910: Revert "Make _Py_get_machine_stack_pointer return the stack pointer (#147945)" #147994https://github.com/python/cpython/pull/147994
GH-126910: Increase default stack size for linux platforms without working HAVE_PTHREAD_GETATTR_NP #148002https://github.com/python/cpython/pull/148002
GH-126910: Build/link the JIT shim in the Python interpreter #148872https://github.com/python/cpython/pull/148872
GH-126910: Make _Py_get_machine_stack_pointer return the actual stack pointer #149103https://github.com/python/cpython/pull/149103
GH-126910: Add GNU backtrace support for unwinding JIT frames #149104https://github.com/python/cpython/pull/149104
Nexthttps://github.com/python/cpython/issues/126910?timeline_page=1
Eclips4https://github.com/Eclips4
topic-JIThttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22topic-JIT%22
interpreter-core(Objects, Python, Grammar, and Parser dirs)https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22interpreter-core%22
type-featureA feature request or enhancementhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-feature%22
on Nov 16, 2024https://github.com/python/cpython/issues/126910#event-15322199411
pablogsalhttps://github.com/pablogsal
type-featureA feature request or enhancementhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-feature%22
on Nov 16, 2024https://github.com/python/cpython/issues/126910#event-15322210185
pablogsalhttps://github.com/pablogsal
pablogsalhttps://github.com/pablogsal
brandtbucherhttps://github.com/brandtbucher
on Nov 16, 2024https://github.com/python/cpython/issues/126910#event-15322244379
https://github.com/brandtbucher
brandtbucherhttps://github.com/brandtbucher
on Nov 16, 2024https://github.com/python/cpython/issues/126910#issuecomment-2480779036
@pablogsalhttps://github.com/pablogsal
@pablogsalhttps://github.com/pablogsal
brandtbucherhttps://github.com/brandtbucher
3.14bugs and security fixeshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%223.14%22
on Nov 16, 2024https://github.com/python/cpython/issues/126910#event-15322337870
https://github.com/brandtbucher
brandtbucherhttps://github.com/brandtbucher
on Nov 16, 2024https://github.com/python/cpython/issues/126910#issuecomment-2480830353
PEP 744https://peps.python.org/pep-0744/#debugging
https://github.com/pablogsal
pablogsalhttps://github.com/pablogsal
on Nov 16, 2024https://github.com/python/cpython/issues/126910#issuecomment-2480831932
PEP 744https://peps.python.org/pep-0744/#debugging
throughhttps://gist.github.com/pablogsal/904785a3c69bd8fde222236a2d4ec7b4
somehttps://gist.github.com/pablogsal/d4b430694c66da3b6e389f84a7aefd92
stuffhttps://github.com/brandtbucher/cpython/commit/1ce520b506593bcb4beb2e2e0dfec2b5646d5899
pythonhttps://github.com/python
maleyclhttps://github.com/maleycl
on Nov 16, 2024https://github.com/python/cpython/issues/126910#event-15322824974
https://github.com/brandtbucher
brandtbucherhttps://github.com/brandtbucher
on Nov 16, 2024https://github.com/python/cpython/issues/126910#issuecomment-2480834151
pythonhttps://github.com/python
maleyclhttps://github.com/maleycl
on Nov 16, 2024https://github.com/python/cpython/issues/126910#event-15322942659
https://github.com/markshannon
markshannonhttps://github.com/markshannon
on Nov 18, 2024https://github.com/python/cpython/issues/126910#issuecomment-2482760481
profilinghttps://github.com/faster-cpython/benchmarking/blob/main/profiling/jit.pie.svg
https://github.com/pablogsal
pablogsalhttps://github.com/pablogsal
on Nov 18, 2024https://github.com/python/cpython/issues/126910#issuecomment-2482808466
ljfphttps://github.com/ljfp
on Apr 25, 2026https://github.com/python/cpython/issues/126910#event-24868334214
pythonGH-126910: Make `_Py_get_machine_stack_pointer` return the stac…https://github.com/ljfp/cpython/commit/02f04b25760203c56689976c82f3b016b96c8822
pythonGH-126910https://github.com/python/cpython/issues/126910
02f04b2https://github.com/ljfp/cpython/commit/02f04b25760203c56689976c82f3b016b96c8822
pythonGH-126910: Revert "Make `_Py_get_machine_stack_pointer` return …https://github.com/ljfp/cpython/commit/eb941dfea9d533aa2c78e7a50ed90b0ab97e21df
pythonGH-126910https://github.com/python/cpython/issues/126910
eb941dfhttps://github.com/ljfp/cpython/commit/eb941dfea9d533aa2c78e7a50ed90b0ab97e21df
pythonGH-126910: Build/link the JIT shim in the Python interpreter (p…https://github.com/ljfp/cpython/commit/414a501969707a567764da68766b16c83a08e2b8
pythonGH-126910https://github.com/python/cpython/issues/126910
p…https://github.com/python/cpython/pull/148872
414a501https://github.com/ljfp/cpython/commit/414a501969707a567764da68766b16c83a08e2b8
diegorussohttps://github.com/diegorusso
on Apr 28, 2026https://github.com/python/cpython/issues/126910#event-24956065312
pythonGH-126910: Add gdb support for unwinding JIT frameshttps://github.com/diegorusso/cpython/commit/b97b7695a07343170ff5095f4eb10eebe54bcab8
pythonGH-126910https://github.com/python/cpython/issues/126910
b97b769https://github.com/diegorusso/cpython/commit/b97b7695a07343170ff5095f4eb10eebe54bcab8
pythonGH-126910: Add GNU backtrace support for unwinding JIT frameshttps://github.com/diegorusso/cpython/commit/fd1c59a25281914fe98b749dd78d4929c602d85a
pythonGH-126910https://github.com/python/cpython/issues/126910
fd1c59ahttps://github.com/diegorusso/cpython/commit/fd1c59a25281914fe98b749dd78d4929c602d85a
pythonGH-126910: Derive JIT unwind info from shim CFIhttps://github.com/diegorusso/cpython/commit/13db9a90aee285fcdae086cb3d54255c80433909
pythonGH-126910https://github.com/python/cpython/issues/126910
13db9a9https://github.com/diegorusso/cpython/commit/13db9a90aee285fcdae086cb3d54255c80433909
pablogsalhttps://github.com/pablogsal
on May 2, 2026https://github.com/python/cpython/issues/126910#event-25094061636
pythongh-126910: Reset JIT GDB mutex earlier after forkhttps://github.com/pablogsal/cpython/commit/27da8e5f5a323e5b32646321b40ab1e2d027bbf7
pythongh-126910https://github.com/python/cpython/issues/126910
27da8e5https://github.com/pablogsal/cpython/commit/27da8e5f5a323e5b32646321b40ab1e2d027bbf7
pythongh-126910: Serialize perf jitdump initializationhttps://github.com/pablogsal/cpython/commit/9df4d7d3208476419f8c2538c12cb86dc8535658
pythongh-126910https://github.com/python/cpython/issues/126910
9df4d7dhttps://github.com/pablogsal/cpython/commit/9df4d7d3208476419f8c2538c12cb86dc8535658
GH-126910: Add gdb support for unwinding JIT frames (#146071)https://github.com/python/cpython/commit/c7b7ca2cd5e01b607b7ed610d13b1ac28b977d1d
GH-126910https://github.com/python/cpython/issues/126910
#146071https://github.com/python/cpython/pull/146071
c7b7ca2https://github.com/python/cpython/commit/c7b7ca2cd5e01b607b7ed610d13b1ac28b977d1d
diegorussohttps://github.com/diegorusso
on May 2, 2026https://github.com/python/cpython/issues/126910#event-25096901227
pythonGH-126910: Add GNU backtrace support for unwinding JIT frameshttps://github.com/diegorusso/cpython/commit/db967dca64f42597a7e8bcaabea886bb69a5d041
pythonGH-126910https://github.com/python/cpython/issues/126910
db967dchttps://github.com/diegorusso/cpython/commit/db967dca64f42597a7e8bcaabea886bb69a5d041
GH-126910: Add GNU backtrace support for unwinding JIT frames (#149104)https://github.com/python/cpython/commit/1e5d94274d5f49c5a1fb1bbabbe07e92edeb0028
GH-126910https://github.com/python/cpython/issues/126910
#149104https://github.com/python/cpython/pull/149104
1e5d942https://github.com/python/cpython/commit/1e5d94274d5f49c5a1fb1bbabbe07e92edeb0028
hugovkhttps://github.com/hugovk
on May 7, 2026https://github.com/python/cpython/issues/126910#event-25262180997
gh-126910: Update 3.15 what's new to include GDB/backtrace integration (https://github.com/python/cpython/commit/299cf3c4974262c63694195e605a66856c5a329a
gh-126910https://github.com/python/cpython/issues/126910
299cf3chttps://github.com/python/cpython/commit/299cf3c4974262c63694195e605a66856c5a329a
markshannonhttps://github.com/markshannon
on May 26, 2026https://github.com/python/cpython/issues/126910#event-25970778638
GH-126910: Make `_Py_get_machine_stack_pointer` return the actual sta…https://github.com/python/cpython/commit/a6793662e71f07d7c0ee3872316d93f3e8c48b34
GH-126910https://github.com/python/cpython/issues/126910
a679366https://github.com/python/cpython/commit/a6793662e71f07d7c0ee3872316d93f3e8c48b34
dylan-conwayhttps://github.com/dylan-conway
on Jul 23, 2026https://github.com/python/cpython/issues/126910#event-28406733085
crash_handler(windows): let foreign first-chance AVs reach SEH via JS…https://github.com/oven-sh/bun/commit/79ee451b661fbb2b4c57f7df52cf74d947e5f933
79ee451https://github.com/oven-sh/bun/commit/79ee451b661fbb2b4c57f7df52cf74d947e5f933
liooilhttps://github.com/liooil
on Aug 7, 2026https://github.com/python/cpython/issues/126910#event-29112265323
crash_handler(windows): let foreign first-chance AVs reach SEH via JS…https://github.com/liooil/poly/commit/c25451d4d6df5c1eb841a7c7def340d47869c55e
c25451dhttps://github.com/liooil/poly/commit/c25451d4d6df5c1eb841a7c7def340d47869c55e
Sign up for freehttps://github.com/signup?return_to=https://github.com/python/cpython/issues/126910
Sign in to commenthttps://github.com/login?return_to=https://github.com/python/cpython/issues/126910
brandtbucherhttps://github.com/brandtbucher
pablogsalhttps://github.com/pablogsal
3.14bugs and security fixeshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%223.14%22
interpreter-core(Objects, Python, Grammar, and Parser dirs)https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22interpreter-core%22
topic-JIThttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22topic-JIT%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.