mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8071312: compiler/arguments/CheckCompileThresholdScaling.java fails
Change the way VM handles CompileThresholdScaling==0, update test Reviewed-by: kvn, drchase, fzhinkin
This commit is contained in:
parent
b7eaaba943
commit
1da8218179
2 changed files with 33 additions and 19 deletions
|
@ -1127,7 +1127,7 @@ static void no_shared_spaces(const char* message) {
|
|||
#endif
|
||||
|
||||
intx Arguments::scaled_compile_threshold(intx threshold, double scale) {
|
||||
if (scale == 1.0 || scale < 0.0) {
|
||||
if (scale == 1.0 || scale <= 0.0) {
|
||||
return threshold;
|
||||
} else {
|
||||
return (intx)(threshold * scale);
|
||||
|
@ -1143,7 +1143,7 @@ intx Arguments::scaled_freq_log(intx freq_log, double scale) {
|
|||
|
||||
// Check value to avoid calculating log2 of 0.
|
||||
if (scale == 0.0) {
|
||||
return 1;
|
||||
return freq_log;
|
||||
}
|
||||
|
||||
intx scaled_freq = scaled_compile_threshold((intx)1 << freq_log, scale);
|
||||
|
@ -3479,8 +3479,10 @@ jint Arguments::finalize_vm_init_args(SysClassPath* scp_p, bool scp_assembly_req
|
|||
set_mode_flags(_int);
|
||||
}
|
||||
|
||||
if ((TieredCompilation && CompileThresholdScaling == 0)
|
||||
|| (!TieredCompilation && scaled_compile_threshold(CompileThreshold) == 0)) {
|
||||
// CompileThresholdScaling == 0.0 is same as -Xint: Disable compilation (enable interpreter-only mode),
|
||||
// but like -Xint, leave compilation thresholds unaffected.
|
||||
// With tiered compilation disabled, setting CompileThreshold to 0 disables compilation as well.
|
||||
if ((CompileThresholdScaling == 0.0) || (!TieredCompilation && CompileThreshold == 0)) {
|
||||
set_mode_flags(_int);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue