RFR: 8357471: GenShen: Share collector reserves between young and old [v29]

Kelvin Nilsen kdnilsen at openjdk.org
Wed Jan 14 00:14:44 UTC 2026


On Tue, 13 Jan 2026 23:31:03 GMT, William Kemper <wkemper at openjdk.org> wrote:

>> Kelvin Nilsen has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 86 commits:
>> 
>>  - Merge remote-tracking branch 'jdk/master' into share-collector-reserves
>>  - Move rebuild free set earlier in an abbreviated GC cycle
>>  - Restore deleted assert statement
>>  - Move special handling into ShenandoahYoungHeuristics::choose_collection_set_from_regiondata()
>>  - fix another typo
>>  - Fix typo
>>  - Fix confusing comment
>>  - Add comment
>>  - Merge remote-tracking branch 'jdk/master' into share-collector-reserves
>>  - Fix whitespace and comment
>>  - ... and 76 more: https://git.openjdk.org/jdk/compare/659b53fe...27ece3e8
>
> src/hotspot/share/gc/shenandoah/heuristics/shenandoahAdaptiveHeuristics.cpp line 71:
> 
>> 69: ShenandoahAdaptiveHeuristics::~ShenandoahAdaptiveHeuristics() {}
>> 70: 
>> 71: size_t ShenandoahAdaptiveHeuristics::choose_collection_set_from_regiondata(ShenandoahCollectionSet* cset,
> 
> It would be nice if we didn't need to change this API for every heuristic just to support the mixed evacuation case. It is perhaps not in scope for an already huge PR, but I think we should move `ShenandoahGeneration::compute_evacuation_budgets` and `ShenandoahGeneration::adjust_evacuation_budgets` into `ShenandoahGenerationalHeuristic`. Logically, both these methods are involved in choosing the collection set and both are only used in the generational mode. I think it's fine to defer this refactoring to another PR. It's hard for me to accept that a change such as this would touch 41 files. It seems we do not have the right abstractions or encapsulations here.
> 
> I have made this refactoring on a branch based off https://github.com/openjdk/jdk/pull/27632, I will rebase it on this PR once it is integrated.

Thanks for sorting through the bigger picture here.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25357#discussion_r2688509896


More information about the shenandoah-dev mailing list