RFR: 8324649: Shenandoah: refactor implementation of free set [v4]

Kelvin Nilsen kdnilsen at openjdk.org
Wed Jan 31 14:26:03 UTC 2024


On Mon, 29 Jan 2024 22:54: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.hpp line 50:
> 
>> 48:   size_t _rightmosts[NumFreeSets];
>> 49:   size_t _leftmosts_empty[NumFreeSets];
>> 50:   size_t _rightmosts_empty[NumFreeSets];
> 
> I'd motivate the `.._empty` notion and document the role of each of these fields (for an arbitrary type).
> 
> Just a line is enough, e.g. a brief block comment such as:
> 
> 
> //  For each type, we track an interval outside of which a region of that type
> // is guaranteed not to be found. This makes searches for free space more efficient.
> //  For any given type, its _leftmosts represents its least index, and its _rightmosts its
> // greatest index. Empty intervals are indicated by the canconical [_max, 0].
> 
> 
> In this description, what does `_leftmosts_empty` represent?

Thanks.  I've added these comments also.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17561#discussion_r1472899856


More information about the shenandoah-dev mailing list