6820066: Check that -XX:ParGCArrayScanChunk has a value larger than zero.
Summary: Check that -XX:ParGCArrayScanChunk has a value larger than zero.
Reviewed-by: johnc, jmasa, ysr
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.cpp Thu Mar 03 11:35:50 2011 +0100
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.cpp Fri Mar 11 16:35:18 2011 +0100
@@ -411,7 +411,7 @@
template <class T> void PSPromotionManager::process_array_chunk_work(
oop obj,
int start, int end) {
- assert(start < end, "invariant");
+ assert(start <= end, "invariant");
T* const base = (T*)objArrayOop(obj)->base();
T* p = base + start;
T* const chunk_end = base + end;
--- a/hotspot/src/share/vm/runtime/arguments.cpp Thu Mar 03 11:35:50 2011 +0100
+++ b/hotspot/src/share/vm/runtime/arguments.cpp Fri Mar 11 16:35:18 2011 +0100
@@ -1668,13 +1668,13 @@
}
bool Arguments::verify_min_value(intx val, intx min, const char* name) {
- // Returns true if given value is greater than specified min threshold
+ // Returns true if given value is at least specified min threshold
// false, otherwise.
if (val >= min ) {
return true;
}
jio_fprintf(defaultStream::error_stream(),
- "%s of " INTX_FORMAT " is invalid; must be greater than " INTX_FORMAT "\n",
+ "%s of " INTX_FORMAT " is invalid; must be at least " INTX_FORMAT "\n",
name, val, min);
return false;
}
@@ -1901,6 +1901,8 @@
status = false;
}
+ status = status && verify_min_value(ParGCArrayScanChunk, 1, "ParGCArrayScanChunk");
+
#ifndef SERIALGC
if (UseG1GC) {
status = status && verify_percentage(InitiatingHeapOccupancyPercent,