https://github.com/python/cpython/commit/e93c30d4666f925c6a5a2cc4952f69782760d101
commit: e93c30d4666f925c6a5a2cc4952f69782760d101
branch: main
author: Sergey Miryanov <[email protected]>
committer: kumaraditya303 <[email protected]>
date: 2025-07-24T17:00:27+05:30
summary:
gh-137054: remove obsolete counting of objects in young generation under
`Py_STATS` builds (#137055)
files:
M Python/gc.c
diff --git a/Python/gc.c b/Python/gc.c
index 4160f68c27a3ef..25536270523305 100644
--- a/Python/gc.c
+++ b/Python/gc.c
@@ -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);
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]