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
@ -1127,7 +1127,7 @@ static void no_shared_spaces(const char* message) {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
intx Arguments::scaled_compile_threshold(intx threshold, double scale) {
|
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;
|
return threshold;
|
||||||
} else {
|
} else {
|
||||||
return (intx)(threshold * scale);
|
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.
|
// Check value to avoid calculating log2 of 0.
|
||||||
if (scale == 0.0) {
|
if (scale == 0.0) {
|
||||||
return 1;
|
return freq_log;
|
||||||
}
|
}
|
||||||
|
|
||||||
intx scaled_freq = scaled_compile_threshold((intx)1 << freq_log, scale);
|
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);
|
set_mode_flags(_int);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((TieredCompilation && CompileThresholdScaling == 0)
|
// CompileThresholdScaling == 0.0 is same as -Xint: Disable compilation (enable interpreter-only mode),
|
||||||
|| (!TieredCompilation && scaled_compile_threshold(CompileThreshold) == 0)) {
|
// 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);
|
set_mode_flags(_int);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -84,6 +84,13 @@ public class CheckCompileThresholdScaling {
|
|||||||
"-XX:CompileThresholdScaling=0.75",
|
"-XX:CompileThresholdScaling=0.75",
|
||||||
"-version"
|
"-version"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"-XX:-TieredCompilation",
|
||||||
|
"-XX:+PrintFlagsFinal",
|
||||||
|
"-XX:CompileThreshold=1000",
|
||||||
|
"-XX:CompileThresholdScaling=0.0",
|
||||||
|
"-version"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"-XX:-TieredCompilation",
|
"-XX:-TieredCompilation",
|
||||||
"-XX:+PrintFlagsFinal",
|
"-XX:+PrintFlagsFinal",
|
||||||
@ -107,6 +114,11 @@ public class CheckCompileThresholdScaling {
|
|||||||
"intx CompileThreshold := 750 {pd product}",
|
"intx CompileThreshold := 750 {pd product}",
|
||||||
"double CompileThresholdScaling := 0.750000 {product}"
|
"double CompileThresholdScaling := 0.750000 {product}"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"intx CompileThreshold := 1000 {pd product}",
|
||||||
|
"double CompileThresholdScaling := 0.000000 {product}",
|
||||||
|
"interpreted mode"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"intx CompileThreshold := 0 {pd product}",
|
"intx CompileThreshold := 0 {pd product}",
|
||||||
"double CompileThresholdScaling := 0.750000 {product}",
|
"double CompileThresholdScaling := 0.750000 {product}",
|
||||||
@ -295,21 +307,21 @@ public class CheckCompileThresholdScaling {
|
|||||||
"double CompileThresholdScaling := 2.000000 {product}"
|
"double CompileThresholdScaling := 2.000000 {product}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"intx Tier0BackedgeNotifyFreqLog := 0 {product}",
|
"intx Tier0BackedgeNotifyFreqLog := 10 {product}",
|
||||||
"intx Tier0InvokeNotifyFreqLog := 0 {product}",
|
"intx Tier0InvokeNotifyFreqLog := 7 {product}",
|
||||||
"intx Tier23InlineeNotifyFreqLog := 0 {product}",
|
"intx Tier23InlineeNotifyFreqLog := 20 {product}",
|
||||||
"intx Tier2BackedgeNotifyFreqLog := 0 {product}",
|
"intx Tier2BackedgeNotifyFreqLog := 14 {product}",
|
||||||
"intx Tier2InvokeNotifyFreqLog := 0 {product}",
|
"intx Tier2InvokeNotifyFreqLog := 11 {product}",
|
||||||
"intx Tier3BackEdgeThreshold := 0 {product}",
|
"intx Tier3BackEdgeThreshold := 60000 {product}",
|
||||||
"intx Tier3BackedgeNotifyFreqLog := 0 {product}",
|
"intx Tier3BackedgeNotifyFreqLog := 13 {product}",
|
||||||
"intx Tier3CompileThreshold := 0 {product}",
|
"intx Tier3CompileThreshold := 2000 {product}",
|
||||||
"intx Tier3InvocationThreshold := 0 {product}",
|
"intx Tier3InvocationThreshold := 200 {product}",
|
||||||
"intx Tier3InvokeNotifyFreqLog := 0 {product}",
|
"intx Tier3InvokeNotifyFreqLog := 10 {product}",
|
||||||
"intx Tier3MinInvocationThreshold := 0 {product}",
|
"intx Tier3MinInvocationThreshold := 100 {product}",
|
||||||
"intx Tier4BackEdgeThreshold := 0 {product}",
|
"intx Tier4BackEdgeThreshold := 40000 {product}",
|
||||||
"intx Tier4CompileThreshold := 0 {product}",
|
"intx Tier4CompileThreshold := 15000 {product}",
|
||||||
"intx Tier4InvocationThreshold := 0 {product}",
|
"intx Tier4InvocationThreshold := 5000 {product}",
|
||||||
"intx Tier4MinInvocationThreshold := 0 {product}",
|
"intx Tier4MinInvocationThreshold := 600 {product}",
|
||||||
"double CompileThresholdScaling := 0.000000 {product}",
|
"double CompileThresholdScaling := 0.000000 {product}",
|
||||||
"interpreted mode"
|
"interpreted mode"
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user