hotspot/src/share/vm/runtime/commandLineFlagConstraintList.cpp
changeset 33144 c56850e328fc
parent 32613 73bec9f941d7
child 33222 e0a340f4ab6e
child 33198 b37ad9fbf681
--- a/hotspot/src/share/vm/runtime/commandLineFlagConstraintList.cpp	Thu Oct 08 12:47:17 2015 +0200
+++ b/hotspot/src/share/vm/runtime/commandLineFlagConstraintList.cpp	Mon Oct 05 14:56:19 2015 -0700
@@ -220,7 +220,7 @@
 #define EMIT_CONSTRAINT_CHECK(func, type)                               , func, CommandLineFlagConstraint::type
 
 // the "name" argument must be a string literal
-#define INITIAL_CONSTRAINTS_SIZE 16
+#define INITIAL_CONSTRAINTS_SIZE 40
 GrowableArray<CommandLineFlagConstraint*>* CommandLineFlagConstraintList::_constraints = NULL;
 CommandLineFlagConstraint::ConstraintType CommandLineFlagConstraintList::_validating_type = CommandLineFlagConstraint::AtParse;
 
@@ -274,7 +274,7 @@
                                    EMIT_CONSTRAINT_CHECK));
 #endif // COMPILER2
 
-#ifndef INCLUDE_ALL_GCS
+#if INCLUDE_ALL_GCS
   emit_constraint_no(NULL G1_FLAGS(EMIT_CONSTRAINT_DEVELOPER_FLAG,
                                    EMIT_CONSTRAINT_PD_DEVELOPER_FLAG,
                                    EMIT_CONSTRAINT_PRODUCT_FLAG,
@@ -305,10 +305,7 @@
 
 // Check constraints for specific constraint type.
 bool CommandLineFlagConstraintList::check_constraints(CommandLineFlagConstraint::ConstraintType type) {
-  // Skip if we already checked.
-  if (type < _validating_type) {
-    return true;
-  }
+  guarantee(type > _validating_type, "Constraint check is out of order.");
   _validating_type = type;
 
   bool status = true;