RFR: 8318647: Serial: Refactor BlockOffsetTable [v2]
Thomas Schatzl
tschatzl at openjdk.org
Wed Oct 25 11:55:36 UTC 2023
On Wed, 25 Oct 2023 11:26:04 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:
>> The diff is too large; maybe it's better to read the new impl directly, which I believe is much easier to follow.
>>
>> There is some duplication with G1's implementation, which should probably be dealt with in its own PR.
>
> Albert Mingkun Yang has updated the pull request incrementally with one additional commit since the last revision:
>
> review
Changes requested by tschatzl (Reviewer).
src/hotspot/share/gc/serial/serialBlockOffsetTable.cpp line 143:
> 141: }
> 142: _array->set_offset_array(start_card_for_region, reach, value);
> 143: start_card_for_region = reach + 1;
Suggestion:
_array->set_offset_array(start_card_for_region, MIN2(end_card, reach), value);
start_card_for_region = reach + 1;
if (reach >= end_card) {
// Set all the cards covered by this region.
break;
}
I would probably try to merge these two paths as much as possible as suggested above (untested).
-------------
PR Review: https://git.openjdk.org/jdk/pull/16304#pullrequestreview-1697078033
PR Review Comment: https://git.openjdk.org/jdk/pull/16304#discussion_r1371607397
More information about the hotspot-gc-dev
mailing list