RFR: 8233822: VM_G1CollectForAllocation should always check for upgrade to full
thomas.schatzl at oracle.com
Thu Jan 23 16:06:29 UTC 2020
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).
> mach5 tier1-5
> Locally (linux-x64) ran modified InfiniteList.java test (allocate
> small rather than arrays) and verified some upgrades occurred as
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,
More information about the hotspot-gc-dev