Skip to content

Commit 8cb139f

Browse files
Remove immortalize visitor
1 parent 5b55760 commit 8cb139f

File tree

1 file changed

+0
-26
lines changed

1 file changed

+0
-26
lines changed

Diff for: Python/gc_free_threading.c

-26
Original file line numberDiff line numberDiff line change
@@ -1836,32 +1836,6 @@ custom_visitor_wrapper(const mi_heap_t *heap, const mi_heap_area_t *area,
18361836
return true;
18371837
}
18381838

1839-
// gh-117783: Immortalize objects that use deferred reference counting to
1840-
// temporarily work around scaling bottlenecks.
1841-
static bool
1842-
immortalize_visitor(const mi_heap_t *heap, const mi_heap_area_t *area,
1843-
void *block, size_t block_size, void *args)
1844-
{
1845-
PyObject *op = op_from_block(block, args, false);
1846-
if (op != NULL && _PyObject_HasDeferredRefcount(op)) {
1847-
_Py_SetImmortal(op);
1848-
op->ob_gc_bits &= ~_PyGC_BITS_DEFERRED;
1849-
}
1850-
return true;
1851-
}
1852-
1853-
void
1854-
_PyGC_ImmortalizeDeferredObjects(PyInterpreterState *interp)
1855-
{
1856-
struct visitor_args args;
1857-
_PyEval_StopTheWorld(interp);
1858-
if (interp->gc.immortalize == 0) {
1859-
gc_visit_heaps(interp, &immortalize_visitor, &args);
1860-
interp->gc.immortalize = 1;
1861-
}
1862-
_PyEval_StartTheWorld(interp);
1863-
}
1864-
18651839
void
18661840
PyUnstable_GC_VisitObjects(gcvisitobjects_t callback, void *arg)
18671841
{

0 commit comments

Comments
 (0)