Request for review (s) - 8021809: Partitioning based on eden sampling during allocation not reset correctly

Jon Masamitsu jon.masamitsu at oracle.com
Tue Jul 30 22:52:21 UTC 2013


The partitioning of eden for parallel CMS initial mark and remark
depends of the setting of _eden_chunk_index to correctly reflect
the occupancy of eden.  For example if _eden_chunk_index is 3,
then  eden should be dividable into 3 chunks, each chunk
available for parallel processing.  In particular after a young
gen collection when eden is empty, the broken code depends on
_eden_chunk_index being 0.  The resetting of _eden_chunk_index
is done in the gc_epilogue() of the CMS gen.  When

1) a System.gc() is called

and

2) UseCMSCompactAtFullCollection is set to false

the CMS generation tells GenCollectedHeap that CMS
does not collect the young gen.  So the young gen is
collected first and then the CMS gen is collected.  In
this case the CMS gen gc_epilogue() is not called
after the young gen collection and _eden_chunk_index
is not cleared.  The gc_epilogue() methods are called after the
completion of the collection (after the CMS gen is
collected).  This is the expected behavior for when the
gc_epilogue() is called.

This fix adds a guard that checks if eden is empty,
skipping eden processing if it is.

http://cr.openjdk.java.net/~jmasa/8021809/webrev.00/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/hotspot-gc-dev/attachments/20130730/ee8ca8da/attachment.htm>


More information about the hotspot-gc-dev mailing list