8152118: MinTLABSize should be less than TLAB max
authorsangheki
Fri, 18 Mar 2016 21:01:28 -0700
changeset 37157 2a0fdb3e2a19
parent 37156 69105bc2e794
child 37158 b882bbfa1af0
child 37159 baf5e8b0bd96
child 37161 e881f320966e
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
hotspot/src/share/vm/runtime/commandLineFlagConstraintsGC.cpp
--- 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) {