Integrated: 8342640: GenShen: Silently ignoring ShenandoahGCHeuristics considered poor user-experience
Rui Li
duke at openjdk.org
Thu Aug 28 13:56:55 UTC 2025
On Wed, 27 Aug 2025 18:26:22 GMT, Rui Li <duke at openjdk.org> wrote:
> When generational shenandoah is enabled, it ignores the value of ShenandoahGCHeuristics input silently:
>
> java -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCMode=generational -XX:ShenandoahGCHeuristics=junk -version
> openjdk version "25" 2025-09-16 LTS
> OpenJDK Runtime Environment Corretto-25.0.0.36.1 (build 25+36-LTS)
> OpenJDK 64-Bit Server VM Corretto-25.0.0.36.1 (build 25+36-LTS, mixed mode, sharing)
>
>
> Adding additional guard rail to gen shen is not an option - it is actually by design that gen shen does not support non adaptive heuristics due to the complexity brought by generational design.
>
> So print out a warning to users to indicate that their `ShenandoahGCHeuristics` input is ignored.
>
>
> x64 (8342640) % java -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCMode=generational -XX:ShenandoahGCHeuristics=static -version
> [0.001s][warning][gc] Ignoring -XX:ShenandoahGCHeuristics input: static, because generational shenandoah only supports adaptive heuristics
> openjdk version "26" 2026-03-17
> OpenJDK Runtime Environment Corretto-26.0.2.1.1 (slowdebug build 26+2-FR)
> OpenJDK 64-Bit Server VM Corretto-26.0.2.1.1 (slowdebug build 26+2-FR, mixed mode)
>
> x64 (8342640) % java -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCMode=generational -XX:ShenandoahGCHeuristics=junk -version
> [0.001s][warning][gc] Ignoring -XX:ShenandoahGCHeuristics input: junk, because generational shenandoah only supports adaptive heuristics
> openjdk version "26" 2026-03-17
> OpenJDK Runtime Environment Corretto-26.0.2.1.1 (slowdebug build 26+2-FR)
> OpenJDK 64-Bit Server VM Corretto-26.0.2.1.1 (slowdebug build 26+2-FR, mixed mode)
>
> x64 (8342640) % java -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCMode=generational -XX:ShenandoahGCHeuristics=adaptive -version
> openjdk version "26" 2026-03-17
> OpenJDK Runtime Environment Corretto-26.0.2.1.1 (slowdebug build 26+2-FR)
> OpenJDK 64-Bit Server VM Corretto-26.0.2.1.1 (slowdebug build 26+2-FR, mixed mode)
>
> x64 (8342640) % java -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCMode=generational -version
> openjdk version "26" 2026-03-17
> OpenJDK Runtime Environment Corretto-26.0.2.1.1 (slowdebug build 26+2-FR)
> OpenJDK 64-Bit Server VM Corretto-26.0.2.1.1 (slowdebug build 26+2-FR, mixed mode)
This pull request has now been integrated.
Changeset: 8051aaf0
Author: Rui Li <ruiamzn at amazon.com>
Committer: SendaoYan <syan at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/8051aaf0685f7bb23bf3e23d32ad45b0bffbce7b
Stats: 7 lines in 1 file changed: 7 ins; 0 del; 0 mod
8342640: GenShen: Silently ignoring ShenandoahGCHeuristics considered poor user-experience
Reviewed-by: ysr, wkemper
-------------
PR: https://git.openjdk.org/jdk/pull/26968
More information about the hotspot-gc-dev
mailing list