On Mon, 30 Mar 2026 14:30:13 GMT, Thomas Schatzl <[email protected]> wrote:
>> Hi all,
>>
>> please review this change that extends G1 eager reclaim to large flat
>> arrays.
>>
>> This is mostly just a generalization ion of the existing mechanism, there is
>> not much new about it.
>>
>> Testing: gha, tier1-5
>>
>> Thanks,
>> Thomas
>
> Thomas Schatzl has updated the pull request incrementally with one additional
> commit since the last revision:
>
> * make conditions in assert match, from walulyai
Nit:
src/hotspot/share/gc/g1/g1YoungCollector.cpp line 393:
> 391: // After the pause, having reclaimed h, obviously the mutator
> can't fetch
> 392: // the reference from h any more.
> 393: bool potentially_has_oops = !obj->is_array() ||
> obj->is_array_with_oops();
Looks like a logical inverse of `can_be_processed_immediately`, may be clearer
if we used just one helper; either `potentially_has_oops` or
`can_be_processed_immediately`.
test/hotspot/jtreg/gc/g1/TestEagerReclaimHumongousRegions.java line 55:
> 53: private static final WhiteBox WB = WhiteBox.getWhiteBox();
> 54:
> 55: enum ObjectType { TYPE_ARRAY, OBJ_ARRAY, FLAT_TYPE_ARRAY,
> FLAT_OBJ_ARRAY }
probably rename this to ArrayType, could be left for later in mainline too.
test/hotspot/jtreg/gc/g1/TestEagerReclaimHumongousRegions.java line 248:
> 246: case 0: return new int[SIZE];
> 247: case 1: return new Object[SIZE];
> 248: case 2: return new IntValue[SIZE];
Suggestion:
case 2: return new Integer[SIZE];
then we don't need `value class IntValue`
-------------
Marked as reviewed by iwalulya (no project role).
PR Review:
https://git.openjdk.org/valhalla/pull/2255#pullrequestreview-4033043101
PR Review Comment:
https://git.openjdk.org/valhalla/pull/2255#discussion_r3011955744
PR Review Comment:
https://git.openjdk.org/valhalla/pull/2255#discussion_r3012163098
PR Review Comment:
https://git.openjdk.org/valhalla/pull/2255#discussion_r3012105080