RFR: 8311602 GenShen: Decouple generational mode heuristics [v2]
William Kemper
wkemper at openjdk.org
Mon Jul 10 17:42:19 UTC 2023
> The general idea here is to straighten out code paths which fork based on the mode configuration. A `ShenandoahYoungHeuristics` class has been added to host the logic specific to the generational mode. In many cases, the entangled generational code can simply be moved behind methods which override existing virtual methods.
>
> A few other notable changes:
> * The confusing "trigger" heuristic has been removed from `ShenandoahOldHeuristics`.
> * The old heuristic defines its own triggers now. It is no longer possible to specify the old generation's trigger heuristic.
> * Selection of aged regions for in-place promotion has been moved to `ShenandoahGeneration`.
> * The method implementation does not depend on any members of `ShenandoahHeuristics`. Moving the method therefore removes an unnecessary dependency on the heuristics.
> * A new `ShenandoahHeapCharacteristics` interface has been added to provide information about the heap _or generation_ to the heuristics.
> * On the development branch, this interface is implemented by `ShenandoahGeneration`.
> * The plan is to upstream this interface and have it implemented by `ShenandoahHeap`
>
> The taxonomy of these heuristic classes has become somewhat more complex - here is a chart showing the relationships:
>
>
> ShenandoahHeuristics
> - ShenandoahPassiveHeuristics
> - ShenandoahCompactHeuristics
> - ShenandoahAggressiveHeuristics
> - ShenandoahStaticHeuristics
> - ShenandoahOldHeuristics
> + ShenandoahAdaptiveHeuristics
> + ShenandoahGenerationalHeuristics
> - ShenandoahYoungHeuristics
> - ShenandoahGlobalHeuristics
William Kemper has updated the pull request incrementally with two additional commits since the last revision:
- Remove overzealous assert
- Fix missing imports (windows build failure)
-------------
Changes:
- all: https://git.openjdk.org/shenandoah/pull/292/files
- new: https://git.openjdk.org/shenandoah/pull/292/files/3bc23f5b..23578ee3
Webrevs:
- full: https://webrevs.openjdk.org/?repo=shenandoah&pr=292&range=01
- incr: https://webrevs.openjdk.org/?repo=shenandoah&pr=292&range=00-01
Stats: 7 lines in 2 files changed: 2 ins; 5 del; 0 mod
Patch: https://git.openjdk.org/shenandoah/pull/292.diff
Fetch: git fetch https://git.openjdk.org/shenandoah.git pull/292/head:pull/292
PR: https://git.openjdk.org/shenandoah/pull/292
More information about the shenandoah-dev
mailing list