RFR: 8233822: VM_G1CollectForAllocation should always check for upgrade to full

Kim Barrett kim.barrett at oracle.com
Tue Jan 21 08:31:20 UTC 2020


Please review this G1 change to always check whether a full collection
should be performed after a non-full collection pause, e.g. the
collection needs to be "upgraded" to a full collection.  There are
various conditions which can lead to needing to do that, and as the CR
suggests, we need to be consistent about checking for and performing
such an upgrade.

This is accomplished by moving most of do_collection_pause_at_safepoint
into a helper function and changing that existing function to call the
helper, then check for and, if needed, perform a needed upgrade to a
full collection.  Callers of that function are updated to remove
explict conditional upgrading, where present.  This also addresses the
surprisingly placed call in a G1-specific block of code in gc/shared
(see also JDK-8237567).

CR:
https://bugs.openjdk.java.net/browse/JDK-8233822

Webrev:
https://cr.openjdk.java.net/~kbarrett/8233822/open.00/

Testing:
mach5 tier1-5
Locally (linux-x64) ran modified InfiniteList.java test (allocate
small rather than arrays) and verified some upgrades occurred as
expected.




More information about the hotspot-gc-dev mailing list