RFR (M) 8150393: Maintain the set of survivor regions in an array between GCs
Mikael Gerdin
mikael.gerdin at oracle.com
Thu Apr 28 10:59:15 UTC 2016
Hi,
Please review this refactoring of the G1 YoungList class to simplify the
management of young regions.
Survivor regions are tracked in a sublist of the YoungList linked list
(using HeapRegion::_next_young_region) with explicit tracking of the
head and tail of the survivor regions.
The number of survivors is tracked in a special counter in YoungList and
at the end of a GC the amazingly named YoungList::reset_auxillary_lists
makes the survivor regions proper members of the YoungList.
My suggested fix is to explicitly track survivors in a GrowableArray
instead to make way for the complete removal of
HeapRegion::_next_young_region. There is a lot of overlap between the
incremental collection set and the young list and the only case where
they are not representing the exact same set of regions is during a GC,
where the "to-space" survivor regions need explicit tracking.
By tracking the survivor regions in an array instead of a linked list we
can also speed up concurrent root region scanning by getting rid of
mutex synchronization when iterating over the survivor regions to scan.
In order to maintain the integrity of the YoungList linked list I've
modified the code to append the survivors to that list in
reset_auxillary_lists for now, but I plan to change that in an upcoming
change.
Webrev of complete change:
http://cr.openjdk.java.net/~mgerdin/8150393/webrev.0.full/
Webrev of survivor array creation:
http://cr.openjdk.java.net/~mgerdin/8150393/webrev.0.survarray/
Webrev of cleanup of survivor linked list uses
http://cr.openjdk.java.net/~mgerdin/8150393/webrev.0.cleanup/
Bug: https://bugs.openjdk.java.net/browse/JDK-8150393
Testing: GC RBT Testing, Performance testing shows no significant
regressions
Thanks
/Mikael
More information about the hotspot-gc-dev
mailing list