RFR: 8376756: GenShen: Improve encapsulation of generational collection set choosing [v3]
William Kemper
wkemper at openjdk.org
Wed Feb 4 17:24:07 UTC 2026
> Choosing the collection set for Shenandoah's generational mode is somewhat more complicated than the non-generational modes. The logic is spread out in unnatural places which compounds the complexity. This change was spun off from https://github.com/openjdk/jdk/pull/27632. There is more to come, but I'm breaking the changes up over several PRs to facilitate reviewing.
>
> Description of changes:
>
> The methods:
> * `ShGeneration::compute_evacuation_budgets`
> * `ShGeneration::select_aged_regions`
> * `ShGeneration::adjust_evacuation-budgets`
>
> Were all moved into `ShGenerationalHeuristics`. The signature of `ShHeuritics::choose_collection_set` is restored to return `void` instead of returning a `size_t` which represents the number of old regions to be added to top off the collection set. The one heuristic that returned a non-zero value for this (`ShYoungHeuristics`) now carries it in a member variable.
>
> Redundant keyword modifiers have been removed from the headers touched here.
William Kemper has updated the pull request incrementally with one additional commit since the last revision:
Fix parameter indentation after signature change
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/29496/files
- new: https://git.openjdk.org/jdk/pull/29496/files/cf28eff5..6b39a7b2
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=29496&range=02
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=29496&range=01-02
Stats: 23 lines in 12 files changed: 0 ins; 0 del; 23 mod
Patch: https://git.openjdk.org/jdk/pull/29496.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/29496/head:pull/29496
PR: https://git.openjdk.org/jdk/pull/29496
More information about the shenandoah-dev
mailing list