| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:0c56fb3b-18e0-6134-8784-24cfc509018f |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | C9B6:134C26:25B4C12:31C9D5E:696B1B92 |
| html-safe-nonce | 690fd13c47cf68c0aaf4919f0f2e0e0e57cab7b8891099aeec03c87c545609f2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDOUI2OjEzNEMyNjoyNUI0QzEyOjMxQzlENUU6Njk2QjFCOTIiLCJ2aXNpdG9yX2lkIjoiMTUzNTU1MDExODMyMjQ0NTIwMiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | edb8cfe870ef6e069523fc7b3ce1a7bfa372d42fa8a26c83f80e8a95cf4803dd |
| hovercard-subject-tag | pull_request:2929149458 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | ///pull_requests/show/files |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/python/cpython/pull/140359/files |
| twitter:image | https://avatars.githubusercontent.com/u/17569537?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/17569537?s=400&v=4 |
| og:image:alt | Fixes #140358
This code includes pycore_time.h in gc.c and times the run of _PyGC_Collect. If _PyGC_DEBUG_STATS, then we print the total time used:
E.g.
gc: done, 0 unreachable, 0 uncollectable, 0... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 82560a55c6b2054555076f46e683151ee28a19bc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| Skip to content | https://github.com/python/cpython/pull/140359/files#start-of-content |
|
| https://github.com/ |
|
Sign in
| https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F140359%2Ffiles |
| GitHub CopilotWrite better code with AI | https://github.com/features/copilot |
| GitHub SparkBuild and deploy intelligent apps | https://github.com/features/spark |
| GitHub ModelsManage and compare prompts | https://github.com/features/models |
| MCP RegistryNewIntegrate external tools | https://github.com/mcp |
| ActionsAutomate any workflow | https://github.com/features/actions |
| CodespacesInstant dev environments | https://github.com/features/codespaces |
| IssuesPlan and track work | https://github.com/features/issues |
| Code ReviewManage code changes | https://github.com/features/code-review |
| GitHub Advanced SecurityFind and fix vulnerabilities | https://github.com/security/advanced-security |
| Code securitySecure your code as you build | https://github.com/security/advanced-security/code-security |
| Secret protectionStop leaks before they start | https://github.com/security/advanced-security/secret-protection |
| Why GitHub | https://github.com/why-github |
| Documentation | https://docs.github.com |
| Blog | https://github.blog |
| Changelog | https://github.blog/changelog |
| Marketplace | https://github.com/marketplace |
| View all features | https://github.com/features |
| Enterprises | https://github.com/enterprise |
| Small and medium teams | https://github.com/team |
| Startups | https://github.com/enterprise/startups |
| Nonprofits | https://github.com/solutions/industry/nonprofits |
| App Modernization | https://github.com/solutions/use-case/app-modernization |
| DevSecOps | https://github.com/solutions/use-case/devsecops |
| DevOps | https://github.com/solutions/use-case/devops |
| CI/CD | https://github.com/solutions/use-case/ci-cd |
| View all use cases | https://github.com/solutions/use-case |
| Healthcare | https://github.com/solutions/industry/healthcare |
| Financial services | https://github.com/solutions/industry/financial-services |
| Manufacturing | https://github.com/solutions/industry/manufacturing |
| Government | https://github.com/solutions/industry/government |
| View all industries | https://github.com/solutions/industry |
| View all solutions | https://github.com/solutions |
| AI | https://github.com/resources/articles?topic=ai |
| Software Development | https://github.com/resources/articles?topic=software-development |
| DevOps | https://github.com/resources/articles?topic=devops |
| Security | https://github.com/resources/articles?topic=security |
| View all topics | https://github.com/resources/articles |
| Customer stories | https://github.com/customer-stories |
| Events & webinars | https://github.com/resources/events |
| Ebooks & reports | https://github.com/resources/whitepapers |
| Business insights | https://github.com/solutions/executive-insights |
| GitHub Skills | https://skills.github.com |
| Documentation | https://docs.github.com |
| Customer support | https://support.github.com |
| Community forum | https://github.com/orgs/community/discussions |
| Trust center | https://github.com/trust-center |
| Partners | https://github.com/partners |
| GitHub SponsorsFund open source developers | https://github.com/sponsors |
| Security Lab | https://securitylab.github.com |
| Maintainer Community | https://maintainers.github.com |
| Accelerator | https://github.com/accelerator |
| Archive Program | https://archiveprogram.github.com |
| Topics | https://github.com/topics |
| Trending | https://github.com/trending |
| Collections | https://github.com/collections |
| Enterprise platformAI-powered developer platform | https://github.com/enterprise |
| GitHub Advanced SecurityEnterprise-grade security features | https://github.com/security/advanced-security |
| Copilot for BusinessEnterprise-grade AI features | https://github.com/features/copilot/copilot-business |
| Premium SupportEnterprise-grade 24/7 support | https://github.com/premium-support |
| Pricing | https://github.com/pricing |
| Search syntax tips | https://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax |
| documentation | https://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax |
|
Sign in
| https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F140359%2Ffiles |
|
Sign up
| https://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=python%2Fcpython |
| Reload | https://github.com/python/cpython/pull/140359/files |
| Reload | https://github.com/python/cpython/pull/140359/files |
| Reload | https://github.com/python/cpython/pull/140359/files |
|
python
| https://github.com/python |
| cpython | https://github.com/python/cpython |
| Please reload this page | https://github.com/python/cpython/pull/140359/files |
|
Notifications
| https://github.com/login?return_to=%2Fpython%2Fcpython |
|
Fork
33.9k
| https://github.com/login?return_to=%2Fpython%2Fcpython |
|
Star
71.1k
| https://github.com/login?return_to=%2Fpython%2Fcpython |
|
Code
| https://github.com/python/cpython |
|
Issues
5k+
| https://github.com/python/cpython/issues |
|
Pull requests
2.1k
| https://github.com/python/cpython/pulls |
|
Actions
| https://github.com/python/cpython/actions |
|
Projects
31
| https://github.com/python/cpython/projects |
|
Security
Uh oh!
There was an error while loading. Please reload this page.
| https://github.com/python/cpython/security |
| Please reload this page | https://github.com/python/cpython/pull/140359/files |
|
Insights
| https://github.com/python/cpython/pulse |
|
Code
| https://github.com/python/cpython |
|
Issues
| https://github.com/python/cpython/issues |
|
Pull requests
| https://github.com/python/cpython/pulls |
|
Actions
| https://github.com/python/cpython/actions |
|
Projects
| https://github.com/python/cpython/projects |
|
Security
| https://github.com/python/cpython/security |
|
Insights
| https://github.com/python/cpython/pulse |
| Sign up for GitHub
| https://github.com/signup?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose |
| terms of service | https://docs.github.com/terms |
| privacy statement | https://docs.github.com/privacy |
| Sign in | https://github.com/login?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose |
| pablogsal | https://github.com/pablogsal |
| python:main | https://github.com/python/cpython/tree/main |
| pgdr:gc-elapsed-time | https://github.com/pgdr/cpython/tree/gc-elapsed-time |
|
Conversation
50
| https://github.com/python/cpython/pull/140359 |
|
Commits
14
| https://github.com/python/cpython/pull/140359/commits |
|
Checks
59
| https://github.com/python/cpython/pull/140359/checks |
|
Files changed
| https://github.com/python/cpython/pull/140359/files |
| Please reload this page | https://github.com/python/cpython/pull/140359/files |
|
gh-140358: Bring back elapsed time and unreachable count to gc debug output
| https://github.com/python/cpython/pull/140359/files#top |
|
Show all changes
14 commits
| https://github.com/python/cpython/pull/140359/files |
|
c2bf816
Bring back elapsed time and unreachable count to gc debug
pgdr Oct 19, 2025
| https://github.com/python/cpython/pull/140359/commits/c2bf816a757af2e43dc20299b842e90a5de906eb |
|
da96551
Add blurb for gc-elapsed-time
pgdr Oct 20, 2025
| https://github.com/python/cpython/pull/140359/commits/da965513cea7bf85985a99abb45b42b9ff775ad0 |
|
d6a6054
Remove accidentally added linebrak
pgdr Oct 20, 2025
| https://github.com/python/cpython/pull/140359/commits/d6a6054e5a6e28a9a4cb5d86ff0ede687e84ec79 |
|
38c1212
Initialize now under `if (gcstate->debug ...)` cond
pgdr Oct 20, 2025
| https://github.com/python/cpython/pull/140359/commits/38c12126350138ef49d44f8a8aeb59898036664e |
|
56c6eab
Fix backticks in blurb
pgdr Oct 20, 2025
| https://github.com/python/cpython/pull/140359/commits/56c6eab002c9aeea3c7c1de171d9693be1e8038c |
|
2a37cd4
Fix unreachable = collected + uncollectable.
pgdr Oct 20, 2025
| https://github.com/python/cpython/pull/140359/commits/2a37cd465668864a4788df0c41020710ec0589f1 |
|
456a38a
Rename now and endtime to t1,t2
pgdr Oct 20, 2025
| https://github.com/python/cpython/pull/140359/commits/456a38ac0737a15f4aea49a96e294dcdda6d591d |
|
60129b6
Fix mistake
pgdr Oct 20, 2025
| https://github.com/python/cpython/pull/140359/commits/60129b6daf9faed1c0adc09857a9cedb2cd87938 |
|
5db0a98
Use PerfCounter instead of monotonic
pgdr Oct 20, 2025
| https://github.com/python/cpython/pull/140359/commits/5db0a98cb5e51969c26a777d853308bd486d809f |
|
d54283b
Add test to check debug info written to stderr in gc
pgdr Oct 20, 2025
| https://github.com/python/cpython/pull/140359/commits/d54283b3426c37ead8010dc1abb27b46256bd30b |
|
3527d42
Use assertRegex for check debug stats
pgdr Oct 20, 2025
| https://github.com/python/cpython/pull/140359/commits/3527d42f61210953600df3d2c984e23b8462f032 |
|
9a4523b
Add decorator for skip if gil disabled
pgdr Oct 20, 2025
| https://github.com/python/cpython/pull/140359/commits/9a4523b0c4ba3ce7326f897320e2d88127a16265 |
|
4a18a47
Make lines shorter in test
pgdr Oct 20, 2025
| https://github.com/python/cpython/pull/140359/commits/4a18a471489c3135327a1e52edda5827788d1d34 |
|
48ca72a
Address review comments
pgdr Oct 20, 2025
| https://github.com/python/cpython/pull/140359/commits/48ca72af736022f7851ce6528e465dfd3d4cfe6d |
|
Clear filters
| https://github.com/python/cpython/pull/140359/files |
| Please reload this page | https://github.com/python/cpython/pull/140359/files |
| Please reload this page | https://github.com/python/cpython/pull/140359/files |
|
test_gc.py
| https://github.com/python/cpython/pull/140359/files#diff-9d9e863bd2a456b669ec9600be793699e861340d91d7c417a8a5b5b8cfbd09a7 |
|
2025-10-20-11-24-36.gh-issue-140358.UQuKdV.rst
| https://github.com/python/cpython/pull/140359/files#diff-b22f8df82771635de9f54f2d31757cd7c67cd670525b36110f6aa9cdf620e9e3 |
|
gc.c
| https://github.com/python/cpython/pull/140359/files#diff-a848a0ef178aa113a092e72403da0e344f37bd141bb90a7aa65015c77bfe7385 |
| Lib/test/test_gc.py | https://github.com/python/cpython/pull/140359/files#diff-9d9e863bd2a456b669ec9600be793699e861340d91d7c417a8a5b5b8cfbd09a7 |
|
View file
| https://github.com/pgdr/cpython/blob/48ca72af736022f7851ce6528e465dfd3d4cfe6d/Lib/test/test_gc.py |
|
Open in desktop
| https://desktop.github.com |
| https://github.co/hiddenchars |
| https://github.com/python/cpython/pull/140359/{{ revealButtonHref }} |
|
| https://github.com/python/cpython/pull/140359/files#diff-9d9e863bd2a456b669ec9600be793699e861340d91d7c417a8a5b5b8cfbd09a7 |
|
| https://github.com/python/cpython/pull/140359/files#diff-9d9e863bd2a456b669ec9600be793699e861340d91d7c417a8a5b5b8cfbd09a7 |
| Misc/NEWS.d/next/Core_and_Builtins/2025-10-20-11-24-36.gh-issue-140358.UQuKdV.rst | https://github.com/python/cpython/pull/140359/files#diff-b22f8df82771635de9f54f2d31757cd7c67cd670525b36110f6aa9cdf620e9e3 |
|
View file
| https://github.com/pgdr/cpython/blob/48ca72af736022f7851ce6528e465dfd3d4cfe6d/Misc/NEWS.d/next/Core_and_Builtins/2025-10-20-11-24-36.gh-issue-140358.UQuKdV.rst |
|
Open in desktop
| https://desktop.github.com |
| https://github.co/hiddenchars |
| https://github.com/python/cpython/pull/140359/{{ revealButtonHref }} |
| Please reload this page | https://github.com/python/cpython/pull/140359/files |
| Python/gc.c | https://github.com/python/cpython/pull/140359/files#diff-a848a0ef178aa113a092e72403da0e344f37bd141bb90a7aa65015c77bfe7385 |
|
View file
| https://github.com/pgdr/cpython/blob/48ca72af736022f7851ce6528e465dfd3d4cfe6d/Python/gc.c |
|
Open in desktop
| https://desktop.github.com |
| https://github.co/hiddenchars |
| https://github.com/python/cpython/pull/140359/{{ revealButtonHref }} |
|
| https://github.com/python/cpython/pull/140359/files#diff-a848a0ef178aa113a092e72403da0e344f37bd141bb90a7aa65015c77bfe7385 |
|
| https://github.com/python/cpython/pull/140359/files#diff-a848a0ef178aa113a092e72403da0e344f37bd141bb90a7aa65015c77bfe7385 |
|
| https://github.com/python/cpython/pull/140359/files#diff-a848a0ef178aa113a092e72403da0e344f37bd141bb90a7aa65015c77bfe7385 |
|
| https://github.com/python/cpython/pull/140359/files#diff-a848a0ef178aa113a092e72403da0e344f37bd141bb90a7aa65015c77bfe7385 |
| Please reload this page | https://github.com/python/cpython/pull/140359/files |
|
| https://github.com |
| Terms | https://docs.github.com/site-policy/github-terms/github-terms-of-service |
| Privacy | https://docs.github.com/site-policy/privacy-policies/github-privacy-statement |
| Security | https://github.com/security |
| Status | https://www.githubstatus.com/ |
| Community | https://github.community/ |
| Docs | https://docs.github.com/ |
| Contact | https://support.github.com?tags=dotcom-footer |