< prev index next >

src/share/vm/runtime/globals.hpp

Print this page
rev 8851 : [mq]: webrev.00
rev 8852 : [mq]: webrev.01

@@ -24,10 +24,11 @@
 
 #ifndef SHARE_VM_RUNTIME_GLOBALS_HPP
 #define SHARE_VM_RUNTIME_GLOBALS_HPP
 
 #include "utilities/debug.hpp"
+#include <float.h> // for DBL_MAX
 
 // use this for flags that are true per default in the tiered build
 // but false in non-tiered builds, and vice versa
 #ifdef TIERED
 #define  trueInTiered true

@@ -1549,10 +1550,11 @@
           "limiter (a number between 0-100)")                               \
           range(0, 100)                                                     \
                                                                             \
   product(uint, ParallelGCThreads, 0,                                       \
           "Number of parallel threads parallel gc will use")                \
+          constraint(ParallelGCThreadsConstraintFunc,AfterErgo)             \
                                                                             \
   diagnostic(bool, UseSemaphoreGCThreadsSynchronization, true,              \
             "Use semaphore synchronization for the GC Threads, "            \
             "instead of synchronization based on mutexes")                  \
                                                                             \

@@ -1580,18 +1582,11 @@
           "How often to provoke splitting a young gen space")               \
           range(0, max_uintx)                                               \
                                                                             \
   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")          \
+          constraint(ConcGCThreadsConstraintFunc,AfterErgo)                 \
                                                                             \
   product(uintx, GCTaskTimeStampEntries, 200,                               \
           "Number of time stamp entries per gc worker thread")              \
           range(1, max_uintx)                                               \
                                                                             \

@@ -1695,10 +1690,11 @@
                                                                             \
   diagnostic(uintx, ParGCStridesPerThread, 2,                               \
           "The number of strides per worker thread that we divide up the "  \
           "card table scanning work into")                                  \
           range(1, max_uintx)                                               \
+          constraint(ParGCStridesPerThreadConstraintFunc,AfterErgo)         \
                                                                             \
   diagnostic(intx, ParGCCardsPerStrideChunk, 256,                           \
           "The number of cards in each chunk of the parallel chunks used "  \
           "during card table scanning")                                     \
           range(1, max_intx)                                                \

@@ -1717,16 +1713,17 @@
                                                                             \
   product(size_t, CMSOldPLABMax, 1024,                                      \
           "Maximum size of CMS gen promotion LAB caches per worker "        \
           "per block size")                                                 \
           range(1, max_uintx)                                               \
+          constraint(CMSOldPLABMaxConstraintFunc,AfterMemoryInit)           \
                                                                             \
   product(size_t, CMSOldPLABMin, 16,                                        \
           "Minimum size of CMS gen promotion LAB caches per worker "        \
           "per block size")                                                 \
           range(1, max_uintx)                                               \
-          constraint(CMSOldPLABMinConstraintFunc,AfterErgo)                 \
+          constraint(CMSOldPLABMinConstraintFunc,AfterMemoryInit)           \
                                                                             \
   product(uintx, CMSOldPLABNumRefills, 4,                                   \
           "Nominal number of refills of CMS gen promotion LAB cache "       \
           "per worker per block size")                                      \
           range(1, max_uintx)                                               \

@@ -1781,28 +1778,33 @@
           "CMS: larger free blocks are always available for coalescing")    \
                                                                             \
   product(double, FLSLargestBlockCoalesceProximity, 0.99,                   \
           "CMS: the smaller the percentage the greater the coalescing "     \
           "force")                                                          \
+          range(0.0, 1.0)                                                   \
                                                                             \
   product(double, CMSSmallCoalSurplusPercent, 1.05,                         \
           "CMS: the factor by which to inflate estimated demand of small "  \
           "block sizes to prevent coalescing with an adjoining block")      \
+          range(0.0, DBL_MAX)                                               \
                                                                             \
   product(double, CMSLargeCoalSurplusPercent, 0.95,                         \
           "CMS: the factor by which to inflate estimated demand of large "  \
           "block sizes to prevent coalescing with an adjoining block")      \
+          range(0.0, DBL_MAX)                                               \
                                                                             \
   product(double, CMSSmallSplitSurplusPercent, 1.10,                        \
           "CMS: the factor by which to inflate estimated demand of small "  \
           "block sizes to prevent splitting to supply demand for smaller "  \
           "blocks")                                                         \
+          range(0.0, DBL_MAX)                                               \
                                                                             \
   product(double, CMSLargeSplitSurplusPercent, 1.00,                        \
           "CMS: the factor by which to inflate estimated demand of large "  \
           "block sizes to prevent splitting to supply demand for smaller "  \
           "blocks")                                                         \
