From 8bf37eec3094924f20c25fa42ab84767e901c850 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20H=C3=A4ssig?= Date: Thu, 19 Jun 2025 14:14:31 +0200 Subject: [PATCH 1/2] Disable compilation threshold scaling for Tier(3|4)LoadFeedback=0 --- src/hotspot/share/compiler/compilationPolicy.cpp | 2 +- src/hotspot/share/compiler/compiler_globals.hpp | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/hotspot/share/compiler/compilationPolicy.cpp b/src/hotspot/share/compiler/compilationPolicy.cpp index bab437eaade14..99b7e1bb6fd01 100644 --- a/src/hotspot/share/compiler/compilationPolicy.cpp +++ b/src/hotspot/share/compiler/compilationPolicy.cpp @@ -385,7 +385,7 @@ class CallPredicate : AllStatic { double CompilationPolicy::threshold_scale(CompLevel level, int feedback_k) { int comp_count = compiler_count(level); - if (comp_count > 0) { + if (comp_count > 0 && feedback_k > 0) { double queue_size = CompileBroker::queue_size(level); double k = (double)queue_size / ((double)feedback_k * (double)comp_count) + 1; diff --git a/src/hotspot/share/compiler/compiler_globals.hpp b/src/hotspot/share/compiler/compiler_globals.hpp index 3c47b991120dd..87d88218a5ed6 100644 --- a/src/hotspot/share/compiler/compiler_globals.hpp +++ b/src/hotspot/share/compiler/compiler_globals.hpp @@ -234,12 +234,14 @@ \ product(intx, Tier3LoadFeedback, 5, \ "Tier 3 thresholds will increase twofold when C1 queue size " \ - "reaches this amount per compiler thread") \ + "reaches this amount per compiler thread" \ + "Passing 0 disables the threshold scaling") \ range(0, max_jint) \ \ product(intx, Tier4LoadFeedback, 3, \ "Tier 4 thresholds will increase twofold when C2 queue size " \ - "reaches this amount per compiler thread") \ + "reaches this amount per compiler thread" \ + "Passing 0 disables the threshold scaling") \ range(0, max_jint) \ \ product(intx, TieredCompileTaskTimeout, 50, \ From 4893b288e4f69e03fdc52281603b4718b3668cb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20H=C3=A4ssig?= Date: Thu, 19 Jun 2025 15:20:56 +0200 Subject: [PATCH 2/2] Increase lower bound of TieredRateUpdate(Min|Max)Time to 1ms --- src/hotspot/share/compiler/compiler_globals.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hotspot/share/compiler/compiler_globals.hpp b/src/hotspot/share/compiler/compiler_globals.hpp index 87d88218a5ed6..605c0c58869df 100644 --- a/src/hotspot/share/compiler/compiler_globals.hpp +++ b/src/hotspot/share/compiler/compiler_globals.hpp @@ -265,11 +265,11 @@ \ product(intx, TieredRateUpdateMinTime, 1, \ "Minimum rate sampling interval (in milliseconds)") \ - range(0, max_intx) \ + range(1, max_intx) \ \ product(intx, TieredRateUpdateMaxTime, 25, \ "Maximum rate sampling interval (in milliseconds)") \ - range(0, max_intx) \ + range(1, max_intx) \ \ product(double, Tier0ProfileDelayFactor, 100.0, DIAGNOSTIC, \ "Delay profiling/compiling of methods that were " \