René's URL Explorer Experiment


Title: Preserve native profile events across specialized calls by youknowdot · Pull Request #9912 · RustPython/RustPython · GitHub

Open Graph Title: Preserve native profile events across specialized calls by youknowdot · Pull Request #9912 · RustPython/RustPython

X Title: Preserve native profile events across specialized calls by youknowdot · Pull Request #9912 · RustPython/RustPython

Description: Draft: validation pending Extract the independent legacy sys.setprofile native-call corrections from #9439, on main a7a8fab00. Original implementation/author from bd76a91e4 is preserved and credited in this extraction commit. Emit C events only for native functions and eligible method descriptors, not constructors, callable instances or slot wrappers. Bind method-descriptor event objects independently for call and return/exception. Route seven warmed native-call specializations through the existing vectorcall path while tracing. Do not modify shared bytecode/caches or introduce #9439's monitoring metadata/dispatch split. Preserve full descriptor type names and restore the canonical profile output test. Preserve the focused original regression group, adding positional sort() and repeated profile on/off cycles. Actual validation so far Extracted focused regression group passes on CPython 3.15.2, including warmup and three enable/disable cycles. Changed-file normal hooks, Rustfmt, Ruff and whitespace checks passed. Existing baseline RustPython reproduces the descriptor repr failure. It is not a matched new-main performance baseline. Independent source review found no blocking error in the reviewed extraction; its suggested positional sort and toggle probes are included. Exact-head follow-up validation (4347987) Matched main a7a8fab00 and candidate release binaries built with Rust 1.100, thin LTO and identical minimal stdlib/stdio/importlib/host_env/doc/threading features. First baseline job-2 build was killed with SIGKILL; job-1 retry and candidate build succeeded. Candidate focused native-event probe PASS; canonical test_profile + test_sys_setprofile PASS (36 tests, one pre-existing expected failure); complete stdlib_sys.py snippet PASS. Same-machine alternating 11-sample CPU-pinned wall-clock measurements: loop -2.05%, Python calls +0.44%, native calls -2.85%, generator +4.94%. Samples are noisy; the generator result requires another check and is not a no-regression claim. Earlier seven-sample generator result was -0.71%. Profiling-on workload is not equivalent work: baseline emits 101 native C-event pairs, candidate and CPython 3.15.2 emit 300. The observed +164% wall time cannot be interpreted as inactive-path overhead. Workspace Rust tests, strict Clippy and separate C-API checks are underway. Hosted CI and other-platform/WASI execution remain pending. CPU-time performance verification remains pending. This draft was published first at the owner's request. No merge-readiness or complete CPython profiling parity claim. Existing profile-callback error swallowing is outside this change. #9439 remains separate and still requires its own WASI stack-regression and monitoring performance work. This PR does not fix those issues. AI assistance OpenAI Codex assisted the original implementation, extraction and review. Exact model version is unavailable in this session and is not guessed. Review correction on 128a3ec Refresh cached tracing state after actual eval-breaker work, not on the ordinary untripped hot path. This handles signal/GC callbacks changing profiling before dispatch. Reproduced on 4347987: targeting a warmed positional append call with a signal enabled profiling before an actual append, but omitted its C events in 100/100 targeted deliveries. The corrected binary emits the expected pair in 100/100. General delivery probes match executed append count to C events; corrected RustPython and CPython 3.15.2 both pass 100 deliveries. Signal timing probes are external diagnostics, not flaky mandatory snippet tests. Platforms without POSIX interval signals were not tested locally. GC callback enable/disable and signal-handler exception unwind probes pass on corrected RustPython and CPython 3.15.2. Corrected release binary passes test_profile, test_sys_setprofile, test_sys_settrace, test_monitoring: 582 tests, 82 existing skips. Focused native-event tests and hooks pass. Full workspace/CAPI tests and strict Clippy passed on 4347987 (1597/21 ignored and 153/2 ignored respectively). Exact corrected-head reruns, corrected-head matched performance and fresh CI are pending. Keep draft until these gates finish.

