diff options
author | Mark Shannon <mark@hotpy.org> | 2024-11-18 14:31:26 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-18 14:31:26 +0000 |
commit | b0fcc2c47a34a69c35c1a8031cd0589d3747c1af (patch) | |
tree | aa9d4bfaf49dca8d3ce47aa18a03cf2d5374a8e2 /Python/gc_free_threading.c | |
parent | a1d9c8aa800dd7c9eb634f89646be10e9cfc9c8d (diff) | |
download | cpython-b0fcc2c47a34a69c35c1a8031cd0589d3747c1af.tar.gz cpython-b0fcc2c47a34a69c35c1a8031cd0589d3747c1af.zip |
GH-126491: GC: Mark objects reachable from roots before doing cycle collection (GH-126502)
* Mark almost all reachable objects before doing collection phase
* Add stats for objects marked
* Visit new frames before each increment
* Remove lazy dict tracking
* Update docs
* Clearer calculation of work to do.
Diffstat (limited to 'Python/gc_free_threading.c')
-rw-r--r-- | Python/gc_free_threading.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/Python/gc_free_threading.c b/Python/gc_free_threading.c index 499ee51fdb2..a6e0022340b 100644 --- a/Python/gc_free_threading.c +++ b/Python/gc_free_threading.c @@ -3,7 +3,7 @@ #include "pycore_brc.h" // struct _brc_thread_state #include "pycore_ceval.h" // _Py_set_eval_breaker_bit() #include "pycore_context.h" -#include "pycore_dict.h" // _PyDict_MaybeUntrack() +#include "pycore_dict.h" // _PyInlineValuesSize() #include "pycore_freelist.h" // _PyObject_ClearFreeLists() #include "pycore_initconfig.h" #include "pycore_interp.h" // PyInterpreterState.gc @@ -493,13 +493,6 @@ update_refs(const mi_heap_t *heap, const mi_heap_area_t *area, return true; } } - else if (PyDict_CheckExact(op)) { - _PyDict_MaybeUntrack(op); - if (!_PyObject_GC_IS_TRACKED(op)) { - gc_restore_refs(op); - return true; - } - } } // We repurpose ob_tid to compute "gc_refs", the number of external |