RFR (S): 8048112: G1 Full GC needs to support the case when the very first region is not available
Thomas Schatzl
thomas.schatzl at oracle.com
Mon Jul 7 13:53:54 UTC 2014
Hi all,
for support to uncommit regions (JDK-8038423: G1: Uncommit regions
within the heap) within the heap G1 Full GC needs to support the case
when the first region is not available (uncommitted).
Otherwise the VM simply crashes trying to move data into the
non-available region.
So to allow uncommit of regions within the heap, G1 Full GC should
correctly handle the case when the very first region is not available
(uncommitted).
The change is baesed on two ideas: lazily initialize the compaction
point during iteration of the list of heap regions - as the (serial)
heap iteration is in-order by definition and will never use
non-available regions. Further refactor the code to let the
G1CollectedHeap handle finding the next region to compact into as imo
this is the correct place to find that next region (as it "owns" the
region list at this time).
Without JDK-8038423 this is merely some imo reasonable refactoring.
Webrev:
http://cr.openjdk.java.net/~tschatzl/8048112/webrev/
CR:
https://bugs.openjdk.java.net/browse/JDK-8048112
Testing:
JPRT, many full ad-hoc runs with JDK-8038423
Thanks,
Thomas
More information about the hotspot-gc-dev
mailing list