+          range(0.0, DBL_MAX)                                               \
                                                                             \
   product(bool, CMSExtrapolateSweep, false,                                 \
           "CMS: cushion for block demand during sweep")                     \
                                                                             \
   product(uintx, CMS_SweepWeight, 75,                                       \

@@ -1826,13 +1828,15 @@
           "When CMS class unloading is enabled, the maximum CMS cycle "     \
           "count for which classes may not be unloaded")                    \
                                                                             \
   develop(intx, CMSDictionaryChoice, 0,                                     \
           "Use BinaryTreeDictionary as default in the CMS generation")      \
+          range(0, 2)                                                       \
                                                                             \
   product(uintx, CMSIndexedFreeListReplenish, 4,                            \
           "Replenish an indexed free list with this number of chunks")      \
+          range(1, max_uintx)                                               \
                                                                             \
   product(bool, CMSReplenishIntermediate, true,                             \
           "Replenish all intermediate free-list caches")                    \
                                                                             \
   product(bool, CMSSplitIndexedFreeListBlocks, true,                        \

@@ -1843,18 +1847,19 @@
           "Warn in case of excessive CMS looping")                          \
                                                                             \
   develop(bool, CMSOverflowEarlyRestoration, false,                         \
           "Restore preserved marks early")                                  \
                                                                             \
-  product(size_t, MarkStackSize, NOT_LP64(32*K) LP64_ONLY(4*M),             \
-          "Size of marking stack")                                          \
-                                                                            \
   /* where does the range max value of (max_jint - 1) come from? */         \
   product(size_t, MarkStackSizeMax, NOT_LP64(4*M) LP64_ONLY(512*M),         \
           "Maximum size of marking stack")                                  \
           range(1, (max_jint - 1))                                          \
                                                                             \
