René's URL Explorer Experiment


Title: Update sampling profiler to CPython 3.15.2 with binary lifecycle fixes by youknowdot · Pull Request #9900 · RustPython/RustPython · GitHub

Open Graph Title: Update sampling profiler to CPython 3.15.2 with binary lifecycle fixes by youknowdot · Pull Request #9900 · RustPython/RustPython

X Title: Update sampling profiler to CPython 3.15.2 with binary lifecycle fixes by youknowdot · Pull Request #9900 · RustPython/RustPython

Description: Summary Update the sampling-profiler library and canonical tests with scripts/update_lib from CPython v3.15.2, together with the native binary-format changes required by the updated library. No dependency/CI/C-API changes. The unrelated tracing-profiler test refresh is deferred. Distinguish a recoverable binary format limit from a broken writer. Expose limit_reached; do not swallow arbitrary callback OverflowError. Finalize valid samples already committed before a format limit or an exception outside the writer. Failed finalization makes the writer broken. Buffer the file header like CPython's buffered stdio, without special-casing /dev/full. Bound RLE replay batches to 8192 timestamps. Preserve lock-free Python callbacks and protect replacement writers across close/reinitialization. Bring in upstream collector/export, source-file decoding, differential flamegraph scaling and sync-coordinator fixes with their canonical tests. Native semantics were compared with CPython v3.15.2 module.c, binary_io_writer.c, and binary_io_reader.c. Safety boundary Generation checks deliberately reject a write whose callback closed or replaced its writer, and never mark a replacement writer broken for the old call's exception. Isolated CPython reference probes exposed a crash on close-and-raise and replacement-state poisoning on reinitialize-and-raise. Those unsafe behaviors are not reproduced. This is an explicit safety divergence, not a claim of exact adversarial-reentry compatibility. Ordinary partial-commit/finalize behavior follows the canonical tests. Verification Fresh RustPython release build and formatting check passed. Targeted cargo clippy --release -p rustpython-stdlib --lib --no-default-features --features compiler,threading,host_env,doc -- -D warnings passed. This is not full-workspace/C-API Clippy. test_profiling: 480 tests run, 88 skipped, passed with one existing forkserver case excluded by runner because local AF_UNIX creation is denied. That environment failure also reproduces on the unchanged baseline; no skip/xfail was added for it. The new deep flamegraph test has one explicit expected failure: RustPython's native-stack guard still prevents a 1536-frame export on a 1 MiB stack. Assertions remain canonical. CPython 3.15.2 canonical heatmap/collector/binary-format/sync-coordinator reference: 250 tests, zero skips, passed. Close/reinitialize callback probes: no crash/deadlock; replacement writer remains usable. Nested caught-error behavior was separately compared with CPython. Full Rust workspace/C-API suites, cross-platform runs and real live-process sampling were not run locally. Disk was constrained and unrelated builds were preserved. CI remains required; this is a draft. Narrow local performance measurements Seven alternating release-binary pairs, 500,000 write_sample calls per case: Case Baseline median Candidate median Change Repeated identical stack 0.5452 s 0.5565 s +2.1% Changing stack 0.6408 s 0.6200 s -3.2% These narrow local results include filesystem and timing noise; they do not establish a general speedup or a zero-regression guarantee.

Open Graph Description: Summary Update the sampling-profiler library and canonical tests with scripts/update_lib from CPython v3.15.2, together with the native binary-format changes required by the updated library. No dep...

X Description: Summary Update the sampling-profiler library and canonical tests with scripts/update_lib from CPython v3.15.2, together with the native binary-format changes required by the updated library. No dep...

