]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-137054: remove obsolete counting of objects in young generation under `Py_STATS...
authorSergey Miryanov <sergey.miryanov@gmail.com>
Thu, 24 Jul 2025 11:30:27 +0000 (04:30 -0700)
committerGitHub <noreply@github.com>
Thu, 24 Jul 2025 11:30:27 +0000 (17:00 +0530)
Python/gc.c

index 4160f68c27a3ef7c629d3ede1069409fb9f64f2b..255362705233056a7bc92b32842e3a7b4aeca2dc 100644 (file)
@@ -1331,15 +1331,6 @@ gc_collect_young(PyThreadState *tstate,
     PyGC_Head *visited = &gcstate->old[gcstate->visited_space].head;
     untrack_tuples(young);
     GC_STAT_ADD(0, collections, 1);
-#ifdef Py_STATS
-    {
-        Py_ssize_t count = 0;
-        PyGC_Head *gc;
-        for (gc = GC_NEXT(young); gc != young; gc = GC_NEXT(gc)) {
-            count++;
-        }
-    }
-#endif
 
     PyGC_Head survivors;
     gc_list_init(&survivors);