Keep track of per-cycle mutator/collector allocs. Fix mutator/collector alloc region overlap in traversal.
Roman Kennke
rkennke at redhat.com
Fri Mar 9 14:05:43 UTC 2018
I developed this as part of degen implementation for Traversal GC, but
it fixes a bug that exists independently, and does some infrastructure
that might be useful elsewhere.
The bug I've see was this: in traversal GC, we need to distinguish
between mutator-allocation-regions and collector-allocation-regions. The
former will be treated implicitely live and marked, while the latter
does not. Mutator and collector allocations are biased from different
ends of the free set. Eventually, they will meet in the middle, at which
point allocations from collector and mutator will mix up. This can have
the weird effect that a region starts out as implicitely marked+live,
them mutator allocs something, and suddenly all those new objects are
not marked anymore. The reason why this hasn't blown up so far is that
when mutator and collector allocs meet in the middle, the next thing
that usually happens is OOM and full-GC which will fix everything up
again. But there is a chance that allocations meet, but just so fit in,
and then we'd be doomed.
The problem is much more pronounced with (upcoming) degenerated GC,
because there's usually no full-GC to fix it up.
The way I solved it is to extend the tracking of allocation sizes to
per-cycle allocations, and use that to keep allocations from mixing up.
http://cr.openjdk.java.net/~rkennke/traversal-alloc-region/webrev.00/
Passes all tests.
Opinions? Ok to go?
Roman
More information about the shenandoah-dev
mailing list