Integrated: 8311602 GenShen: Decouple generational mode heuristics

William Kemper wkemper at openjdk.org
Thu Jul 20 16:03:42 UTC 2023


On Thu, 29 Jun 2023 16:47:37 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

This pull request has now been integrated.

Changeset: 09f6c037
Author:    William Kemper <wkemper at openjdk.org>
URL:       https://git.openjdk.org/shenandoah/commit/09f6c037dd23e737129055c21b522cb4dcb47694
Stats:     2201 lines in 40 files changed: 1214 ins; 817 del; 170 mod

8311602: GenShen: Decouple generational mode heuristics

Reviewed-by: kdnilsen, ysr

-------------

PR: https://git.openjdk.org/shenandoah/pull/292


More information about the shenandoah-dev mailing list