RFR: Add generations to freeset [v5]
Kelvin Nilsen
kdnilsen at openjdk.org
Wed Apr 19 14:11:18 UTC 2023
On Thu, 13 Apr 2023 16:28:49 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.cpp line 994:
>
>> 992: size_t ac = alloc_capacity(r);
>> 993: _capacity -= ac;
>> 994: _old_capacity += ac;
>
> This piecemeal adjustment of capacities following change of set membership indicates that the set abstraction should be pushed down to `old`, `mutator` and `young` (?) subsets, which then carry both membership & capacity that is adjusted at the point of membership changes.
There are some inconsistencies, I agree. We do not keep track of capacity for the collector_set, just the old_collector_set and the mutator_set. This is historical also. I'm inclined to leave as is for now. Maybe we can address this when/if we refactor to improve the "set" abstraction.
For now, I'll place a comment in the source code.
> src/hotspot/share/gc/shenandoah/shenandoahFreeSet.hpp line 147:
>
>> 145: void print_on(outputStream* out) const;
>> 146:
>> 147: void reserve_regions(size_t young_reserve, size_t old_reserve);
>
> Documentation comment, preferably here, but if not then in the implementation as a block header.
Added documentation.
-------------
PR Review Comment: https://git.openjdk.org/shenandoah/pull/250#discussion_r1171398698
PR Review Comment: https://git.openjdk.org/shenandoah/pull/250#discussion_r1171398913
More information about the shenandoah-dev
mailing list