The one unfixed sub-cost from #6181, refiled on its own so it stops sharing a ticket with two that are done.
Fixed and closed with #6181: (b) the whole-heap remembered-set rebuild and (c) the per-cycle page-meta iterations, via #6213 / #6277 / #6568.
Still live: sub-cost (a) — the minor collector performs a full-region sweep walk over the old generation. crates/perry-runtime/src/gc/oldgen.rs::sweep (line ~476) is reached on the minor path, so minor-GC cost scales with old-gen size rather than with nursery survivors — which is the property a generational collector exists to avoid.
Why this is worth doing and what to watch
The remembered set already exists precisely so a minor need not retrace the old generation, so the walk is redundant work on the hot path. But two things make this less mechanical than it looks:
Before coding
Re-measure. #6181's figures predate #6213/#6277/#6568, so the remaining share attributable to (a) alone has never been isolated. Use PERRY_GC_DIAG=1 and confirm the cycle KINDS you are measuring are the ones you think — census counters cover copying minors ONLY, and a run whose cycles are full mark-sweeps says nothing about the minor path.
Bench host per the standing rule: the quiet M1 mini.
The one unfixed sub-cost from #6181, refiled on its own so it stops sharing a ticket with two that are done.
Fixed and closed with #6181: (b) the whole-heap remembered-set rebuild and (c) the per-cycle page-meta iterations, via #6213 / #6277 / #6568.
Still live: sub-cost (a) — the minor collector performs a full-region sweep walk over the old generation.
crates/perry-runtime/src/gc/oldgen.rs::sweep(line ~476) is reached on the minor path, so minor-GC cost scales with old-gen size rather than with nursery survivors — which is the property a generational collector exists to avoid.Why this is worth doing and what to watch
The remembered set already exists precisely so a minor need not retrace the old generation, so the walk is redundant work on the hot path. But two things make this less mechanical than it looks:
sweep_malloc_objects,copied_minor_malloc_sweep_due) and is gated by trigger kind. Do not conflate the two — a change that skips one and not the other will look like it works.Before coding
Re-measure. #6181's figures predate #6213/#6277/#6568, so the remaining share attributable to (a) alone has never been isolated. Use
PERRY_GC_DIAG=1and confirm the cycle KINDS you are measuring are the ones you think — census counters cover copying minors ONLY, and a run whose cycles are full mark-sweeps says nothing about the minor path.Bench host per the standing rule: the quiet M1 mini.