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

sangheon.kim at oracle.com sangheon.kim at oracle.com
Wed Jan 29 00:40:32 UTC 2020

Hi Kim,

On 1/21/20 12:31 AM, Kim Barrett wrote:
> 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/
Looks good.

Not related to your patch (so can ignore) but as you are changing 
VM_G1CollectForAllocation class,
comments for relation at g1VMOperations.hpp seems out-dated. :)


> 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