Summary
Disallow a value of zero for the option -XX:G1ConfidencePercent
.
Problem
-XX:G1ConfidencePercent
allows the user specify with what amount of certainty several predictions are made within the G1 garbage collector, where lower values indicate that G1 should treat intermediate values for predictions with less confidence and higher values with higher confidence. The range of this value is currently a percentage from 0-100
.
There is no useful interpretation of the lower bound, the value 0
: G1 can not work with a direction of "have no confidence at all".
Solution
Disallow the lower range value of 0
, and let the minimum be 1
, indicating a very low confidence.
Specification
--- a/src/hotspot/share/gc/g1/g1_globals.hpp
+++ b/src/hotspot/share/gc/g1/g1_globals.hpp
@@ -112,7 +112,7 @@
\
product(uint, G1ConfidencePercent, 50, \
"Confidence level for MMU/pause predictions") \
- range(0, 100) \
+ range(1, 100) \
\
product(uintx, G1SummarizeRSetStatsPeriod, 0, DIAGNOSTIC, \
"The period (in number of GCs) at which we will generate " \
- csr of
-
JDK-8336912 G1: Undefined behavior for G1ConfidencePercent=0
-
- Resolved
-