chore(profiling): native C++/Rust py3.15 ABI support - #18503
Closed
vlad-scherbich wants to merge 1 commit into
Closed
chore(profiling): native C++/Rust py3.15 ABI support#18503vlad-scherbich wants to merge 1 commit into
vlad-scherbich wants to merge 1 commit into
Conversation
Contributor
|
BenchmarksBenchmark execution time: 2026-06-08 13:09:29 Comparing candidate commit 6abf4b7 in PR branch Found 0 performance improvements and 2 performance regressions! Performance is the same for 621 metrics, 9 unstable metrics. scenario:iastaspectsospath-ospathbasename_aspect
scenario:span-start
|
Contributor
|
This pull request has been automatically closed after a period of inactivity. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
← Prev: #18488 | Next → #18504
PROF-14200
Description
Updates the native C++/Rust stack profiler for CPython 3.15 ABI changes.
CPython 3.15 made two breaking changes to internal frame structures:
PyFrameStateenum fully renumbered (all values changed;FRAME_COMPLETEDremoved)FRAME_OWNED_BY_CSTACKremoved from_frameownerEchion (
frame.cc,tasks.h):_frameowner(nodefault:—-Wswitchfires on new values)FRAME_OWNED_BY_CSTACKcompiled out on 3.15+is_entryassignment for 3.15+ / 3.12–3.14 / pre-3.12tasks.h:PyGen_yfupdated for renumberedgi_frame_statevaluesNew compile-time regression guards (
test_cpython_layout_contracts.cpp):static_asserts for every CPython enum Echion depends on, covering 3.11–3.15+. Fires at build time if CPython renumbers or removes a value in a future release.New runtime gtest (
test_frame_state_315.cpp):Validates
PyGen_yfbehavior under all 3.15 frame states, includingFRAME_SUSPENDED_YIELD_FROM_LOCKED(free-threaded builds).Build system (cmake):
NativeHeaders.cmake: new module that locates CPython internal headers for gtest targetsFindLibNative.cmake,ddup/CMakeLists.txt,stack/CMakeLists.txt,fuzz/CMakeLists.txt: consumeNativeHeaderssample.cpp: includePython.hbefore system headers to avoid_POSIX_C_SOURCEredefinition on Linux aarch64 with 3.15'spyconfig.hRust / crashtracker:
crashtracker_runtime_stacks.rs,crashtracker.rs: gatePyFrame_GetBackon 3.14+ andPy_LIMITED_APItracer_flare.rs: cargo fmt / style cleanupTesting
CI:
profiling_nativematrix (sanitizers, valgrind) on py3.15.Local:
test_frame_state_315: 6 tests passedtest_cpython_layout_contracts: 2 tests passedRisks
Additional Notes
Part of the Python 3.15 support stack. Relates to #17809.