RFR: 8278207: G1: Tighten verification in G1ResetSkipCompactingClosure

Albert Mingkun Yang ayang at openjdk.java.net
Mon Dec 6 15:13:15 UTC 2021


On Mon, 6 Dec 2021 14:42:57 GMT, Stefan Johansson <sjohanss at openjdk.org> wrote:

>> Simple change of expanding the verification logic to mirror its source.
>> 
>> Test: tier1-5
>
> src/hotspot/share/gc/g1/g1FullGCCompactTask.cpp line 64:
> 
>> 62:              "should be quite full");
>> 63:     }
>> 64: #endif
> 
> What do you think about extracting this to a function. Something like:
> 
> void assert_should_reset(HeapRegion*) PRODUCT_RETURN;
> 
> But you might be able to come up with a better name :)

Considering this method is fairly short, I think having those asserts inlined doesn't hinder readability; instead, provides some documentation concerning in what context this method is invoked.

-------------

PR: https://git.openjdk.java.net/jdk/pull/6698



More information about the hotspot-gc-dev mailing list