--- old/src/share/vm/runtime/globals.hpp 2015-11-25 10:34:19.742980603 -0800 +++ new/src/share/vm/runtime/globals.hpp 2015-11-25 10:34:19.594980608 -0800 @@ -25,7 +25,6 @@ #ifndef SHARE_VM_RUNTIME_GLOBALS_HPP #define SHARE_VM_RUNTIME_GLOBALS_HPP -#include #include "utilities/debug.hpp" #include // for DBL_MAX @@ -627,6 +626,7 @@ \ product_pd(size_t, HeapBaseMinAddress, \ "OS specific low limit for heap base address") \ + constraint(HeapBaseMinAddressConstraintFunc,AfterErgo) \ \ product(uintx, HeapSearchSteps, 3 PPC64_ONLY(+17), \ "Heap allocation steps through preferred address regions to find" \ @@ -692,6 +692,8 @@ \ product(size_t, NUMAInterleaveGranularity, 2*M, \ "Granularity to use for NUMA interleaving on Windows OS") \ + range(os::vm_allocation_granularity(), max_uintx) \ + constraint(NUMAInterleaveGranularityConstraintFunc,AfterErgo) \ \ product(bool, ForceNUMA, false, \ "Force NUMA optimizations on single-node/UMA systems") \ @@ -704,6 +706,7 @@ \ product(size_t, NUMASpaceResizeRate, 1*G, \ "Do not reallocate more than this amount per collection") \ + range(0, max_uintx) \ \ product(bool, UseAdaptiveNUMAChunkSizing, true, \ "Enable adaptive chunk sizing for NUMA") \ @@ -713,6 +716,7 @@ \ product(uintx, NUMAPageScanRate, 256, \ "Maximum number of pages to include in the page scan procedure") \ + range(0, max_uintx) \ \ product_pd(bool, NeedsDeoptSuspend, \ "True for register window machines (sparc/ia64)") \ @@ -733,9 +737,11 @@ \ product(size_t, LargePageSizeInBytes, 0, \ "Large page size (0 to let VM choose the page size)") \ + range(0, max_uintx) \ \ product(size_t, LargePageHeapSizeThreshold, 128*M, \ "Use large pages if maximum heap is at least this big") \ + range(0, max_uintx) \ \ product(bool, ForceTimeHighResolution, false, \ "Using high time resolution (for Win32 only)") \ @@ -1532,9 +1538,11 @@ product(uintx, HeapMaximumCompactionInterval, 20, \ "How often should we maximally compact the heap (not allowing " \ "any dead space)") \ + range(0, max_uintx) \ \ product(uintx, HeapFirstMaximumCompactionCount, 3, \ "The collection count for the first maximum compaction") \ + range(0, max_uintx) \ \ product(bool, UseMaximumCompactionOnSystemGC, true, \ "Use maximum compaction in the Parallel Old garbage collector " \ @@ -1616,6 +1624,7 @@ diagnostic(uintx, GCLockerRetryAllocationCount, 2, \ "Number of times to retry allocations when " \ "blocked by the GC locker") \ + range(0, max_uintx) \ \ product(bool, UseCMSBestFit, true, \ "Use CMS best fit allocation strategy") \ @@ -1670,6 +1679,7 @@ \ product(uintx, ParGCDesiredObjsFromOverflowList, 20, \ "The desired number of objects to claim from the overflow list") \ + range(0, max_uintx) \ \ diagnostic(uintx, ParGCStridesPerThread, 2, \ "The number of strides per worker thread that we divide up the " \ @@ -1723,6 +1733,7 @@ product(uintx, CMSOldPLABReactivityFactor, 2, \ "The gain in the feedback loop for on-the-fly PLAB resizing " \ "during a scavenge") \ + range(1, max_uintx) \ \ product(bool, AlwaysPreTouch, false, \ "Force all freshly committed pages to be pre-touched") \ @@ -1751,6 +1762,7 @@ product(uintx, CMS_FLSPadding, 1, \ "The multiple of deviation from mean to use for buffering " \ "against volatility in free list demand") \ + range(0, max_juint) \ \ product(uintx, FLSCoalescePolicy, 2, \ "CMS: aggressiveness level for coalescing, increasing " \ @@ -1799,10 +1811,12 @@ product(uintx, CMS_SweepPadding, 1, \ "The multiple of deviation from mean to use for buffering " \ "against volatility in inter-sweep duration") \ + range(0, max_juint) \ \ product(uintx, CMS_SweepTimerThresholdMillis, 10, \ "Skip block flux-rate sampling for an epoch unless inter-sweep " \ "duration exceeds this threshold in milliseconds") \ + range(0, max_uintx) \ \ product(bool, CMSClassUnloadingEnabled, true, \ "Whether class unloading enabled when using CMS GC") \ @@ -1810,6 +1824,7 @@ product(uintx, CMSClassUnloadingMaxInterval, 0, \ "When CMS class unloading is enabled, the maximum CMS cycle " \ "count for which classes may not be unloaded") \ + range(0, max_uintx) \ \ product(uintx, CMSIndexedFreeListReplenish, 4, \ "Replenish an indexed free list with this number of chunks") \ @@ -1843,6 +1858,7 @@ \ product(uintx, CMSMaxAbortablePrecleanLoops, 0, \ "Maximum number of abortable preclean iterations, if > 0") \ + range(0, max_uintx) \ \ product(intx, CMSMaxAbortablePrecleanTime, 5000, \ "Maximum time in abortable preclean (in milliseconds)") \ @@ -1850,6 +1866,7 @@ \ product(uintx, CMSAbortablePrecleanMinWorkPerIteration, 100, \ "Nominal minimum work per abortable preclean iteration") \ + range(0, max_uintx) \ \ manageable(intx, CMSAbortablePrecleanWaitMillis, 100, \ "Time that we sleep between iterations when not given " \ @@ -1937,6 +1954,7 @@ \ product(size_t, CMSScheduleRemarkEdenSizeThreshold, 2*M, \ "If Eden size is below this, do not try to schedule remark") \ + range(0, max_uintx) \ \ product(uintx, CMSScheduleRemarkEdenPenetration, 50, \ "The Eden occupancy percentage (0-100) at which " \ @@ -1966,6 +1984,7 @@ \ manageable(intx, CMSWaitDuration, 2000, \ "Time in milliseconds that CMS thread waits for young GC") \ + range(min_jint, max_jint) \ \ develop(uintx, CMSCheckInterval, 1000, \ "Interval in milliseconds that CMS thread checks if it " \ @@ -2167,6 +2186,7 @@ product(size_t, ErgoHeapSizeLimit, 0, \ "Maximum ergonomically set heap size (in bytes); zero means use " \ "MaxRAM / MaxRAMFraction") \ + range(0, max_uintx) \ \ product(uintx, MaxRAMFraction, 4, \ "Maximum fraction (1/n) of real memory used for maximum heap " \ @@ -2191,6 +2211,7 @@ \ product(uintx, AutoGCSelectPauseMillis, 5000, \ "Automatic GC selection pause threshold in milliseconds") \ + range(0, max_uintx) \ \ product(bool, UseAdaptiveSizePolicy, true, \ "Use adaptive generation sizing policies") \ @@ -2223,12 +2244,14 @@ \ product(uintx, AdaptiveSizePolicyInitializingSteps, 20, \ "Number of steps where heuristics is used before data is used") \ + range(0, max_uintx) \ \ develop(uintx, AdaptiveSizePolicyReadyThreshold, 5, \ "Number of collections before the adaptive sizing is started") \ \ product(uintx, AdaptiveSizePolicyOutputInterval, 0, \ "Collection interval for printing information; zero means never") \ + range(0, max_uintx) \ \ product(bool, UseAdaptiveSizePolicyFootprintGoal, true, \ "Use adaptive minimum footprint as a goal") \ @@ -2243,12 +2266,15 @@ \ product(uintx, PausePadding, 1, \ "How much buffer to keep for pause time") \ + range(0, max_juint) \ \ product(uintx, PromotedPadding, 3, \ "How much buffer to keep for promotion failure") \ + range(0, max_juint) \ \ product(uintx, SurvivorPadding, 3, \ "How much buffer to keep for survivor overflow") \ + range(0, max_juint) \ \ product(uintx, ThresholdTolerance, 10, \ "Allowed collection cost difference between generations") \ @@ -2257,6 +2283,7 @@ product(uintx, AdaptiveSizePolicyCollectionCostMargin, 50, \ "If collection costs are within margin, reduce both by full " \ "delta") \ + range(0, 100) \ \ product(uintx, YoungGenerationSizeIncrement, 20, \ "Adaptive size percentage change in young generation") \ @@ -2295,9 +2322,11 @@ product(uintx, MaxGCMinorPauseMillis, max_uintx, \ "Adaptive size policy maximum GC minor pause time goal " \ "in millisecond") \ + range(0, max_uintx) \ \ product(uintx, GCTimeRatio, 99, \ "Adaptive size policy application time to GC time ratio") \ + range(0, max_juint) \ \ product(uintx, AdaptiveSizeDecrementScaleFactor, 4, \ "Adaptive size scale down factor for shrinking") \ @@ -2308,6 +2337,7 @@ \ product(uintx, AdaptiveSizeMajorGCDecayTimeScale, 10, \ "Time scale over which major costs decay") \ + range(0, max_uintx) \ \ product(uintx, MinSurvivorRatio, 3, \ "Minimum ratio of young generation/survivor space size") \ @@ -2315,9 +2345,11 @@ \ product(uintx, InitialSurvivorRatio, 8, \ "Initial ratio of young generation/survivor space size") \ + range(0, max_uintx) \ \ product(size_t, BaseFootPrintEstimate, 256*M, \ "Estimate of footprint other than Java Heap") \ + range(0, max_uintx) \ \ product(bool, UseGCOverheadLimit, true, \ "Use policy to limit of proportion of time spent in GC " \ @@ -2342,12 +2374,15 @@ \ product(intx, PrefetchCopyIntervalInBytes, -1, \ "How far ahead to prefetch destination area (<= 0 means off)") \ + range(-1, max_jint) \ \ product(intx, PrefetchScanIntervalInBytes, -1, \ "How far ahead to prefetch scan area (<= 0 means off)") \ + range(-1, max_jint) \ \ product(intx, PrefetchFieldsAhead, -1, \ "How many fields ahead to prefetch in oop scan (<= 0 means off)") \ + range(-1, max_jint) \ \ diagnostic(bool, VerifySilently, false, \ "Do not print the verification progress") \ @@ -2395,6 +2430,7 @@ \ diagnostic(uintx, CPUForCMSThread, 0, \ "When BindCMSThreadToCPU is true, the CPU to bind CMS thread to") \ + range(0, max_juint) \ \ product(bool, BindGCTaskThreadsToCPUs, false, \ "Bind GCTaskThreads to CPUs if possible") \ @@ -2404,14 +2440,17 @@ \ product(uintx, ProcessDistributionStride, 4, \ "Stride through processors when distributing processes") \ + range(0, max_juint) \ \ product(uintx, CMSCoordinatorYieldSleepCount, 10, \ "Number of times the coordinator GC thread will sleep while " \ "yielding before giving up and resuming GC") \ + range(0, max_juint) \ \ product(uintx, CMSYieldSleepCount, 0, \ "Number of times a GC thread (minus the coordinator) " \ "will sleep while yielding before giving up and resuming GC") \ + range(0, max_juint) \ \ /* gc tracing */ \ manageable(bool, PrintGC, false, \ @@ -2560,10 +2599,12 @@ product(uintx, NumberOfGCLogFiles, 0, \ "Number of gclog files in rotation " \ "(default: 0, no rotation)") \ + range(0, max_uintx) \ \ product(size_t, GCLogFileSize, 8*K, \ "GC log file size, requires UseGCLogFileRotation. " \ "Set to 0 to only trigger rotation via jcmd") \ + range(0, max_uintx) \ \ /* JVMTI heap profiling */ \ \ @@ -3331,6 +3372,7 @@ \ product(size_t, OldSize, ScaleForWordSize(4*M), \ "Initial tenured generation size (in bytes)") \ + range(0, max_uintx) \ \ product(size_t, NewSize, ScaleForWordSize(1*M), \ "Initial new generation size (in bytes)") \ @@ -3339,10 +3381,12 @@ product(size_t, MaxNewSize, max_uintx, \ "Maximum new generation size (in bytes), max_uintx means set " \ "ergonomically") \ + range(0, max_uintx) \ \ product(size_t, PretenureSizeThreshold, 0, \ "Maximum size in bytes of objects allocated in DefNew " \ "generation; zero means no maximum") \ + range(0, max_uintx) \ \ product(size_t, MinTLABSize, 2*K, \ "Minimum allowed TLAB size (in bytes)") \ @@ -3374,10 +3418,12 @@ \ product(uintx, TLABRefillWasteFraction, 64, \ "Maximum TLAB waste at a refill (internal fragmentation)") \ - range(1, max_uintx) \ + range(1, max_juint) \ \ product(uintx, TLABWasteIncrement, 4, \ "Increment allowed waste at slow allocation") \ + range(0, max_jint) \ + constraint(TLABWasteIncrementConstraintFunc,AfterMemoryInit) \ \ product(uintx, SurvivorRatio, 8, \ "Ratio of eden/survivor space size") \ @@ -3391,6 +3437,7 @@ product_pd(size_t, NewSizeThreadIncrease, \ "Additional size added to desired new generation size per " \ "non-daemon thread (in bytes)") \ + range(0, max_uintx) \ \ product_pd(size_t, MetaspaceSize, \ "Initial size of Metaspaces (in bytes)") \ @@ -3426,9 +3473,11 @@ \ product(size_t, MinHeapDeltaBytes, ScaleForWordSize(128*K), \ "The minimum change in heap space due to GC (in bytes)") \ + range(0, max_uintx) \ \ product(size_t, MinMetaspaceExpansion, ScaleForWordSize(256*K), \ "The minimum expansion of Metaspace (in bytes)") \ + range(0, max_uintx) \ \ product(uintx, MaxMetaspaceFreeRatio, 70, \ "The maximum percentage of Metaspace free after GC to avoid " \ @@ -3444,13 +3493,16 @@ \ product(size_t, MaxMetaspaceExpansion, ScaleForWordSize(4*M), \ "The maximum expansion of Metaspace without full GC (in bytes)") \ + range(0, max_uintx) \ \ product(uintx, QueuedAllocationWarningCount, 0, \ "Number of times an allocation that queues behind a GC " \ "will retry before printing a warning") \ + range(0, max_uintx) \ \ diagnostic(uintx, VerifyGCStartAt, 0, \ "GC invoke count where +VerifyBefore/AfterGC kicks in") \ + range(0, max_uintx) \ \ diagnostic(intx, VerifyGCLevel, 0, \ "Generation level at which to start +VerifyBefore/AfterGC") \ @@ -3488,15 +3540,18 @@ \ product(intx, PrintCMSStatistics, 0, \ "Statistics for CMS") \ + range(0, 2) \ \ product(bool, PrintCMSInitiationStatistics, false, \ "Statistics for initiating a CMS collection") \ \ product(intx, PrintFLSStatistics, 0, \ "Statistics for CMS' FreeListSpace") \ + range(0, 2) \ \ product(intx, PrintFLSCensus, 0, \ "Census for CMS' FreeListSpace") \ + range(0, 1) \ \ develop(uintx, GCExpandToAllocateDelayMillis, 0, \ "Delay between expansion and allocation (in milliseconds)") \ @@ -3523,6 +3578,7 @@ product(uintx, GCDrainStackTargetSize, 64, \ "Number of entries we will try to leave on the stack " \ "during parallel gc") \ + range(0, max_juint) \ \ /* stack parameters */ \ product_pd(intx, StackYellowPages, \