8152118: MinTLABSize should be less than TLAB max
Summary: Add a constraint for MinTLABSize to be less than or equal to TLAB max
Reviewed-by: brutisso, drwhite, jmasa
--- a/hotspot/src/share/vm/runtime/commandLineFlagConstraintsGC.cpp Sat Mar 19 02:44:27 2016 +0000
+++ b/hotspot/src/share/vm/runtime/commandLineFlagConstraintsGC.cpp Fri Mar 18 21:01:28 2016 -0700
@@ -606,9 +606,15 @@
"greater than or equal to reserved area in TLAB (" SIZE_FORMAT ")\n",
value, ThreadLocalAllocBuffer::alignment_reserve_in_bytes());
return Flag::VIOLATES_CONSTRAINT;
- } else {
- return Flag::SUCCESS;
}
+ if (value > (ThreadLocalAllocBuffer::max_size() * HeapWordSize)) {
+ CommandLineError::print(verbose,
+ "MinTLABSize (" SIZE_FORMAT ") must be "
+ "less than or equal to ergonomic TLAB maximum (" SIZE_FORMAT ")\n",
+ value, ThreadLocalAllocBuffer::max_size() * HeapWordSize);
+ return Flag::VIOLATES_CONSTRAINT;
+ }
+ return Flag::SUCCESS;
}
Flag::Error TLABSizeConstraintFunc(size_t value, bool verbose) {