< prev index next >

src/share/vm/runtime/globals.hpp

Print this page

        

@@ -448,11 +448,10 @@
   ~SizeTFlagSetting()                           { *flag = val; }
 };
 
 
 class CommandLineFlags {
-  static bool _finished_initializing;
 public:
   static Flag::Error boolAt(const char* name, size_t len, bool* value, bool allow_locked = false, bool return_flag = false);
   static Flag::Error boolAt(const char* name, bool* value, bool allow_locked = false, bool return_flag = false)      { return boolAt(name, strlen(name), value, allow_locked, return_flag); }
   static Flag::Error boolAtPut(const char* name, size_t len, bool* value, Flag::Flags origin);
   static Flag::Error boolAtPut(const char* name, bool* value, Flag::Flags origin)   { return boolAtPut(name, strlen(name), value, origin); }

@@ -504,15 +503,15 @@
   static void printSetFlags(outputStream* out);
 
   // printRanges will print out flags type, name and range values as expected by -XX:+PrintFlagsRanges
   static void printFlags(outputStream* out, bool withComments, bool printRanges = false);
 
-  // Returns true if all flags have their final values set (ready for ranges and constraint check)
-  static bool finishedInitializing() { return _finished_initializing; }
+  // Check the final values of all flags for ranges and all flags for 'AfterParse' constraints
+  static bool check_ranges_and_constraints_of_after_parse();
 
-  // Check the final values of all flags for ranges and constraints
-  static bool check_all_ranges_and_constraints();
+  // Check the final values of all flags for 'AfterMemoryInit' constraints
+  static bool check_constraints_of_after_memory_init();
 
   static void verify() PRODUCT_RETURN;
 };
 
 // use this for flags that are true by default in the debug version but

@@ -638,11 +637,11 @@
           "Print compressed oops base address and encoding mode")           \
                                                                             \
   lp64_product(intx, ObjectAlignmentInBytes, 8,                             \
           "Default object alignment in bytes, 8 is minimum")                \
           range(8, 256)                                                     \
-          constraint(ObjectAlignmentInBytesConstraintFunc)                  \
+          constraint(ObjectAlignmentInBytesConstraintFunc,Anytime)          \
                                                                             \
   product(bool, AssumeMP, false,                                            \
           "Instruct the VM to assume multiple processors are available")    \
                                                                             \
   /* UseMembar is theoretically a temp flag used for memory barrier      */ \

@@ -1392,11 +1391,11 @@
   /* aggressive prefetching, while still leaving the room for segregating */\
   /* among the distinct pages.                                            */\
   product(intx, ContendedPaddingWidth, 128,                                 \
           "How many bytes to pad the fields/classes marked @Contended with")\
           range(0, 8192)                                                    \
