RFR(S): 8059604: Add CompileThresholdScalingPercentage flag to control when methods are first compiled (with +/-TieredCompilation)
zoltan.majo at oracle.com
Tue Oct 7 10:32:32 UTC 2014
please review the following patch.
Problem: With tiered compilation enabled, the value of 6 different
thresholds must be set to control when the JVM compiles methods for the
first time. That is too detailed for the average customer.
Solution: This patch adds a new flag, CompileThresholdScalingPercentage,
to control when methods are first compiled. The new flag scales
thresholds the following way:
- if CompileThresholdScalingPercentage==100, the default threshold
values are used
- if CompileThresholdScalingPercentage>100, threshold values are scaled
up (e.g., CompileThresholdScalingPercentage=120 scales up thresholds by
a factor of 1.2X)
- if 0 < CompileThresholdScalingPercentage < 100, threshold values are
scaled down accordingly.
The new flag works both with and without tiered compilation. Thus, the
new flag allows compilation to be controlled the same way both with and
without tiered compilation:
- with tiered compilation enabled, the value of the flags
Tier3CompileThreshold, and Tier3BackEdgeThreshold is scaled
- with tiered compilation disabled, the value of CompileThreshold is scaled
Currently, tiered and non-tiered compilation treats threshold values
slightly differently: For a threshold value of N and without tiered
compilation enabled, methods are compiled *before* their Nth execution.
With tiered compilation enabled, methods are compiled *after* the their
The patch addresses the difference between tiered/non-tiered
compilation: Methods are compiled right before their Nth execution in
both cases (the non-tiered way). If
CompileThresholdScalingPercentage==0, all methods are interpreted
(similarly to the case when CompileThreshold==0).
This patch is the second (out of three) parts of JDK-8050853 (adding
support for per-compilation thresholds):
Testing: JPRT, manual testing
Thank you and best regards,
More information about the hotspot-compiler-dev