RFR: 8352969: G1: Improve testability of optional collections [v7]

Thomas Schatzl tschatzl at openjdk.org
Tue Sep 9 13:36:29 UTC 2025


On Tue, 9 Sep 2025 13:17:24 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:

>> Guanqiang Han has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 10 commits:
>> 
>>  - change flag name
>>  - Merge remote-tracking branch 'upstream/master' into 8352969
>>  - fix format error
>>  - format fix
>>  - Optimize implementation and add regression test
>>  - Merge remote-tracking branch 'upstream/master' into 8352969
>>  - Update g1YoungCollector.cpp
>>    
>>    format fix
>>  - Simplified implementation
>>  - add default value
>>  - Implement JDK-8352969
>
> test/hotspot/jtreg/gc/g1/TestOptionalRegionGC.java line 56:
> 
>> 54:       "-XX:+UseG1GC",
>> 55:       "-XX:MaxTenuringThreshold=1",
>> 56:       "-Xlog:gc+ergo+cset=trace",
> 
> I would add a `-XX:+VerifyAfterGC` here to make sure the optional evacuation leaves the heap in a correct state.

If you are concerned, only do the verification after mixed gc, i.e. add `-XX:VerifyGCType=mixed`.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26880#discussion_r2333634492


More information about the hotspot-gc-dev mailing list