-
-
Notifications
You must be signed in to change notification settings - Fork 34.6k
gh-149202: Fix frame pointer unwinding on s390x and ARM #149409
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
Changes from all commits
c68855d
ad2c814
242a58e
9b74182
efb829e
a612c88
955261c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -784,9 +784,11 @@ also be used to improve performance. | |
|
|
||
| Disable frame pointers, which are enabled by default (see :pep:`831`). | ||
|
|
||
| By default, the build appends ``-fno-omit-frame-pointer`` (and | ||
| ``-mno-omit-leaf-frame-pointer`` when the compiler supports it) to | ||
| ``BASECFLAGS`` so profilers, debuggers, and system tracing tools | ||
| By default, the build appends ``-fno-omit-frame-pointer``, | ||
| ``-mno-omit-leaf-frame-pointer`` when the compiler supports it, | ||
| ``-marm`` on 32-bit ARM when supported, and ``-mbackchain`` on s390 | ||
| platforms when supported, to ``BASECFLAGS`` so | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It may be useful to explain that |
||
| profilers, debuggers, and system tracing tools | ||
| (``perf``, ``eBPF``, ``dtrace``, ``gdb``) can walk the C call stack | ||
| without DWARF metadata. The flags propagate to third-party C | ||
| extensions through :mod:`sysconfig`. On compilers that do not | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -2486,6 +2486,17 @@ Build changes | |||||
| and :option:`-X dev <-X>` is passed to the Python or Python is built in :ref:`debug mode <debug-build>`. | ||||||
| (Contributed by Donghee Na in :gh:`141770`.) | ||||||
|
|
||||||
| .. _whatsnew315-frame-pointers: | ||||||
|
|
||||||
| * CPython is now built with frame pointers enabled by default | ||||||
| (:pep:`831`). Pass :option:`--without-frame-pointers` to opt out. | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| Authors of C extensions and native libraries built with custom build | ||||||
| systems should add ``-fno-omit-frame-pointer`` and | ||||||
| ``-mno-omit-leaf-frame-pointer`` to their own ``CFLAGS``, | ||||||
| ``-marm`` on 32-bit ARM, and ``-mbackchain`` on s390 platforms, | ||||||
| to keep the unwind chain intact. | ||||||
| (Contributed by Pablo Galindo Salgado and Savannah Ostrowski in :gh:`149201`.) | ||||||
|
|
||||||
| .. _whatsnew315-windows-tail-calling-interpreter: | ||||||
|
|
||||||
| * 64-bit builds using Visual Studio 2026 (MSVC 18) may now use the new | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,4 +1,5 @@ | ||||||
| Enable frame pointers by default for GCC-compatible CPython builds, including | ||||||
| ``-mno-omit-leaf-frame-pointer`` when the compiler supports it, so profilers | ||||||
| and debuggers can unwind native interpreter frames more reliably. Users can pass | ||||||
| ``-mno-omit-leaf-frame-pointer``, ``-marm`` on 32-bit ARM, and ``-mbackchain`` | ||||||
| on s390 platforms when the compiler supports them, so profilers and debuggers | ||||||
| can unwind native interpreter frames more reliably. Users can pass | ||||||
| ``--without-frame-pointers`` to opt out. | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
s390 refers to the old 32-bit platform which is no longer in use. You should write s390x to refer to the current 64-bit Linux platform. Same remark for the whole PR.