Skip to content

8353815: [ubsan] compilationPolicy.cpp: division by zero related to tiered compilation flags #25902

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/hotspot/share/compiler/compilationPolicy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
10 changes: 6 additions & 4 deletions src/hotspot/share/compiler/compiler_globals.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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, \
Expand All @@ -263,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 " \
Expand Down