8150984: Invalid VM argument causes crash -XX:G1ConcRefinementServiceIntervalMillis=2147483648
Summary: Change maximum range so it can't be negative
Reviewed-by: kbarrett, sangheki
--- a/hotspot/src/share/vm/gc/g1/concurrentG1RefineThread.cpp Tue Mar 01 09:42:19 2016 +0100
+++ b/hotspot/src/share/vm/gc/g1/concurrentG1RefineThread.cpp Thu Mar 03 12:20:22 2016 -0500
@@ -68,7 +68,7 @@
void ConcurrentG1RefineThread::initialize() {
// Current thread activation threshold
_threshold = MIN2(cg1r()->thread_threshold_step() * (_worker_id + 1) + cg1r()->green_zone(),
- cg1r()->yellow_zone());
+ cg1r()->yellow_zone());
// A thread deactivates once the number of buffer reached a deactivation threshold
_deactivation_threshold =
MAX2(_threshold - MIN2(_threshold, cg1r()->thread_threshold_step()),
--- a/hotspot/src/share/vm/gc/g1/g1YoungRemSetSamplingThread.cpp Tue Mar 01 09:42:19 2016 +0100
+++ b/hotspot/src/share/vm/gc/g1/g1YoungRemSetSamplingThread.cpp Thu Mar 03 12:20:22 2016 -0500
@@ -70,7 +70,7 @@
void G1YoungRemSetSamplingThread::sleep_before_next_cycle() {
MutexLockerEx x(&_monitor, Mutex::_no_safepoint_check_flag);
if (!_should_terminate) {
- intx waitms = G1ConcRefinementServiceIntervalMillis; // 300, really should be?
+ uintx waitms = G1ConcRefinementServiceIntervalMillis; // 300, really should be?
_monitor.wait(Mutex::_no_safepoint_check_flag, waitms);
}
}
--- a/hotspot/src/share/vm/gc/g1/g1_globals.hpp Tue Mar 01 09:42:19 2016 +0100
+++ b/hotspot/src/share/vm/gc/g1/g1_globals.hpp Thu Mar 03 12:20:22 2016 -0500
@@ -107,25 +107,25 @@
"Number of enqueued update buffers that will " \
"trigger concurrent processing. Will be selected ergonomically " \
"by default.") \
- range(0, SIZE_MAX) \
+ range(0, max_intx) \
\
product(size_t, G1ConcRefinementRedZone, 0, \
"Maximum number of enqueued update buffers before mutator " \
"threads start processing new ones instead of enqueueing them. " \
"Will be selected ergonomically by default. Zero will disable " \
"concurrent processing.") \
- range(0, SIZE_MAX) \
+ range(0, max_intx) \
\
product(size_t, G1ConcRefinementGreenZone, 0, \
"The number of update buffers that are left in the queue by the " \
"concurrent processing threads. Will be selected ergonomically " \
"by default.") \
- range(0, SIZE_MAX) \
+ range(0, max_intx) \
\
product(uintx, G1ConcRefinementServiceIntervalMillis, 300, \
"The last concurrent refinement thread wakes up every " \
"specified number of milliseconds to do miscellaneous work.") \
- range(0, max_uintx) \
+ range(0, max_jint) \
\
product(size_t, G1ConcRefinementThresholdStep, 0, \
"Each time the rset update queue increases by this amount " \