You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gc: pretenure image objects to skip sysimage subgraph during mark phase
Load image objects as permanently marked (GC_OLD_MARKED) so
gc_try_setmark_tag returns 0 immediately and the mark phase never
enters the image subgraph. This reduces full-sweep mark times by
10-25x for typical workloads with loaded packages.
Image objects live in separate mmap'd regions, are never freed, and
are rarely mutated, making them ideal candidates for pretenuring.
A persistent `image_remset` (htable) tracks image objects that have
been mutated to reference non-image (collectable) objects. These are
discovered at image load time by gc_scan_sysimg_remset and added
incrementally by the write barrier in jl_gc_queue_root. After a full
sweep (which clears per-thread remsets), gc_queue_image_remset pushes
these entries to the mark queue so their children are properly traced.
Quick sweeps don't need this because old objects retain their marks.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
0 commit comments