Skip to content

gh-140358: Bring back elapsed time and unreachable count to gc debug output#140359

Merged
pablogsal merged 14 commits intopython:mainfrom
pgdr:gc-elapsed-time
Oct 20, 2025
Merged

gh-140358: Bring back elapsed time and unreachable count to gc debug output#140359
pablogsal merged 14 commits intopython:mainfrom
pgdr:gc-elapsed-time

Conversation

@pgdr
Copy link
Contributor

@pgdr pgdr commented Oct 20, 2025

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.0741s elapsed

See also discussion at elapsed time debugging in gc.c at discuss.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bring back elapsed time debugging in gc.c

5 participants