Overlap in G1 gc modes
derek.white at oracle.com
Mon Nov 2 22:19:54 UTC 2015
Hi Thomas, others,
I'm trying to replace 3 collection state booleans into a simple GC mode
variable. This is technically collapsing 8 states into 3. But when would
we ever be in both young-only GC and full-gc at the same time?
OK, so the handy debug code I threw in notices the following:
around line 1279:
around line 1340:
around line 1474:
Now this overlap doesn't really matter if no code checks the state the
the gc mode between lines 1340-1474, but of course it does.
Strangely, the ONLY code that cares if we're doing a full collection is
some verification code - it bypasses certain verification when doing
full-collections, unless G1VerifyRSetsDuringFullGC is true.
Going the other way, once remembered set processing occurs (after line
1340), some of the accounting treats the GC as a young-only GC, and
there may be other cases that depend on gcs_are_young.
As Kim pointed out to me earlier, I can expose this mixed state as
"young-only-coming-out-of-full-collection", and make it all work, but
that seems a bit awkward.
Does anyone know why the verification around "G1VerifyRSetsDuringFullGC"
is ignored for full collections by default? Should we just always do the
verification for all gc-types? Or should we move the verification before
Any other suggestions?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the hotspot-gc-dev