RFR: 8324649: Shenandoah: refactor implementation of free set [v4]
Kelvin Nilsen
kdnilsen at openjdk.org
Wed Jan 31 01:07:03 UTC 2024
On Mon, 29 Jan 2024 22:35:02 GMT, Y. Srinivas Ramakrishna <ysr at openjdk.org> wrote:
>> Kelvin Nilsen has updated the pull request incrementally with two additional commits since the last revision:
>>
>> - Fix typo in comment
>> - Remove unnecessary include
>
> src/hotspot/share/gc/shenandoah/shenandoahFreeSet.cpp line 98:
>
>> 96: _rightmosts[idx] = 0;
>> 97: _leftmosts_empty[idx] = _max;
>> 98: _rightmosts_empty[idx] = 0;
>
> // Make all regions NotFree
>
>
> Would this read easier if one used `type` or similar for the loop variable name & used multiple assignment statements:
>
> _leftmosts[type] = _leftmosts_empty[type] = _max;
> _rightmosts[type] = _rightmosts_empty[type] = 0;
> _used_by_[type] = _capacity_of[type] = 0;
>
>
> Then
>
> _region_counts[Mutator] = _region_counts[Collector] = 0;
> _region_counts[NotFree] = _max;
Thanks. Using partition_id instead of idx.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17561#discussion_r1472184788
More information about the hotspot-gc-dev
mailing list