RFR: Add generations to freeset [v5]

Kelvin Nilsen kdnilsen at openjdk.org
Wed Apr 19 23:08:27 UTC 2023


On Thu, 13 Apr 2023 16:03:48 GMT, Y. Srinivas Ramakrishna <ysr at openjdk.org> wrote:

>> Kelvin Nilsen has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Remove debug instrumentation
>
> src/hotspot/share/gc/shenandoah/shenandoahFreeSet.hpp line 64:
> 
>> 62:   inline bool is_mutator_free(size_t idx) const;
>> 63:   inline bool is_collector_free(size_t idx) const;
>> 64:   inline bool is_old_collector_free(size_t idx) const;
> 
> Would it be correct to assume (when we are stable between transitions in set membership) that the set of all free regions is tiled by its mutually exclusive subsets `collector_free`, `old_collector_free`, and `mutator_free` ?
> 
> Thus, when set membership is not being changed, I'd expect a free region to be in exactly one of these three subsets? If so, then (re `peek` methods below) one might be able to do membership assertion checks before and after transitions in membership (i.e. before removing from one subset and after adding to another subset). That would then avoid having to use `peek` versions of the membership querying methods.
> 
> I am trying to get a high level mental model so I can better understand the implementation and usage details. This is likely documented somewhere in `ShenandoahFreeSet`, but I am having trouble locating such documentation in the files I am looking at.

I've added documentation to make this more clear, I hope.

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

PR Review Comment: https://git.openjdk.org/shenandoah/pull/250#discussion_r1171930366


More information about the shenandoah-dev mailing list