-          constraint(ContendedPaddingWidthConstraintFunc)                   \
+          constraint(ContendedPaddingWidthConstraintFunc,Anytime)           \
                                                                             \
   product(bool, EnableContended, true,                                      \
           "Enable @Contended annotation support")                           \
                                                                             \
   product(bool, RestrictContended, true,                                    \

@@ -1593,10 +1592,11 @@
   product(uint, ConcGCThreads, 0,                                           \
           "Number of threads concurrent gc will use")                       \
                                                                             \
   product(size_t, YoungPLABSize, 4096,                                      \
           "Size of young gen promotion LAB's (in HeapWords)")               \
+          constraint(YoungPLABSizeConstraintFunc,AfterMemoryInit)           \
                                                                             \
   product(size_t, OldPLABSize, 1024,                                        \
           "Size of old gen promotion LAB's (in HeapWords), or Number        \
           of blocks to attempt to claim when refilling CMS LAB's")          \
                                                                             \

@@ -1731,11 +1731,11 @@
                                                                             \
   product(size_t, CMSOldPLABMin, 16,                                        \
           "Minimum size of CMS gen promotion LAB caches per worker "        \
           "per block size")                                                 \
           range(1, max_uintx)                                               \
-          constraint(CMSOldPLABMinConstraintFunc)                           \
+          constraint(CMSOldPLABMinConstraintFunc,AfterParse)                \
                                                                             \
   product(uintx, CMSOldPLABNumRefills, 4,                                   \
           "Nominal number of refills of CMS gen promotion LAB cache "       \
           "per worker per block size")                                      \
           range(1, max_uintx)                                               \

@@ -1927,17 +1927,17 @@
                                                                             \
   product(uintx, CMSPrecleanDenominator, 3,                                 \
           "CMSPrecleanNumerator:CMSPrecleanDenominator yields convergence " \
           "ratio")                                                          \
           range(1, max_uintx)                                               \
-          constraint(CMSPrecleanDenominatorConstraintFunc)                  \
+          constraint(CMSPrecleanDenominatorConstraintFunc,AfterParse)       \
                                                                             \
   product(uintx, CMSPrecleanNumerator, 2,                                   \
           "CMSPrecleanNumerator:CMSPrecleanDenominator yields convergence " \
           "ratio")                                                          \
           range(0, max_uintx-1)                                             \
-          constraint(CMSPrecleanNumeratorConstraintFunc)                    \
+          constraint(CMSPrecleanNumeratorConstraintFunc,AfterParse)         \
                                                                             \
   product(bool, CMSPrecleanRefLists1, true,                                 \
           "Preclean ref lists during (initial) preclean phase")             \
                                                                             \
   product(bool, CMSPrecleanRefLists2, false,                                \

@@ -3354,18 +3354,18 @@
   manageable(uintx, MinHeapFreeRatio, 40,                                   \
           "The minimum percentage of heap free after GC to avoid expansion."\
           " For most GCs this applies to the old generation. In G1 and"     \
           " ParallelGC it applies to the whole heap.")                      \
           range(0, 100)                                                     \
-          constraint(MinHeapFreeRatioConstraintFunc)                        \
+          constraint(MinHeapFreeRatioConstraintFunc,AfterParse)             \
                                                                             \
   manageable(uintx, MaxHeapFreeRatio, 70,                                   \
           "The maximum percentage of heap free after GC to avoid shrinking."\
           " For most GCs this applies to the old generation. In G1 and"     \
           " ParallelGC it applies to the whole heap.")                      \
           range(0, 100)                                                     \
-          constraint(MaxHeapFreeRatioConstraintFunc)                        \
+          constraint(MaxHeapFreeRatioConstraintFunc,AfterParse)             \
                                                                             \
   product(intx, SoftRefLRUPolicyMSPerMB, 1000,                              \
           "Number of milliseconds per MB of free space in the heap")        \
                                                                             \
   product(size_t, MinHeapDeltaBytes, ScaleForWordSize(128*K),               \

@@ -3376,17 +3376,17 @@
                                                                             \
   product(uintx, MaxMetaspaceFreeRatio,    70,                              \
           "The maximum percentage of Metaspace free after GC to avoid "     \
           "shrinking")                                                      \
           range(0, 100)                                                     \
-          constraint(MaxMetaspaceFreeRatioConstraintFunc)                   \
+          constraint(MaxMetaspaceFreeRatioConstraintFunc,AfterParse)        \
                                                                             \
   product(uintx, MinMetaspaceFreeRatio,    40,                              \
           "The minimum percentage of Metaspace free after GC to avoid "     \
           "expansion")                                                      \
           range(0, 99)                                                      \
-          constraint(MinMetaspaceFreeRatioConstraintFunc)                   \
+          constraint(MinMetaspaceFreeRatioConstraintFunc,AfterParse)        \
                                                                             \
   product(size_t, MaxMetaspaceExpansion, ScaleForWordSize(4*M),             \
           "The maximum expansion of Metaspace without full GC (in bytes)")  \
                                                                             \
   product(uintx, QueuedAllocationWarningCount, 0,                           \

@@ -3400,16 +3400,16 @@
           "Generation level at which to start +VerifyBefore/AfterGC")       \
                                                                             \
   product(uintx, MaxTenuringThreshold,    15,                               \
           "Maximum value for tenuring threshold")                           \
           range(0, markOopDesc::max_age + 1)                                \
-          constraint(MaxTenuringThresholdConstraintFunc)                    \
+          constraint(MaxTenuringThresholdConstraintFunc,AfterParse)         \
                                                                             \
   product(uintx, InitialTenuringThreshold,    7,                            \
           "Initial value for tenuring threshold")                           \
           range(0, markOopDesc::max_age + 1)                                \
-          constraint(InitialTenuringThresholdConstraintFunc)                \
+          constraint(InitialTenuringThresholdConstraintFunc,AfterParse)     \
                                                                             \
   product(uintx, TargetSurvivorRatio,    50,                                \
           "Desired percentage of survivor space used after scavenge")       \
           range(0, 100)                                                     \
                                                                             \

@@ -4089,11 +4089,11 @@
   product(bool, PrintGCCause, true,                                         \
           "Include GC cause in GC logging")                                 \
                                                                             \
   experimental(intx, SurvivorAlignmentInBytes, 0,                           \
            "Default survivor space alignment in bytes")                     \
-           constraint(SurvivorAlignmentInBytesConstraintFunc)               \
+           constraint(SurvivorAlignmentInBytesConstraintFunc,AfterParse)    \
                                                                             \
   product(bool , AllowNonVirtualCalls, false,                               \
           "Obey the ACC_SUPER flag and allow invokenonvirtual calls")       \
                                                                             \
   product(ccstr, DumpLoadedClassList, NULL,                                 \

@@ -4189,11 +4189,11 @@
 #endif // _LP64
 
 // Only materialize src code for range checking when required, ignore otherwise
 #define IGNORE_RANGE(a, b)
 // Only materialize src code for contraint checking when required, ignore otherwise
-#define IGNORE_CONSTRAINT(func)
+#define IGNORE_CONSTRAINT(func,type)
 
 RUNTIME_FLAGS(DECLARE_DEVELOPER_FLAG, \
               DECLARE_PD_DEVELOPER_FLAG, \
               DECLARE_PRODUCT_FLAG, \
               DECLARE_PD_PRODUCT_FLAG, \
< prev index next >