We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 6156d7c + c104802 commit 3c0b571Copy full SHA for 3c0b571
src/hotspot/share/compiler/compilerDefinitions.cpp
@@ -124,10 +124,17 @@ intx CompilerConfig::scaled_freq_log(intx freq_log) {
124
// Returns threshold scaled with the value of scale.
125
// If scale < 0.0, threshold is returned without scaling.
126
intx CompilerConfig::scaled_compile_threshold(intx threshold, double scale) {
127
+ assert(threshold >= 0, "must be");
128
if (scale == 1.0 || scale < 0.0) {
129
return threshold;
130
} else {
- return (intx)(threshold * scale);
131
+ double v = threshold * scale;
132
+ assert(v >= 0, "must be");
133
+ if (v > max_intx) {
134
+ return max_intx;
135
+ } else {
136
+ return (intx)(v);
137
+ }
138
}
139
140
0 commit comments