diff --git a/Misc/NEWS b/Misc/NEWS index 54145128c2e..b15d03c90ef 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -40,6 +40,9 @@ Core and Builtins Library ------- +- Issue #4687: Fix accuracy of garbage collection runtimes displayed with + gc.DEBUG_STATS. + - Issue #8464: tarfile no longer creates files with execute permissions set when mode="w|" is used. diff --git a/Modules/gcmodule.c b/Modules/gcmodule.c index 1b5cf89ba62..30587244321 100644 --- a/Modules/gcmodule.c +++ b/Modules/gcmodule.c @@ -804,13 +804,13 @@ collect(int generation) } if (debug & DEBUG_STATS) { - t1 = get_time(); PySys_WriteStderr("gc: collecting generation %d...\n", generation); PySys_WriteStderr("gc: objects in each generation:"); for (i = 0; i < NUM_GENERATIONS; i++) PySys_WriteStderr(" %" PY_FORMAT_SIZE_T "d", gc_list_size(GEN_HEAD(i))); + t1 = get_time(); PySys_WriteStderr("\n"); }