]> granicus.if.org Git - python/commitdiff
Issue #4687: Fix accuracy of garbage collection runtimes displayed with
authorAntoine Pitrou <solipsis@pitrou.net>
Sun, 2 May 2010 19:51:14 +0000 (19:51 +0000)
committerAntoine Pitrou <solipsis@pitrou.net>
Sun, 2 May 2010 19:51:14 +0000 (19:51 +0000)
gc.DEBUG_STATS.

Misc/NEWS
Modules/gcmodule.c

index c75f95c90b866c0f0ca21a42563ede88c1ff6865..18f0d3d44b16232e0d5a68d84983b9070f9139ca 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -31,6 +31,9 @@ Core and Builtins
 Library
 -------
 
+- Issue #4687: Fix accuracy of garbage collection runtimes displayed with
+  gc.DEBUG_STATS.
+
 - Issue #7192: webbrowser.get("firefox") now wors on Mac OS X, as does
   webbrowser.get("safari").
 
index 6c323edd720087f75f2a1086997e01ea8e58d1f9..fd339961e4577ece808d86aa1947032e3704aca0 100644 (file)
@@ -837,13 +837,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");
        }