8257232: CompileThresholdScaling fails to work on 32-bit platforms
Reviewed-by: kvn, redestad
This commit is contained in:
parent
cfd070ece6
commit
8f4fa3f8d5
@ -119,13 +119,17 @@ intx CompilerConfig::scaled_freq_log(intx freq_log, double scale) {
|
||||
// max_freq_bits accordingly.
|
||||
intx max_freq_bits = InvocationCounter::number_of_count_bits + 1;
|
||||
intx scaled_freq = scaled_compile_threshold((intx)1 << freq_log, scale);
|
||||
|
||||
if (scaled_freq == 0) {
|
||||
// Return 0 right away to avoid calculating log2 of 0.
|
||||
return 0;
|
||||
} else if (scaled_freq > nth_bit(max_freq_bits)) {
|
||||
return max_freq_bits;
|
||||
} else {
|
||||
return log2_intptr(scaled_freq);
|
||||
intx res = log2_intptr(scaled_freq);
|
||||
if (res > max_freq_bits) {
|
||||
return max_freq_bits;
|
||||
} else {
|
||||
return res;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user