Skip to content

Commit 8be49b5

Browse files
authored
Remove local GC allocation count flush in pystate.c
Removed flushing of thread's local GC allocation count before thread state deletion.
1 parent 8d01b65 commit 8be49b5

1 file changed

Lines changed: 0 additions & 8 deletions

File tree

Python/pystate.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1810,14 +1810,6 @@ tstate_delete_common(PyThreadState *tstate, int release_gil)
18101810
assert(tstate_impl->refcounts.values == NULL);
18111811
#endif
18121812

1813-
#ifdef Py_GIL_DISABLED
1814-
// Flush the thread's local GC allocation count to the global count
1815-
// before the thread state is deleted, otherwise the count is lost.
1816-
_Py_atomic_add_int(&tstate->interp->gc.young.count,
1817-
(int)tstate_impl->gc.alloc_count);
1818-
tstate_impl->gc.alloc_count = 0;
1819-
#endif
1820-
18211813
#if _Py_TIER2
18221814
_PyThreadStateImpl *_tstate = (_PyThreadStateImpl *)tstate;
18231815
if (_tstate->jit_tracer_state.code_buffer != NULL) {

0 commit comments

Comments
 (0)