Skip to content

Commit bb950c2

Browse files
committed
Log executor refcount and GC links
1 parent cf6deac commit bb950c2

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Python/optimizer.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,13 @@ _PyOptimizer_Optimize(
193193
} else {
194194
// An executor inserted into the code object now has a strong reference
195195
// to it from the code object. Thus, we don't need this reference anymore.
196+
PyGC_Head *gc = ((PyGC_Head*)executor) - 1;
197+
printf("DEBUG: executor=%p, refcnt=%zd, gc_next=%p, gc_prev=%p\n",
198+
(void*)executor,
199+
Py_REFCNT(executor),
200+
(void*)(gc->_gc_next),
201+
(void*)(gc->_gc_prev));
202+
fflush(stdout);
196203
Py_DECREF(executor);
197204
}
198205
interp->compiling = false;

0 commit comments

Comments
 (0)