Skip to content

Commit 94da963

Browse files
committed
Remove lazy dict tracking from no-gil build
1 parent 3c18fc8 commit 94da963

File tree

3 files changed

+2
-11
lines changed

3 files changed

+2
-11
lines changed

Include/internal/pycore_dict.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@ extern int _PyDict_Next(
4343

4444
extern int _PyDict_HasOnlyStringKeys(PyObject *mp);
4545

46-
extern void _PyDict_MaybeUntrack(PyObject *mp);
47-
4846
// Export for '_ctypes' shared extension
4947
PyAPI_FUNC(Py_ssize_t) _PyDict_SizeOf(PyDictObject *);
5048

Python/gc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include "Python.h"
66
#include "pycore_ceval.h" // _Py_set_eval_breaker_bit()
77
#include "pycore_context.h"
8-
#include "pycore_dict.h" // _PyDict_MaybeUntrack()
8+
#include "pycore_dict.h" // _PyInlineValuesSize()
99
#include "pycore_initconfig.h"
1010
#include "pycore_interp.h" // PyInterpreterState.gc
1111
#include "pycore_object.h"

Python/gc_free_threading.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#include "pycore_brc.h" // struct _brc_thread_state
44
#include "pycore_ceval.h" // _Py_set_eval_breaker_bit()
55
#include "pycore_context.h"
6-
#include "pycore_dict.h" // _PyDict_MaybeUntrack()
6+
#include "pycore_dict.h" // _PyInlineValuesSize()
77
#include "pycore_freelist.h" // _PyObject_ClearFreeLists()
88
#include "pycore_initconfig.h"
99
#include "pycore_interp.h" // PyInterpreterState.gc
@@ -484,13 +484,6 @@ update_refs(const mi_heap_t *heap, const mi_heap_area_t *area,
484484
return true;
485485
}
486486
}
487-
else if (PyDict_CheckExact(op)) {
488-
_PyDict_MaybeUntrack(op);
489-
if (!_PyObject_GC_IS_TRACKED(op)) {
490-
gc_restore_refs(op);
491-
return true;
492-
}
493-
}
494487
}
495488

496489
// We repurpose ob_tid to compute "gc_refs", the number of external

0 commit comments

Comments
 (0)