+  product(size_t, MarkStackSize, NOT_LP64(32*K) LP64_ONLY(4*M),             \
+          "Size of marking stack")                                          \
+          range(0, MarkStackSizeMax)                                        \
+                                                                            \
   notproduct(bool, CMSMarkStackOverflowALot, false,                         \
           "Simulate frequent marking stack / work queue overflow")          \
                                                                             \
   notproduct(uintx, CMSMarkStackOverflowInterval, 1000,                     \
           "An \"interval\" counter that determines how frequently "         \

@@ -1863,17 +1868,19 @@
   product(uintx, CMSMaxAbortablePrecleanLoops, 0,                           \
           "Maximum number of abortable preclean iterations, if > 0")        \
                                                                             \
   product(intx, CMSMaxAbortablePrecleanTime, 5000,                          \
           "Maximum time in abortable preclean (in milliseconds)")           \
+          range(0, max_intx)                                                \
                                                                             \
   product(uintx, CMSAbortablePrecleanMinWorkPerIteration, 100,              \
           "Nominal minimum work per abortable preclean iteration")          \
                                                                             \
   manageable(intx, CMSAbortablePrecleanWaitMillis, 100,                     \
           "Time that we sleep between iterations when not given "           \
           "enough work per iteration")                                      \
+          range(0, max_intx)                                                \
                                                                             \
   product(size_t, CMSRescanMultiple, 32,                                    \
           "Size (in cards) of CMS parallel rescan task")                    \
           range(1, max_uintx)                                               \
                                                                             \

@@ -1976,10 +1983,12 @@
   develop(bool, CMSTraceSweeper, false,                                     \
           "Trace some actions of the CMS sweeper")                          \
                                                                             \
   product(uintx, CMSWorkQueueDrainThreshold, 10,                            \
           "Don't drain below this size per parallel worker/thief")          \
+          range(0, max_juint)                                               \
+          constraint(CMSWorkQueueDrainThresholdConstraintFunc,AfterErgo)    \
                                                                             \
   manageable(intx, CMSWaitDuration, 2000,                                   \
           "Time in milliseconds that CMS thread waits for young GC")        \
                                                                             \
   develop(uintx, CMSCheckInterval, 1000,                                    \

@@ -2232,13 +2241,15 @@
   develop(bool, TraceAdaptiveGCBoundary, false,                             \
           "Trace young-old boundary moves")                                 \
                                                                             \
   develop(intx, PSAdaptiveSizePolicyResizeVirtualSpaceAlot, -1,             \
           "Resize the virtual spaces of the young or old generations")      \
+          range(-1, 1)                                                      \
                                                                             \
   product(uintx, AdaptiveSizeThroughPutPolicy, 0,                           \
           "Policy for changing generation size for throughput goals")       \
+          range(0, 1)                                                       \
                                                                             \
   develop(bool, PSAdjustTenuredGenForMinorPause, false,                     \
           "Adjust tenured generation to achieve a minor pause goal")        \
                                                                             \
   develop(bool, PSAdjustYoungGenForMajorPause, false,                       \

@@ -2306,13 +2317,16 @@
           range(1, max_uintx)                                               \
                                                                             \
   product(uintx, MaxGCPauseMillis, max_uintx,                               \
           "Adaptive size policy maximum GC pause time goal in millisecond, "\
           "or (G1 Only) the maximum GC time per MMU time slice")            \
+          range(1, max_uintx)                                               \
+          constraint(MaxGCPauseMillisConstraintFunc,AfterErgo)              \
                                                                             \
   product(uintx, GCPauseIntervalMillis, 0,                                  \
           "Time slice for MMU specification")                               \
+          constraint(GCPauseIntervalMillisConstraintFunc,AfterErgo)         \
                                                                             \
   product(uintx, MaxGCMinorPauseMillis, max_uintx,                          \
           "Adaptive size policy maximum GC minor pause time goal "          \
           "in millisecond")                                                 \
                                                                             \

@@ -2329,10 +2343,11 @@
   product(uintx, AdaptiveSizeMajorGCDecayTimeScale, 10,                     \
           "Time scale over which major costs decay")                        \
                                                                             \
   product(uintx, MinSurvivorRatio, 3,                                       \
           "Minimum ratio of young generation/survivor space size")          \
+          range(3, max_uintx)                                               \
                                                                             \
   product(uintx, InitialSurvivorRatio, 8,                                   \
           "Initial ratio of young generation/survivor space size")          \
                                                                             \
   product(size_t, BaseFootPrintEstimate, 256*M,                             \

@@ -2352,10 +2367,11 @@
           "OutOfMemoryError is thrown (used with GCTimeLimit)")             \
           range(0, 100)                                                     \
                                                                             \
   develop(uintx, AdaptiveSizePolicyGCTimeLimitThreshold, 5,                 \
           "Number of consecutive collections before gc time limit fires")   \
+          range(1, max_uintx)                                               \
                                                                             \
   product(bool, PrintAdaptiveSizePolicy, false,                             \
           "Print information about AdaptiveSizePolicy")                     \
                                                                             \
   product(intx, PrefetchCopyIntervalInBytes, -1,                            \

@@ -2451,10 +2467,11 @@
           "Print timestamps for individual gc worker thread tasks")         \
                                                                             \
   develop(intx, ConcGCYieldTimeout, 0,                                      \
           "If non-zero, assert that GC threads yield within this "          \
           "number of milliseconds")                                         \
+          range(0, max_intx)                                                \
                                                                             \
   product(bool, PrintReferenceGC, false,                                    \
           "Print times spent handling reference objects during GC "         \
           "(enabled only when PrintGCDetails)")                             \
                                                                             \

@@ -2489,10 +2506,12 @@
           "Trace class loader loader_data lifetime")                        \
                                                                             \
   product(size_t, InitialBootClassLoaderMetaspaceSize,                      \
           NOT_LP64(2200*K) LP64_ONLY(4*M),                                  \
           "Initial size of the boot class loader data metaspace")           \
+          range(BytesPerWord, max_uintx)                                    \
+          constraint(InitialBootClassLoaderMetaspaceSizeConstraintFunc, AfterErgo)\
                                                                             \
   product(bool, TraceYoungGenTime, false,                                   \
           "Trace accumulated time for young collection")                    \
                                                                             \
   product(bool, TraceOldGenTime, false,                                     \

@@ -2565,10 +2584,11 @@
           "by JNI critical section")                                        \
                                                                             \
   experimental(double, ObjectCountCutOffPercent, 0.5,                       \
           "The percentage of the used heap that the instances of a class "  \
           "must occupy for the class to generate a trace event")            \
+          range(0.0, 100.0)                                                 \
                                                                             \
   /* GC log rotation setting */                                             \
                                                                             \
   product(bool, UseGCLogFileRotation, false,                                \
           "Rotate gclog files (for long running applications). It requires "\

@@ -3275,34 +3295,49 @@
           "Size in K to allocate for the Profile Nodes of each thread")     \
                                                                             \
   /* gc parameters */                                                       \
   product(size_t, InitialHeapSize, 0,                                       \
           "Initial heap size (in bytes); zero means use ergonomics")        \
+          range(0, max_uintx)                                               \
+          constraint(InitialHeapSizeConstraintFunc,AfterErgo)               \
                                                                             \
   product(size_t, MaxHeapSize, ScaleForWordSize(96*M),                      \
           "Maximum heap size (in bytes)")                                   \
+          constraint(MaxHeapSizeConstraintFunc,AfterErgo)                   \
                                                                             \
   product(size_t, OldSize, ScaleForWordSize(4*M),                           \
           "Initial tenured generation size (in bytes)")                     \
                                                                             \
   product(size_t, NewSize, ScaleForWordSize(1*M),                           \
           "Initial new generation size (in bytes)")                         \
+          constraint(NewSizeConstraintFunc,AfterErgo)                       \
                                                                             \
   product(size_t, MaxNewSize, max_uintx,                                    \
           "Maximum new generation size (in bytes), max_uintx means set "    \
           "ergonomically")                                                  \
                                                                             \
   product(size_t, PretenureSizeThreshold, 0,                                \
           "Maximum size in bytes of objects allocated in DefNew "           \
           "generation; zero means no maximum")                              \
                                                                             \
-  product(size_t, TLABSize, 0,                                              \
-          "Starting TLAB size (in bytes); zero means set ergonomically")    \
-                                                                            \
   product(size_t, MinTLABSize, 2*K,                                         \
           "Minimum allowed TLAB size (in bytes)")                           \
           range(1, max_uintx)                                               \
+          constraint(MinTLABSizeConstraintFunc,AfterMemoryInit)             \
+                                                                            \
+  product(size_t, TLABSize, 0,                                              \
+          "Starting TLAB size (in bytes); zero means set ergonomically")    \
+          constraint(TLABSizeConstraintFunc,AfterMemoryInit)                \
+                                                                            \
+  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")         \
+          constraint(OldPLABSizeConstraintFunc,AfterMemoryInit)             \
                                                                             \
   product(uintx, TLABAllocationWeight, 35,                                  \
           "Allocation averaging weight")                                    \
           range(0, 100)                                                     \
                                                                             \

@@ -3319,23 +3354,28 @@
   product(uintx, TLABWasteIncrement,    4,                                  \
           "Increment allowed waste at slow allocation")                     \
                                                                             \
   product(uintx, SurvivorRatio, 8,                                          \
           "Ratio of eden/survivor space size")                              \
+          range(1, max_uintx-2)                                             \
+          constraint(SurvivorRatioConstraintFunc,AfterMemoryInit)           \
                                                                             \
   product(uintx, NewRatio, 2,                                               \
           "Ratio of old/new generation sizes")                              \
+          range(0, max_uintx-1)                                             \
                                                                             \
   product_pd(size_t, NewSizeThreadIncrease,                                 \
           "Additional size added to desired new generation size per "       \
           "non-daemon thread (in bytes)")                                   \
                                                                             \
   product_pd(size_t, MetaspaceSize,                                         \
           "Initial size of Metaspaces (in bytes)")                          \
+          constraint(MetaspaceSizeConstraintFunc,AfterErgo)                 \
                                                                             \
   product(size_t, MaxMetaspaceSize, max_uintx,                              \
           "Maximum size of Metaspaces (in bytes)")                          \
+          constraint(MaxMetaspaceSizeConstraintFunc,AfterErgo)              \
                                                                             \
   product(size_t, CompressedClassSpaceSize, 1*G,                            \
           "Maximum size of class area in Metaspace when compressed "        \
           "class pointers are used")                                        \
           range(1*M, 3*G)                                                   \

@@ -3354,10 +3394,12 @@
           range(0, 100)                                                     \
           constraint(MaxHeapFreeRatioConstraintFunc,AfterErgo)              \
                                                                             \
   product(intx, SoftRefLRUPolicyMSPerMB, 1000,                              \
           "Number of milliseconds per MB of free space in the heap")        \
+          range(0, max_intx)                                                \
+          constraint(SoftRefLRUPolicyMSPerMBConstraintFunc,AfterMemoryInit) \
                                                                             \
   product(size_t, MinHeapDeltaBytes, ScaleForWordSize(128*K),               \
           "The minimum change in heap space due to GC (in bytes)")          \
                                                                             \
   product(size_t, MinMetaspaceExpansion, ScaleForWordSize(256*K),           \

@@ -3385,10 +3427,11 @@
   diagnostic(uintx, VerifyGCStartAt,   0,                                   \
           "GC invoke count where +VerifyBefore/AfterGC kicks in")           \
                                                                             \
   diagnostic(intx, VerifyGCLevel,     0,                                    \
           "Generation level at which to start +VerifyBefore/AfterGC")       \
+          range(0, 1)                                                       \
                                                                             \
   product(uintx, MaxTenuringThreshold,    15,                               \
           "Maximum value for tenuring threshold")                           \
           range(0, markOopDesc::max_age + 1)                                \
           constraint(MaxTenuringThresholdConstraintFunc,AfterErgo)          \

@@ -3443,10 +3486,11 @@
   product(intx, DeferPollingPageLoopCount,     -1,                          \
           "(Unsafe,Unstable) Number of iterations in safepoint loop "       \
           "before changing safepoint polling page to RO ")                  \
                                                                             \
   product(intx, SafepointSpinBeforeYield, 2000, "(Unstable)")               \
+          range(0, max_intx)                                                \
                                                                             \
   product(bool, PSChunkLargeArrays, true,                                   \
           "Process large arrays in chunks")                                 \
                                                                             \
   product(uintx, GCDrainStackTargetSize, 64,                                \
< prev index next >