RFR: 8233822: VM_G1CollectForAllocation should always check for upgrade to full
Thomas Schatzl
thomas.schatzl at oracle.com
Thu Jan 23 16:06:29 UTC 2020
Hi Kim,
On 21.01.20 09:31, 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/
>
> Testing:
> mach5 tier1-5
> Locally (linux-x64) ran modified InfiniteList.java test (allocate
> small rather than arrays) and verified some upgrades occurred as
> expected.
Minor nit you can ignore: in g1VMOperations.cpp:129 I would have
probably folded the two if's into a single one.
Looks good with and without any change in this area.
Thanks for fixing this,
Thomas
More information about the hotspot-gc-dev
mailing list