RFR: 8311602 GenShen: Decouple generational mode heuristics [v3]
William Kemper
wkemper at openjdk.org
Tue Jul 11 00:51:06 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 three additional commits since the last revision:
- Use interface in heuristic initialization methods
- Call base class method with more intuitive syntax.
- Remove unused fields and methods
-------------
Changes:
- all: https://git.openjdk.org/shenandoah/pull/292/files
- new: https://git.openjdk.org/shenandoah/pull/292/files/23578ee3..bb6dfdb7
Webrevs:
- full: https://webrevs.openjdk.org/?repo=shenandoah&pr=292&range=02
- incr: https://webrevs.openjdk.org/?repo=shenandoah&pr=292&range=01-02
Stats: 40 lines in 10 files changed: 3 ins; 25 del; 12 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