RFR: 8311602 GenShen: Decouple generational mode heuristics [v6]
William Kemper
wkemper at openjdk.org
Thu Jul 13 23:49:48 UTC 2023
On Thu, 13 Jul 2023 21:05:23 GMT, William Kemper <wkemper at openjdk.org> wrote:
>> 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 one additional commit since the last revision:
>
> Record cycle end for old generation heuristic
src/hotspot/share/gc/shenandoah/heuristics/shenandoahHeuristics.cpp line 36:
> 34: #include "runtime/globals_extension.hpp"
> 35: #include "utilities/quickSort.hpp"
> 36: #include "shenandoahAdaptiveHeuristics.hpp"
Should not need to include this
src/hotspot/share/gc/shenandoah/mode/shenandoahPassiveMode.cpp line 59:
> 57: // No barriers are required to run.
> 58: }
> 59: ShenandoahHeuristics* ShenandoahPassiveMode::initialize_heuristics(ShenandoahHeapStats* heap_info) const {
Can take out this argument now.
src/hotspot/share/gc/shenandoah/shenandoahGeneration.cpp line 954:
> 952: void ShenandoahGeneration::record_success_concurrent(bool abbreviated) {
> 953: ShenandoahHeap* heap = ShenandoahHeap::heap();
> 954: abbreviated = abbreviated && heap->mode()->is_generational();
Need to re-evaluate performance of this change on diluvian benchmark
src/hotspot/share/gc/shenandoah/shenandoahHeap.hpp line 247:
> 245: void decrease_committed(size_t bytes);
> 246:
> 247: size_t bytes_allocated_since_gc_start();
Do we really need this?
-------------
PR Review Comment: https://git.openjdk.org/shenandoah/pull/292#discussion_r1263128627
PR Review Comment: https://git.openjdk.org/shenandoah/pull/292#discussion_r1263133113
PR Review Comment: https://git.openjdk.org/shenandoah/pull/292#discussion_r1263133979
PR Review Comment: https://git.openjdk.org/shenandoah/pull/292#discussion_r1263135197
More information about the shenandoah-dev
mailing list