Skip to content

Commit 8051aaf

Browse files
rgithubliSendaoYan
authored andcommitted
8342640: GenShen: Silently ignoring ShenandoahGCHeuristics considered poor user-experience
Reviewed-by: ysr, wkemper
1 parent afa8e79 commit 8051aaf

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/hotspot/share/gc/shenandoah/shenandoahArguments.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,13 @@ void ShenandoahArguments::initialize() {
194194
err_msg("GCCardSizeInBytes ( %u ) must be >= %u\n", GCCardSizeInBytes, (unsigned int) ShenandoahMinCardSizeInBytes));
195195
}
196196

197+
// Gen shen does not support any ShenandoahGCHeuristics value except for the default "adaptive"
198+
if ((strcmp(ShenandoahGCMode, "generational") == 0)
199+
&& strcmp(ShenandoahGCHeuristics, "adaptive") != 0) {
200+
log_warning(gc)("Ignoring -XX:ShenandoahGCHeuristics input: %s, because generational shenandoah only"
201+
" supports adaptive heuristics", ShenandoahGCHeuristics);
202+
}
203+
197204
FullGCForwarding::initialize_flags(MaxHeapSize);
198205
}
199206

0 commit comments

Comments
 (0)