RFR: 8311602 GenShen: Decouple generational mode heuristics
William Kemper
wkemper at openjdk.org
Fri Jul 7 23:16:03 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
-------------
Commit messages:
- Merge remote-tracking branch 'shenandoah/master' into decouple-young-gen-heuristic
- Fix zero build
- Fix 32-bit format specifier error
- Remove unused field
- Rename constructor parameter to match field name
- Rename `_generation` to `_heap_info`
- WIP: Touch of cleanup
- WIP: Factor out global heuristics for generational mode from young heuristics
- WIP: Finish fixing headers
- WIP: Fixing headers
- ... and 11 more: https://git.openjdk.org/shenandoah/compare/ec727dab...3bc23f5b
Changes: https://git.openjdk.org/shenandoah/pull/292/files
Webrev: https://webrevs.openjdk.org/?repo=shenandoah&pr=292&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8311602
Stats: 2073 lines in 36 files changed: 1144 ins; 767 del; 162 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