RFR: 8352969: G1: Improve testability of optional collections [v9]
Thomas Schatzl
tschatzl at openjdk.org
Wed Sep 10 15:24:39 UTC 2025
On Wed, 10 Sep 2025 15:05:33 GMT, Guanqiang Han <ghan at openjdk.org> wrote:
>> This PR introduces a new diagnostic flag EvacuateAllOptionalRegions to force G1 GC to evacuate all optional regions regardless of the predicted pause time. The motivation is to allow testing and validation of optional region evacuation behavior without being constrained by the remaining pause time.
>
> Guanqiang Han has updated the pull request incrementally with one additional commit since the last revision:
>
> fix a small error
Looks good apart from that spacing in the test.
test/hotspot/jtreg/gc/g1/TestOptionalRegionGC.java line 74:
> 72: String selectedNum = matcher.group(1);
> 73: String totalNum = matcher.group(2);
> 74: Asserts.assertTrue(Objects.equals(selectedNum,totalNum),"Error info: "+selectedNum+","+totalNum);
Suggestion:
Asserts.assertTrue(Objects.equals(selectedNum, totalNum),"Error info: " + selectedNum + ", " + totalNum);
-------------
Changes requested by tschatzl (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/26880#pullrequestreview-3206677840
PR Review Comment: https://git.openjdk.org/jdk/pull/26880#discussion_r2337118523
More information about the hotspot-gc-dev
mailing list