Opengraph URL: https://github.com/RustPython/RustPython/pull/9900

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:476e3a0f-2a5b-e9ec-9a2a-36bd3448c1c9
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idB028:14F601:3990D76:48FEDF9:6B01DE56
html-safe-nonceacdd73ba2cda182750e62ee9617cc3a10586fbc4d2e30226bb90486672835641
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMDI4OjE0RjYwMTozOTkwRDc2OjQ4RkVERjk6NkIwMURFNTYiLCJ2aXNpdG9yX2lkIjoiNDE5NTU4MTAxMTUzNjUwMjM1OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmace141eae347ac4e55832ee8233d481d142e8ef75ab335fa1d0fa449f139bea13b
hovercard-subject-tagpull_request:5349913316
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/RustPython/RustPython/pull/9900/files
twitter:imagehttps://avatars.githubusercontent.com/u/336763669?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/336763669?s=400&v=4
og:image:altSummary Update the sampling-profiler library and canonical tests with scripts/update_lib from CPython v3.15.2, together with the native binary-format changes required by the updated library. No dep...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/RustPython/RustPython git https://github.com/RustPython/RustPython.git
octolytics-dimension-user_id39710557
octolytics-dimension-user_loginRustPython
octolytics-dimension-repository_id135201145
octolytics-dimension-repository_nwoRustPython/RustPython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id135201145
octolytics-dimension-repository_network_root_nwoRustPython/RustPython
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/RustPython/RustPython/pull/9900/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FRustPython%2FRustPython%2Fpull%2F9900%2Ffiles
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%2FRustPython%2FRustPython%2Fpull%2F9900%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=RustPython%2FRustPython
Reloadhttps://github.com/RustPython/RustPython/pull/9900/files
Reloadhttps://github.com/RustPython/RustPython/pull/9900/files
Reloadhttps://github.com/RustPython/RustPython/pull/9900/files
RustPythonhttps://github.com/RustPython
RustPythonhttps://github.com/RustPython/RustPython
Codehttps://github.com/RustPython/RustPython
Issues195 (195)https://github.com/RustPython/RustPython/issues
Pull requests133 (133)https://github.com/RustPython/RustPython/pulls
Discussionshttps://github.com/RustPython/RustPython/discussions
Actionshttps://github.com/RustPython/RustPython/actions
Projectshttps://github.com/RustPython/RustPython/projects
Wikihttps://github.com/RustPython/RustPython/wiki
Security and qualityhttps://github.com/RustPython/RustPython/security
Insightshttps://github.com/RustPython/RustPython/insights
Sign up for GitHub https://github.com/signup?return_to=%2FRustPython%2FRustPython%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2FRustPython%2FRustPython%2Fissues%2Fnew%2Fchoose
youknowonehttps://github.com/youknowone
RustPython:mainhttps://github.com/RustPython/RustPython/tree/main
youknowdot:update/profiling-3152-20261117https://github.com/youknowdot/RustPython/tree/update/profiling-3152-20261117
Conversation 5 https://github.com/RustPython/RustPython/pull/9900
Commits 1 https://github.com/RustPython/RustPython/pull/9900/commits
Checks 20 https://github.com/RustPython/RustPython/pull/9900/checks
Files changed https://github.com/RustPython/RustPython/pull/9900/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9900/files
Update sampling profiler to CPython 3.15.2 with binary lifecycle fixes https://github.com/RustPython/RustPython/pull/9900/files#top
Show all changes 1 commit https://github.com/RustPython/RustPython/pull/9900/files
c0d1634 Update sampling profiler to CPython 3.15.2 with binary lifecycle fixes codex Nov 17, 2026 https://github.com/RustPython/RustPython/pull/9900/commits/c0d163473c76ef98ba231591bac4879d33287c08
Clear filters https://github.com/RustPython/RustPython/pull/9900/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9900/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9900/files
_sync_coordinator.py https://github.com/RustPython/RustPython/pull/9900/files#diff-496a56cbf46dca9709481d9f49c62a2b45ec0084c73423961567988d06ae5feb
binary_collector.py https://github.com/RustPython/RustPython/pull/9900/files#diff-a3d116f2be5cbba8aa1d275a08c6e98d50ee72557bfaac3262adc84c3a817aaf
heatmap_collector.py https://github.com/RustPython/RustPython/pull/9900/files#diff-021c40f9b326436e86e4fa86ec9fcd43a9720e7274ca72fa42e3a76f798d0dc9
stack_collector.py https://github.com/RustPython/RustPython/pull/9900/files#diff-30798ab579c76386ef4bc482ff5d57ec1b76978d34b3fd2556a158ddc0fb941e
test_heatmap.py https://github.com/RustPython/RustPython/pull/9900/files#diff-e24ef7aaec8482165e2969d7eadab80118746e549c406e18efdd0d7ecd541ebf
mocks.py https://github.com/RustPython/RustPython/pull/9900/files#diff-86b995f17112ac0610d8ad2d4dda367fbbc101d5630004317b12fab01376724a
test_binary_format.py https://github.com/RustPython/RustPython/pull/9900/files#diff-bd4b914717c4ce7ddb2e29a91a71fdba550983ce9cea09b1ee06847b128d71b6
test_blocking.py https://github.com/RustPython/RustPython/pull/9900/files#diff-3476c860d571d634be0a2ef95b5047698c4a2b25363f9909a25288353105c66d
test_children.py https://github.com/RustPython/RustPython/pull/9900/files#diff-7e9fec5e21826697b97ad17df5583ca56837d23f5ea1856c5a4e80dec1b18899
test_collectors.py https://github.com/RustPython/RustPython/pull/9900/files#diff-8436f3f406ad4ede0e395a9a742e325aee99447b5cdac2a56839230c0e519bd2
test_sync_coordinator.py https://github.com/RustPython/RustPython/pull/9900/files#diff-2c17eaf2bac3cc3b638f7a18fdea2cf5a406a1c42e82c59da7f2b453d8f91dbd
_remote_debugging.rs https://github.com/RustPython/RustPython/pull/9900/files#diff-85457703ae6447f77c6323feabb7aa64c4839208de2ee7d6e27ad419207feba2
binary.rs https://github.com/RustPython/RustPython/pull/9900/files#diff-d57b4b6dd5011ee0c5de816a8ad1c97ce9ff7b1a1c42ba6fc18ecab2f0f224c1
Lib/profiling/sampling/_sync_coordinator.pyhttps://github.com/RustPython/RustPython/pull/9900/files#diff-496a56cbf46dca9709481d9f49c62a2b45ec0084c73423961567988d06ae5feb
View file https://github.com/youknowdot/RustPython/blob/c0d163473c76ef98ba231591bac4879d33287c08/Lib/profiling/sampling/_sync_coordinator.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/9900/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/9900/files#diff-496a56cbf46dca9709481d9f49c62a2b45ec0084c73423961567988d06ae5feb
https://github.com/RustPython/RustPython/pull/9900/files#diff-496a56cbf46dca9709481d9f49c62a2b45ec0084c73423961567988d06ae5feb
Lib/profiling/sampling/binary_collector.pyhttps://github.com/RustPython/RustPython/pull/9900/files#diff-a3d116f2be5cbba8aa1d275a08c6e98d50ee72557bfaac3262adc84c3a817aaf
View file https://github.com/youknowdot/RustPython/blob/c0d163473c76ef98ba231591bac4879d33287c08/Lib/profiling/sampling/binary_collector.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/9900/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/9900/files#diff-a3d116f2be5cbba8aa1d275a08c6e98d50ee72557bfaac3262adc84c3a817aaf
https://github.com/RustPython/RustPython/pull/9900/files#diff-a3d116f2be5cbba8aa1d275a08c6e98d50ee72557bfaac3262adc84c3a817aaf
https://github.com/RustPython/RustPython/pull/9900/files#diff-a3d116f2be5cbba8aa1d275a08c6e98d50ee72557bfaac3262adc84c3a817aaf
https://github.com/RustPython/RustPython/pull/9900/files#diff-a3d116f2be5cbba8aa1d275a08c6e98d50ee72557bfaac3262adc84c3a817aaf
https://github.com/RustPython/RustPython/pull/9900/files#diff-a3d116f2be5cbba8aa1d275a08c6e98d50ee72557bfaac3262adc84c3a817aaf
Lib/profiling/sampling/heatmap_collector.pyhttps://github.com/RustPython/RustPython/pull/9900/files#diff-021c40f9b326436e86e4fa86ec9fcd43a9720e7274ca72fa42e3a76f798d0dc9
View file https://github.com/youknowdot/RustPython/blob/c0d163473c76ef98ba231591bac4879d33287c08/Lib/profiling/sampling/heatmap_collector.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/9900/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/9900/files#diff-021c40f9b326436e86e4fa86ec9fcd43a9720e7274ca72fa42e3a76f798d0dc9
https://github.com/RustPython/RustPython/pull/9900/files#diff-021c40f9b326436e86e4fa86ec9fcd43a9720e7274ca72fa42e3a76f798d0dc9
Lib/profiling/sampling/stack_collector.pyhttps://github.com/RustPython/RustPython/pull/9900/files#diff-30798ab579c76386ef4bc482ff5d57ec1b76978d34b3fd2556a158ddc0fb941e
View file https://github.com/youknowdot/RustPython/blob/c0d163473c76ef98ba231591bac4879d33287c08/Lib/profiling/sampling/stack_collector.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/9900/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/9900/files#diff-30798ab579c76386ef4bc482ff5d57ec1b76978d34b3fd2556a158ddc0fb941e
https://github.com/RustPython/RustPython/pull/9900/files#diff-30798ab579c76386ef4bc482ff5d57ec1b76978d34b3fd2556a158ddc0fb941e
https://github.com/RustPython/RustPython/pull/9900/files#diff-30798ab579c76386ef4bc482ff5d57ec1b76978d34b3fd2556a158ddc0fb941e
https://github.com/RustPython/RustPython/pull/9900/files#diff-30798ab579c76386ef4bc482ff5d57ec1b76978d34b3fd2556a158ddc0fb941e
https://github.com/RustPython/RustPython/pull/9900/files#diff-30798ab579c76386ef4bc482ff5d57ec1b76978d34b3fd2556a158ddc0fb941e
https://github.com/RustPython/RustPython/pull/9900/files#diff-30798ab579c76386ef4bc482ff5d57ec1b76978d34b3fd2556a158ddc0fb941e
https://github.com/RustPython/RustPython/pull/9900/files#diff-30798ab579c76386ef4bc482ff5d57ec1b76978d34b3fd2556a158ddc0fb941e
https://github.com/RustPython/RustPython/pull/9900/files#diff-30798ab579c76386ef4bc482ff5d57ec1b76978d34b3fd2556a158ddc0fb941e
https://github.com/RustPython/RustPython/pull/9900/files#diff-30798ab579c76386ef4bc482ff5d57ec1b76978d34b3fd2556a158ddc0fb941e
https://github.com/RustPython/RustPython/pull/9900/files#diff-30798ab579c76386ef4bc482ff5d57ec1b76978d34b3fd2556a158ddc0fb941e
Lib/test/test_profiling/test_heatmap.pyhttps://github.com/RustPython/RustPython/pull/9900/files#diff-e24ef7aaec8482165e2969d7eadab80118746e549c406e18efdd0d7ecd541ebf
View file https://github.com/youknowdot/RustPython/blob/c0d163473c76ef98ba231591bac4879d33287c08/Lib/test/test_profiling/test_heatmap.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/9900/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/9900/files#diff-e24ef7aaec8482165e2969d7eadab80118746e549c406e18efdd0d7ecd541ebf
https://github.com/RustPython/RustPython/pull/9900/files#diff-e24ef7aaec8482165e2969d7eadab80118746e549c406e18efdd0d7ecd541ebf
https://github.com/RustPython/RustPython/pull/9900/files#diff-e24ef7aaec8482165e2969d7eadab80118746e549c406e18efdd0d7ecd541ebf
https://github.com/RustPython/RustPython/pull/9900/files#diff-e24ef7aaec8482165e2969d7eadab80118746e549c406e18efdd0d7ecd541ebf
Lib/test/test_profiling/test_sampling_profiler/mocks.pyhttps://github.com/RustPython/RustPython/pull/9900/files#diff-86b995f17112ac0610d8ad2d4dda367fbbc101d5630004317b12fab01376724a
View file https://github.com/youknowdot/RustPython/blob/c0d163473c76ef98ba231591bac4879d33287c08/Lib/test/test_profiling/test_sampling_profiler/mocks.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/9900/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/9900/files#diff-86b995f17112ac0610d8ad2d4dda367fbbc101d5630004317b12fab01376724a
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9900/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9900/files
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.