Open Graph Description: Draft: validation pending Extract the independent legacy sys.setprofile native-call corrections from #9439, on main a7a8fab00. Original implementation/author from bd76a91e4 is preserved and credite...

X Description: Draft: validation pending Extract the independent legacy sys.setprofile native-call corrections from #9439, on main a7a8fab00. Original implementation/author from bd76a91e4 is preserved and credite...

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

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:c0e0b20b-3dba-7835-2460-9be1898b85a4
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idB3FE:21AC3F:40EED9A:52296E4:6B01FE4F
html-safe-nonce04b4257d6018138c24b6abd2b26eb656ef0d4c58c8c3c56fbfa6bffbbe21d395
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCM0ZFOjIxQUMzRjo0MEVFRDlBOjUyMjk2RTQ6NkIwMUZFNEYiLCJ2aXNpdG9yX2lkIjoiNTA4NDQxODQyNDY1NDkyMTI5NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac130e7726bf58a862e64039b443b19a00ce61e1bb4e0b6e9884a5d4c6f7423d8a
hovercard-subject-tagpull_request:5359907998
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/9912/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:altDraft: validation pending Extract the independent legacy sys.setprofile native-call corrections from #9439, on main a7a8fab00. Original implementation/author from bd76a91e4 is preserved and credite...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456
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
release423dbb54c5e7bfecc838eb387c1435eb3d0e760d
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/RustPython/RustPython/pull/9912/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FRustPython%2FRustPython%2Fpull%2F9912%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%2F9912%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/9912/files
Reloadhttps://github.com/RustPython/RustPython/pull/9912/files
Reloadhttps://github.com/RustPython/RustPython/pull/9912/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:fix/native-profile-events-20261117https://github.com/youknowdot/RustPython/tree/fix/native-profile-events-20261117
Conversation 5 https://github.com/RustPython/RustPython/pull/9912
Commits 1 https://github.com/RustPython/RustPython/pull/9912/commits
Checks 20 https://github.com/RustPython/RustPython/pull/9912/checks
Files changed https://github.com/RustPython/RustPython/pull/9912/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9912/files
Preserve native profile events across specialized calls https://github.com/RustPython/RustPython/pull/9912/files#top
Show all changes 1 commit https://github.com/RustPython/RustPython/pull/9912/files
4347987 Preserve native profile events without monitoring dispatch changes youknowdot Nov 17, 2026 https://github.com/RustPython/RustPython/pull/9912/commits/43479875f3451705321b8eb5e8d5cd5fb1e7ff75
Clear filters https://github.com/RustPython/RustPython/pull/9912/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9912/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9912/files
test_profile.py https://github.com/RustPython/RustPython/pull/9912/files#diff-9333fec95c6af8c2c31ee9375aa9ee4c7e1715a31f685251657b3e97e309767d
descriptor.rs https://github.com/RustPython/RustPython/pull/9912/files#diff-7c8850ad317bf0c33b339610ec3e80a4038cd37545ba20746f8e680d87931b8e
frame.rs https://github.com/RustPython/RustPython/pull/9912/files#diff-03f2741d7d424014f3d2f0c82226be52fa58134aab34bf0780714ee67a248deb
callable.rs https://github.com/RustPython/RustPython/pull/9912/files#diff-c628df2d1e9da9a44072436e1be957a381d2755ff2456d3474c1eca1debf4ff3
stdlib_sys.py https://github.com/RustPython/RustPython/pull/9912/files#diff-fd9bcddc1221ad047d9d5280805f530b9186fcc9e293c80fbc1f4a69f99bc976
Lib/test/test_profile.pyhttps://github.com/RustPython/RustPython/pull/9912/files#diff-9333fec95c6af8c2c31ee9375aa9ee4c7e1715a31f685251657b3e97e309767d
View file https://github.com/youknowdot/RustPython/blob/43479875f3451705321b8eb5e8d5cd5fb1e7ff75/Lib/test/test_profile.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/9912/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/9912/files#diff-9333fec95c6af8c2c31ee9375aa9ee4c7e1715a31f685251657b3e97e309767d
https://github.com/RustPython/RustPython/pull/9912/files#diff-9333fec95c6af8c2c31ee9375aa9ee4c7e1715a31f685251657b3e97e309767d
crates/vm/src/builtins/descriptor.rshttps://github.com/RustPython/RustPython/pull/9912/files#diff-7c8850ad317bf0c33b339610ec3e80a4038cd37545ba20746f8e680d87931b8e
View file https://github.com/youknowdot/RustPython/blob/43479875f3451705321b8eb5e8d5cd5fb1e7ff75/crates/vm/src/builtins/descriptor.rs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/9912/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/9912/files#diff-7c8850ad317bf0c33b339610ec3e80a4038cd37545ba20746f8e680d87931b8e
https://github.com/RustPython/RustPython/pull/9912/files#diff-7c8850ad317bf0c33b339610ec3e80a4038cd37545ba20746f8e680d87931b8e
crates/vm/src/frame.rshttps://github.com/RustPython/RustPython/pull/9912/files#diff-03f2741d7d424014f3d2f0c82226be52fa58134aab34bf0780714ee67a248deb
View file https://github.com/youknowdot/RustPython/blob/43479875f3451705321b8eb5e8d5cd5fb1e7ff75/crates/vm/src/frame.rs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/9912/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/9912/files#diff-03f2741d7d424014f3d2f0c82226be52fa58134aab34bf0780714ee67a248deb
coderabbitaihttps://github.com/apps/coderabbitai
Nov 17, 2026https://github.com/RustPython/RustPython/pull/9912/files#r4601987508
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9912/files
https://github.com/RustPython/RustPython/pull/9912/files#diff-03f2741d7d424014f3d2f0c82226be52fa58134aab34bf0780714ee67a248deb
crates/vm/src/protocol/callable.rshttps://github.com/RustPython/RustPython/pull/9912/files#diff-c628df2d1e9da9a44072436e1be957a381d2755ff2456d3474c1eca1debf4ff3
View file https://github.com/youknowdot/RustPython/blob/43479875f3451705321b8eb5e8d5cd5fb1e7ff75/crates/vm/src/protocol/callable.rs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/9912/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/9912/files#diff-c628df2d1e9da9a44072436e1be957a381d2755ff2456d3474c1eca1debf4ff3
https://github.com/RustPython/RustPython/pull/9912/files#diff-c628df2d1e9da9a44072436e1be957a381d2755ff2456d3474c1eca1debf4ff3
https://github.com/RustPython/RustPython/pull/9912/files#diff-c628df2d1e9da9a44072436e1be957a381d2755ff2456d3474c1eca1debf4ff3
https://github.com/RustPython/RustPython/pull/9912/files#diff-c628df2d1e9da9a44072436e1be957a381d2755ff2456d3474c1eca1debf4ff3
https://github.com/RustPython/RustPython/pull/9912/files#diff-c628df2d1e9da9a44072436e1be957a381d2755ff2456d3474c1eca1debf4ff3
extra_tests/snippets/stdlib_sys.pyhttps://github.com/RustPython/RustPython/pull/9912/files#diff-fd9bcddc1221ad047d9d5280805f530b9186fcc9e293c80fbc1f4a69f99bc976
View file https://github.com/youknowdot/RustPython/blob/43479875f3451705321b8eb5e8d5cd5fb1e7ff75/extra_tests/snippets/stdlib_sys.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/9912/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/9912/files#diff-fd9bcddc1221ad047d9d5280805f530b9186fcc9e293c80fbc1f4a69f99bc976
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9912/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.