Skip to content

Bring back elapsed time debugging in gc.c #140358

@pgdr

Description

@pgdr

Feature or enhancement

Proposal:

In "GH-108362: Incremental GC implementation" (#116206), it seems to me that the elapsed time debug information disappeared.

This change took effect in Python 3.14.

Is it possible to get back that piece of debug information?

In Python 3.13 with gc.DEBUG_STATS you would get information like this:

gc: collecting generation 2...
gc: objects in each generation: 1473 0 5043
gc: objects in permanent generation: 0
gc: done, 0 unreachable, 0 uncollectable, 0.0236s elapsed

whereas in Python 3.14:

gc: collecting generation 2...
gc: objects in each generation: 1394 5072 248
gc: objects in permanent generation: 0

Ps., I believe that it is commit 1530932 that removes the elapsed time functionality, but I might be wrong.

Has this already been discussed elsewhere?

I have already discussed this feature proposal on Discourse

Links to previous discussion of this feature:

https://discuss.python.org/t/elapsed-time-debugging-in-gc-c/104396

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.14bugs and security fixes3.15new features, bugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions