gh-137054: remove obsolete counting of objects in young generation under Py_STATS builds (#137055)

This commit is contained in:
Sergey Miryanov 2025-07-24 04:30:27 -07:00 committed by GitHub
parent ec02db5caa
commit e93c30d466
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View 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);