< prev index next >

src/hotspot/share/gc/shared/gc_globals.hpp

Print this page


  29 #include "utilities/macros.hpp"
  30 #if INCLUDE_EPSILONGC
  31 #include "gc/epsilon/epsilon_globals.hpp"
  32 #endif
  33 #if INCLUDE_G1GC
  34 #include "gc/g1/g1_globals.hpp"
  35 #endif
  36 #if INCLUDE_PARALLELGC
  37 #include "gc/parallel/parallel_globals.hpp"
  38 #endif
  39 #if INCLUDE_SERIALGC
  40 #include "gc/serial/serial_globals.hpp"
  41 #endif
  42 #if INCLUDE_SHENANDOAHGC
  43 #include "gc/shenandoah/shenandoah_globals.hpp"
  44 #endif
  45 #if INCLUDE_ZGC
  46 #include "gc/z/z_globals.hpp"
  47 #endif
  48 
  49 #define GC_FLAGS(develop,                                                   \
  50                  develop_pd,                                                \
  51                  product,                                                   \
  52                  product_pd,                                                \
  53                  diagnostic,                                                \
  54                  diagnostic_pd,                                             \
  55                  experimental,                                              \
  56                  notproduct,                                                \
  57                  manageable,                                                \
  58                  product_rw,                                                \
  59                  lp64_product,                                              \
  60                  range,                                                     \
  61                  constraint)                                                \
  62                                                                             \
  63   EPSILONGC_ONLY(GC_EPSILON_FLAGS(                                          \
  64     develop,                                                                \
  65     develop_pd,                                                             \
  66     product,                                                                \
  67     product_pd,                                                             \
  68     diagnostic,                                                             \
  69     diagnostic_pd,                                                          \
  70     experimental,                                                           \
  71     notproduct,                                                             \
  72     manageable,                                                             \
  73     product_rw,                                                             \
  74     lp64_product,                                                           \
  75     range,                                                                  \
  76     constraint))                                                            \
  77                                                                             \
  78   G1GC_ONLY(GC_G1_FLAGS(                                                    \
  79     develop,                                                                \
  80     develop_pd,                                                             \
  81     product,                                                                \
  82     product_pd,                                                             \
  83     diagnostic,                                                             \
  84     diagnostic_pd,                                                          \
  85     experimental,                                                           \
  86     notproduct,                                                             \
  87     manageable,                                                             \
  88     product_rw,                                                             \
  89     lp64_product,                                                           \
  90     range,                                                                  \
  91     constraint))                                                            \
  92                                                                             \
  93   PARALLELGC_ONLY(GC_PARALLEL_FLAGS(                                        \
  94     develop,                                                                \
  95     develop_pd,                                                             \
  96     product,                                                                \
  97     product_pd,                                                             \
  98     diagnostic,                                                             \
  99     diagnostic_pd,                                                          \
 100     experimental,                                                           \
 101     notproduct,                                                             \
 102     manageable,                                                             \
 103     product_rw,                                                             \
 104     lp64_product,                                                           \
 105     range,                                                                  \
 106     constraint))                                                            \
 107                                                                             \
 108   SERIALGC_ONLY(GC_SERIAL_FLAGS(                                            \
 109     develop,                                                                \
 110     develop_pd,                                                             \
 111     product,                                                                \
 112     product_pd,                                                             \
 113     diagnostic,                                                             \
 114     diagnostic_pd,                                                          \
 115     experimental,                                                           \
 116     notproduct,                                                             \
 117     manageable,                                                             \
 118     product_rw,                                                             \
 119     lp64_product,                                                           \
 120     range,                                                                  \
 121     constraint))                                                            \
 122                                                                             \
 123   SHENANDOAHGC_ONLY(GC_SHENANDOAH_FLAGS(                                    \
 124     develop,                                                                \
 125     develop_pd,                                                             \
 126     product,                                                                \
 127     product_pd,                                                             \
 128     diagnostic,                                                             \
 129     diagnostic_pd,                                                          \
 130     experimental,                                                           \
 131     notproduct,                                                             \
 132     manageable,                                                             \
 133     product_rw,                                                             \
 134     lp64_product,                                                           \
 135     range,                                                                  \
 136     constraint))                                                            \
 137                                                                             \
 138   ZGC_ONLY(GC_Z_FLAGS(                                                      \
 139     develop,                                                                \
 140     develop_pd,                                                             \
 141     product,                                                                \
 142     product_pd,                                                             \
 143     diagnostic,                                                             \
 144     diagnostic_pd,                                                          \
 145     experimental,                                                           \
 146     notproduct,                                                             \
 147     manageable,                                                             \
 148     product_rw,                                                             \
 149     lp64_product,                                                           \
 150     range,                                                                  \
 151     constraint))                                                            \
 152                                                                             \
 153   /* gc */                                                                  \
 154                                                                             \
 155   product(bool, UseSerialGC, false,                                         \
 156           "Use the Serial garbage collector")                               \
 157                                                                             \
 158   product(bool, UseG1GC, false,                                             \
 159           "Use the Garbage-First garbage collector")                        \
 160                                                                             \
 161   product(bool, UseParallelGC, false,                                       \
 162           "Use the Parallel garbage collector.")                            \
 163                                                                             \
 164   experimental(bool, UseEpsilonGC, false,                                   \
 165           "Use the Epsilon (no-op) garbage collector")                      \
 166                                                                             \
 167   product(bool, UseZGC, false,                                              \
 168           "Use the Z garbage collector")                                    \
 169                                                                             \
 170   experimental(bool, UseShenandoahGC, false,                                \
 171           "Use the Shenandoah garbage collector")                           \
 172                                                                             \
 173   product(uint, ParallelGCThreads, 0,                                       \
 174           "Number of parallel threads parallel gc will use")                \
 175           constraint(ParallelGCThreadsConstraintFunc,AfterErgo)             \
 176                                                                             \
 177   diagnostic(bool, UseSemaphoreGCThreadsSynchronization, true,              \
 178             "Use semaphore synchronization for the GC Threads, "            \
 179             "instead of synchronization based on mutexes")                  \
 180                                                                             \
 181   product(bool, UseDynamicNumberOfGCThreads, true,                          \
 182           "Dynamically choose the number of threads up to a maximum of "    \
 183           "ParallelGCThreads parallel collectors will use for garbage "     \
 184           "collection work")                                                \
 185                                                                             \
 186   diagnostic(bool, InjectGCWorkerCreationFailure, false,                    \
 187              "Inject thread creation failures for "                         \
 188              "UseDynamicNumberOfGCThreads")                                 \
 189                                                                             \
 190   product(size_t, HeapSizePerGCThread, ScaleForWordSize(32*M),              \
 191           "Size of heap (bytes) per GC thread used in calculating the "     \
 192           "number of GC threads")                                           \
 193           range((size_t)os::vm_page_size(), (size_t)max_uintx)              \
 194                                                                             \
 195   product(uint, ConcGCThreads, 0,                                           \
 196           "Number of threads concurrent gc will use")                       \
 197           constraint(ConcGCThreadsConstraintFunc,AfterErgo)                 \
 198                                                                             \
 199   product(bool, AlwaysTenure, false,                                        \
 200           "Always tenure objects in eden (ParallelGC only)")                \
 201                                                                             \
 202   product(bool, NeverTenure, false,                                         \
 203           "Never tenure objects in eden, may tenure on overflow "           \
 204           "(ParallelGC only)")                                              \
 205                                                                             \
 206   product(bool, ScavengeBeforeFullGC, true,                                 \
 207           "Scavenge youngest generation before each full GC.")              \
 208                                                                             \
 209   product(bool, ExplicitGCInvokesConcurrent, false,                         \
 210           "A System.gc() request invokes a concurrent collection; "         \
 211           "(effective only when using concurrent collectors)")              \
 212                                                                             \
 213   product(uintx, GCLockerEdenExpansionPercent, 5,                           \
 214           "How much the GC can expand the eden by while the GC locker "     \
 215           "is active (as a percentage)")                                    \
 216           range(0, 100)                                                     \
 217                                                                             \
 218   diagnostic(uintx, GCLockerRetryAllocationCount, 2,                        \
 219           "Number of times to retry allocations when "                      \
 220           "blocked by the GC locker")                                       \
 221           range(0, max_uintx)                                               \
 222                                                                             \
 223   product(uintx, ParallelGCBufferWastePct, 10,                              \
 224           "Wasted fraction of parallel allocation buffer")                  \
 225           range(0, 100)                                                     \
 226                                                                             \
 227   product(uintx, TargetPLABWastePct, 10,                                    \
 228           "Target wasted space in last buffer as percent of overall "       \
 229           "allocation")                                                     \
 230           range(1, 100)                                                     \
 231                                                                             \
 232   product(uintx, PLABWeight, 75,                                            \
 233           "Percentage (0-100) used to weight the current sample when "      \
 234           "computing exponentially decaying average for ResizePLAB")        \
 235           range(0, 100)                                                     \
 236                                                                             \
 237   product(bool, ResizePLAB, true,                                           \
 238           "Dynamically resize (survivor space) promotion LAB's")            \
 239                                                                             \
 240   product(int, ParGCArrayScanChunk, 50,                                     \
 241           "Scan a subset of object array and push remainder, if array is "  \
 242           "bigger than this")                                               \
 243           range(1, max_jint/3)                                              \
 244                                                                             \
 245                                                                             \
 246   product(bool, AlwaysPreTouch, false,                                      \
 247           "Force all freshly committed pages to be pre-touched")            \
 248                                                                             \
 249   product(size_t, PreTouchParallelChunkSize, 1 * G,                         \
 250           "Per-thread chunk size for parallel memory pre-touch.")           \
 251           range(1, SIZE_MAX / 2)                                            \
 252                                                                             \
 253   /* where does the range max value of (max_jint - 1) come from? */         \
 254   product(size_t, MarkStackSizeMax, NOT_LP64(4*M) LP64_ONLY(512*M),         \
 255           "Maximum size of marking stack")                                  \
 256           range(1, (max_jint - 1))                                          \
 257                                                                             \
 258   product(size_t, MarkStackSize, NOT_LP64(32*K) LP64_ONLY(4*M),             \
 259           "Size of marking stack")                                          \
 260           constraint(MarkStackSizeConstraintFunc,AfterErgo)                 \
 261           range(1, (max_jint - 1))                                          \
 262                                                                             \
 263   product(intx, RefDiscoveryPolicy, 0,                                      \
 264           "Select type of reference discovery policy: "                     \
 265           "reference-based(0) or referent-based(1)")                        \
 266           range(ReferenceProcessor::DiscoveryPolicyMin,                     \
 267                 ReferenceProcessor::DiscoveryPolicyMax)                     \
 268                                                                             \
 269   product(bool, ParallelRefProcEnabled, false,                              \
 270           "Enable parallel reference processing whenever possible")         \
 271                                                                             \
 272   product(bool, ParallelRefProcBalancingEnabled, true,                      \
 273           "Enable balancing of reference processing queues")                \
 274                                                                             \
 275   experimental(size_t, ReferencesPerThread, 1000,                           \
 276                "Ergonomically start one thread for this amount of "         \
 277                "references for reference processing if "                    \
 278                "ParallelRefProcEnabled is true. Specify 0 to disable and "  \
 279                "use all threads.")                                          \
 280                                                                             \
 281   product(uintx, InitiatingHeapOccupancyPercent, 45,                        \
 282           "The percent occupancy (IHOP) of the current old generation "     \
 283           "capacity above which a concurrent mark cycle will be initiated " \
 284           "Its value may change over time if adaptive IHOP is enabled, "    \
 285           "otherwise the value remains constant. "                          \
 286           "In the latter case a value of 0 will result as frequent as "     \
 287           "possible concurrent marking cycles. A value of 100 disables "    \
 288           "concurrent marking. "                                            \
 289           "Fragmentation waste in the old generation is not considered "    \
 290           "free space in this calculation. (G1 collector only)")            \
 291           range(0, 100)                                                     \
 292                                                                             \
 293   notproduct(bool, ScavengeALot, false,                                     \
 294           "Force scavenge at every Nth exit from the runtime system "       \
 295           "(N=ScavengeALotInterval)")                                       \
 296                                                                             \
 297   develop(bool, FullGCALot, false,                                          \
 298           "Force full gc at every Nth exit from the runtime system "        \
 299           "(N=FullGCALotInterval)")                                         \
 300                                                                             \
 301   notproduct(bool, GCALotAtAllSafepoints, false,                            \
 302           "Enforce ScavengeALot/GCALot at all potential safepoints")        \
 303                                                                             \
 304   notproduct(bool, PromotionFailureALot, false,                             \
 305           "Use promotion failure handling on every youngest generation "    \
 306           "collection")                                                     \
 307                                                                             \
 308   develop(uintx, PromotionFailureALotCount, 1000,                           \
 309           "Number of promotion failures occurring at PLAB promotion "       \
 310           "attempts at young collectors")                                   \
 311                                                                             \
 312   develop(uintx, PromotionFailureALotInterval, 5,                           \
 313           "Total collections between promotion failures a lot")             \
 314                                                                             \
 315   experimental(uintx, WorkStealingSleepMillis, 1,                           \
 316           "Sleep time when sleep is used for yields")                       \
 317                                                                             \
 318   experimental(uintx, WorkStealingYieldsBeforeSleep, 5000,                  \
 319           "Number of yields before a sleep is done during work stealing")   \
 320                                                                             \
 321   experimental(uintx, WorkStealingHardSpins, 4096,                          \
 322           "Number of iterations in a spin loop between checks on "          \
 323           "time out of hard spin")                                          \
 324                                                                             \
 325   experimental(uintx, WorkStealingSpinToYieldRatio, 10,                     \
 326           "Ratio of hard spins to calls to yield")                          \
 327                                                                             \
 328   develop(uintx, ObjArrayMarkingStride, 2048,                               \
 329           "Number of object array elements to push onto the marking stack " \
 330           "before pushing a continuation entry")                            \
 331                                                                             \
 332   develop(bool, MetadataAllocationFailALot, false,                          \
 333           "Fail metadata allocations at intervals controlled by "           \
 334           "MetadataAllocationFailALotInterval")                             \
 335                                                                             \
 336   develop(uintx, MetadataAllocationFailALotInterval, 1000,                  \
 337           "Metadata allocation failure a lot interval")                     \
 338                                                                             \
 339   product(bool, ExecutingUnitTests, false,                                  \
 340           "Whether the JVM is running unit tests or not")                   \
 341                                                                             \
 342   product_pd(bool, UseTLAB, "Use thread-local object allocation")           \
 343                                                                             \
 344   product_pd(bool, ResizeTLAB,                                              \
 345           "Dynamically resize TLAB size for threads")                       \
 346                                                                             \
 347   product(bool, ZeroTLAB, false,                                            \
 348           "Zero out the newly created TLAB")                                \
 349                                                                             \
 350   product(bool, TLABStats, true,                                            \
 351           "Provide more detailed and expensive TLAB statistics.")           \
 352                                                                             \
 353   product_pd(bool, NeverActAsServerClassMachine,                            \
 354           "Never act like a server-class machine")                          \
 355                                                                             \
 356   product(bool, AlwaysActAsServerClassMachine, false,                       \
 357           "Always act like a server-class machine")                         \
 358                                                                             \
 359   product_pd(uint64_t, MaxRAM,                                              \
 360           "Real memory size (in bytes) used to set maximum heap size")      \
 361           range(0, 0XFFFFFFFFFFFFFFFF)                                      \
 362                                                                             \
 363   product(bool, AggressiveHeap, false,                                      \
 364           "Optimize heap options for long-running memory intensive apps")   \
 365                                                                             \
 366   product(size_t, ErgoHeapSizeLimit, 0,                                     \
 367           "Maximum ergonomically set heap size (in bytes); zero means use " \
 368           "MaxRAM * MaxRAMPercentage / 100")                                \
 369           range(0, max_uintx)                                               \
 370                                                                             \
 371   product(uintx, MaxRAMFraction, 4,                                         \
 372           "Maximum fraction (1/n) of real memory used for maximum heap "    \
 373           "size. "                                                          \
 374           "Deprecated, use MaxRAMPercentage instead")                       \
 375           range(1, max_uintx)                                               \
 376                                                                             \
 377   product(uintx, MinRAMFraction, 2,                                         \
 378           "Minimum fraction (1/n) of real memory used for maximum heap "    \
 379           "size on systems with small physical memory size. "               \
 380           "Deprecated, use MinRAMPercentage instead")                       \
 381           range(1, max_uintx)                                               \
 382                                                                             \
 383   product(uintx, InitialRAMFraction, 64,                                    \
 384           "Fraction (1/n) of real memory used for initial heap size. "      \
 385           "Deprecated, use InitialRAMPercentage instead")                   \
 386           range(1, max_uintx)                                               \
 387                                                                             \
 388   product(double, MaxRAMPercentage, 25.0,                                   \
 389           "Maximum percentage of real memory used for maximum heap size")   \
 390           range(0.0, 100.0)                                                 \
 391                                                                             \
 392   product(double, MinRAMPercentage, 50.0,                                   \
 393           "Minimum percentage of real memory used for maximum heap"         \
 394           "size on systems with small physical memory size")                \
 395           range(0.0, 100.0)                                                 \
 396                                                                             \
 397   product(double, InitialRAMPercentage, 1.5625,                             \
 398           "Percentage of real memory used for initial heap size")           \
 399           range(0.0, 100.0)                                                 \
 400                                                                             \
 401   product(int, ActiveProcessorCount, -1,                                    \
 402           "Specify the CPU count the VM should use and report as active")   \
 403                                                                             \
 404   develop(uintx, MaxVirtMemFraction, 2,                                     \
 405           "Maximum fraction (1/n) of virtual memory used for ergonomically "\
 406           "determining maximum heap size")                                  \
 407                                                                             \
 408   product(bool, UseAdaptiveSizePolicy, true,                                \
 409           "Use adaptive generation sizing policies")                        \
 410                                                                             \
 411   product(bool, UsePSAdaptiveSurvivorSizePolicy, true,                      \
 412           "Use adaptive survivor sizing policies")                          \
 413                                                                             \
 414   product(bool, UseAdaptiveGenerationSizePolicyAtMinorCollection, true,     \
 415           "Use adaptive young-old sizing policies at minor collections")    \
 416                                                                             \
 417   product(bool, UseAdaptiveGenerationSizePolicyAtMajorCollection, true,     \
 418           "Use adaptive young-old sizing policies at major collections")    \
 419                                                                             \
 420   product(bool, UseAdaptiveSizePolicyWithSystemGC, false,                   \
 421           "Include statistics from System.gc() for adaptive size policy")   \
 422                                                                             \
 423   product(bool, UseAdaptiveGCBoundary, false,                               \
 424           "Allow young-old boundary to move")                               \
 425                                                                             \
 426   develop(intx, PSAdaptiveSizePolicyResizeVirtualSpaceAlot, -1,             \
 427           "Resize the virtual spaces of the young or old generations")      \
 428           range(-1, 1)                                                      \
 429                                                                             \
 430   product(uintx, AdaptiveSizeThroughPutPolicy, 0,                           \
 431           "Policy for changing generation size for throughput goals")       \
 432           range(0, 1)                                                       \
 433                                                                             \
 434   product(uintx, AdaptiveSizePolicyInitializingSteps, 20,                   \
 435           "Number of steps where heuristics is used before data is used")   \
 436           range(0, max_uintx)                                               \
 437                                                                             \
 438   develop(uintx, AdaptiveSizePolicyReadyThreshold, 5,                       \
 439           "Number of collections before the adaptive sizing is started")    \
 440                                                                             \
 441   product(uintx, AdaptiveSizePolicyOutputInterval, 0,                       \
 442           "Collection interval for printing information; zero means never") \
 443           range(0, max_uintx)                                               \
 444                                                                             \
 445   product(bool, UseAdaptiveSizePolicyFootprintGoal, true,                   \
 446           "Use adaptive minimum footprint as a goal")                       \
 447                                                                             \
 448   product(uintx, AdaptiveSizePolicyWeight, 10,                              \
 449           "Weight given to exponential resizing, between 0 and 100")        \
 450           range(0, 100)                                                     \
 451                                                                             \
 452   product(uintx, AdaptiveTimeWeight,       25,                              \
 453           "Weight given to time in adaptive policy, between 0 and 100")     \
 454           range(0, 100)                                                     \
 455                                                                             \
 456   product(uintx, PausePadding, 1,                                           \
 457           "How much buffer to keep for pause time")                         \
 458           range(0, max_juint)                                               \
 459                                                                             \
 460   product(uintx, PromotedPadding, 3,                                        \
 461           "How much buffer to keep for promotion failure")                  \
 462           range(0, max_juint)                                               \
 463                                                                             \
 464   product(uintx, SurvivorPadding, 3,                                        \
 465           "How much buffer to keep for survivor overflow")                  \
 466           range(0, max_juint)                                               \
 467                                                                             \
 468   product(uintx, ThresholdTolerance, 10,                                    \
 469           "Allowed collection cost difference between generations")         \
 470           range(0, 100)                                                     \
 471                                                                             \
 472   product(uintx, AdaptiveSizePolicyCollectionCostMargin, 50,                \
 473           "If collection costs are within margin, reduce both by full "     \
 474           "delta")                                                          \
 475           range(0, 100)                                                     \
 476                                                                             \
 477   product(uintx, YoungGenerationSizeIncrement, 20,                          \
 478           "Adaptive size percentage change in young generation")            \
 479           range(0, 100)                                                     \
 480                                                                             \
 481   product(uintx, YoungGenerationSizeSupplement, 80,                         \
 482           "Supplement to YoungedGenerationSizeIncrement used at startup")   \
 483           range(0, 100)                                                     \
 484                                                                             \
 485   product(uintx, YoungGenerationSizeSupplementDecay, 8,                     \
 486           "Decay factor to YoungedGenerationSizeSupplement")                \
 487           range(1, max_uintx)                                               \
 488                                                                             \
 489   product(uintx, TenuredGenerationSizeIncrement, 20,                        \
 490           "Adaptive size percentage change in tenured generation")          \
 491           range(0, 100)                                                     \
 492                                                                             \
 493   product(uintx, TenuredGenerationSizeSupplement, 80,                       \
 494           "Supplement to TenuredGenerationSizeIncrement used at startup")   \
 495           range(0, 100)                                                     \
 496                                                                             \
 497   product(uintx, TenuredGenerationSizeSupplementDecay, 2,                   \
 498           "Decay factor to TenuredGenerationSizeIncrement")                 \
 499           range(1, max_uintx)                                               \
 500                                                                             \
 501   product(uintx, MaxGCPauseMillis, max_uintx - 1,                           \
 502           "Adaptive size policy maximum GC pause time goal in millisecond, "\
 503           "or (G1 Only) the maximum GC time per MMU time slice")            \
 504           range(1, max_uintx - 1)                                           \
 505           constraint(MaxGCPauseMillisConstraintFunc,AfterErgo)              \
 506                                                                             \
 507   product(uintx, GCPauseIntervalMillis, 0,                                  \
 508           "Time slice for MMU specification")                               \
 509           constraint(GCPauseIntervalMillisConstraintFunc,AfterErgo)         \
 510                                                                             \
 511   product(uintx, MaxGCMinorPauseMillis, max_uintx,                          \
 512           "Adaptive size policy maximum GC minor pause time goal "          \
 513           "in millisecond")                                                 \
 514           range(0, max_uintx)                                               \
 515                                                                             \
 516   product(uintx, GCTimeRatio, 99,                                           \
 517           "Adaptive size policy application time to GC time ratio")         \
 518           range(0, max_juint)                                               \
 519                                                                             \
 520   product(uintx, AdaptiveSizeDecrementScaleFactor, 4,                       \
 521           "Adaptive size scale down factor for shrinking")                  \
 522           range(1, max_uintx)                                               \
 523                                                                             \
 524   product(bool, UseAdaptiveSizeDecayMajorGCCost, true,                      \
 525           "Adaptive size decays the major cost for long major intervals")   \
 526                                                                             \
 527   product(uintx, AdaptiveSizeMajorGCDecayTimeScale, 10,                     \
 528           "Time scale over which major costs decay")                        \
 529           range(0, max_uintx)                                               \
 530                                                                             \
 531   product(uintx, MinSurvivorRatio, 3,                                       \
 532           "Minimum ratio of young generation/survivor space size")          \
 533           range(3, max_uintx)                                               \
 534                                                                             \
 535   product(uintx, InitialSurvivorRatio, 8,                                   \
 536           "Initial ratio of young generation/survivor space size")          \
 537           range(0, max_uintx)                                               \
 538                                                                             \
 539   product(size_t, BaseFootPrintEstimate, 256*M,                             \
 540           "Estimate of footprint other than Java Heap")                     \
 541           range(0, max_uintx)                                               \
 542                                                                             \
 543   product(bool, UseGCOverheadLimit, true,                                   \
 544           "Use policy to limit of proportion of time spent in GC "          \
 545           "before an OutOfMemory error is thrown")                          \
 546                                                                             \
 547   product(uintx, GCTimeLimit, 98,                                           \
 548           "Limit of the proportion of time spent in GC before "             \
 549           "an OutOfMemoryError is thrown (used with GCHeapFreeLimit)")      \
 550           range(0, 100)                                                     \
 551                                                                             \
 552   product(uintx, GCHeapFreeLimit, 2,                                        \
 553           "Minimum percentage of free space after a full GC before an "     \
 554           "OutOfMemoryError is thrown (used with GCTimeLimit)")             \
 555           range(0, 100)                                                     \
 556                                                                             \
 557   develop(uintx, GCOverheadLimitThreshold, 5,                               \
 558           "Number of consecutive collections before gc time limit fires")   \
 559           range(1, max_uintx)                                               \
 560                                                                             \
 561   product(intx, PrefetchCopyIntervalInBytes, -1,                            \
 562           "How far ahead to prefetch destination area (<= 0 means off)")    \
 563           range(-1, max_jint)                                               \
 564                                                                             \
 565   product(intx, PrefetchScanIntervalInBytes, -1,                            \
 566           "How far ahead to prefetch scan area (<= 0 means off)")           \
 567           range(-1, max_jint)                                               \
 568                                                                             \
 569   product(intx, PrefetchFieldsAhead, -1,                                    \
 570           "How many fields ahead to prefetch in oop scan (<= 0 means off)") \
 571           range(-1, max_jint)                                               \
 572                                                                             \
 573   diagnostic(bool, VerifyDuringStartup, false,                              \
 574           "Verify memory system before executing any Java code "            \
 575           "during VM initialization")                                       \
 576                                                                             \
 577   diagnostic(bool, VerifyBeforeExit, trueInDebug,                           \
 578           "Verify system before exiting")                                   \
 579                                                                             \
 580   diagnostic(bool, VerifyBeforeGC, false,                                   \
 581           "Verify memory system before GC")                                 \
 582                                                                             \
 583   diagnostic(bool, VerifyAfterGC, false,                                    \
 584           "Verify memory system after GC")                                  \
 585                                                                             \
 586   diagnostic(bool, VerifyDuringGC, false,                                   \
 587           "Verify memory system during GC (between phases)")                \
 588                                                                             \
 589   diagnostic(ccstrlist, VerifyGCType, "",                                   \
 590              "GC type(s) to verify when Verify*GC is enabled."              \
 591              "Available types are collector specific.")                     \
 592                                                                             \
 593   diagnostic(ccstrlist, VerifySubSet, "",                                   \
 594           "Memory sub-systems to verify when Verify*GC flag(s) "            \
 595           "are enabled. One or more sub-systems can be specified "          \
 596           "in a comma separated string. Sub-systems are: "                  \
 597           "threads, heap, symbol_table, string_table, codecache, "          \
 598           "dictionary, classloader_data_graph, metaspace, jni_handles, "    \
 599           "codecache_oops")                                                 \
 600                                                                             \
 601   diagnostic(bool, GCParallelVerificationEnabled, true,                     \
 602           "Enable parallel memory system verification")                     \
 603                                                                             \
 604   diagnostic(bool, DeferInitialCardMark, false,                             \
 605           "When +ReduceInitialCardMarks, explicitly defer any that "        \
 606           "may arise from new_pre_store_barrier")                           \
 607                                                                             \
 608   product(bool, UseCondCardMark, false,                                     \
 609           "Check for already marked card before updating card table")       \
 610                                                                             \
 611   diagnostic(bool, VerifyRememberedSets, false,                             \
 612           "Verify GC remembered sets")                                      \
 613                                                                             \
 614   diagnostic(bool, VerifyObjectStartArray, true,                            \
 615           "Verify GC object start array if verify before/after")            \
 616                                                                             \
 617   product(bool, DisableExplicitGC, false,                                   \
 618           "Ignore calls to System.gc()")                                    \
 619                                                                             \
 620   product(bool, PrintGC, false,                                             \
 621           "Print message at garbage collection. "                           \
 622           "Deprecated, use -Xlog:gc instead.")                              \
 623                                                                             \
 624   product(bool, PrintGCDetails, false,                                      \
 625           "Print more details at garbage collection. "                      \
 626           "Deprecated, use -Xlog:gc* instead.")                             \
 627                                                                             \
 628   develop(intx, ConcGCYieldTimeout, 0,                                      \
 629           "If non-zero, assert that GC threads yield within this "          \
 630           "number of milliseconds")                                         \
 631           range(0, max_intx)                                                \
 632                                                                             \
 633   notproduct(intx, ScavengeALotInterval,     1,                             \
 634           "Interval between which scavenge will occur with +ScavengeALot")  \
 635                                                                             \
 636   notproduct(intx, FullGCALotInterval,     1,                               \
 637           "Interval between which full gc will occur with +FullGCALot")     \
 638                                                                             \
 639   notproduct(intx, FullGCALotStart,     0,                                  \
 640           "For which invocation to start FullGCAlot")                       \
 641                                                                             \
 642   notproduct(intx, FullGCALotDummies,  32*K,                                \
 643           "Dummy object allocated with +FullGCALot, forcing all objects "   \
 644           "to move")                                                        \
 645                                                                             \
 646   /* gc parameters */                                                       \
 647   product(size_t, MinHeapSize, 0,                                           \
 648           "Minimum heap size (in bytes); zero means use ergonomics")        \
 649           constraint(MinHeapSizeConstraintFunc,AfterErgo)                   \
 650                                                                             \
 651   product(size_t, InitialHeapSize, 0,                                       \
 652           "Initial heap size (in bytes); zero means use ergonomics")        \
 653           constraint(InitialHeapSizeConstraintFunc,AfterErgo)               \
 654                                                                             \
 655   product(size_t, MaxHeapSize, ScaleForWordSize(96*M),                      \
 656           "Maximum heap size (in bytes)")                                   \
 657           constraint(MaxHeapSizeConstraintFunc,AfterErgo)                   \
 658                                                                             \
 659   manageable(size_t, SoftMaxHeapSize, 0,                                    \
 660           "Soft limit for maximum heap size (in bytes)")                    \
 661           constraint(SoftMaxHeapSizeConstraintFunc,AfterMemoryInit)         \
 662                                                                             \
 663   product(size_t, OldSize, ScaleForWordSize(4*M),                           \
 664           "Initial tenured generation size (in bytes)")                     \
 665           range(0, max_uintx)                                               \
 666                                                                             \
 667   product(size_t, NewSize, ScaleForWordSize(1*M),                           \
 668           "Initial new generation size (in bytes)")                         \
 669           constraint(NewSizeConstraintFunc,AfterErgo)                       \
 670                                                                             \
 671   product(size_t, MaxNewSize, max_uintx,                                    \
 672           "Maximum new generation size (in bytes), max_uintx means set "    \
 673           "ergonomically")                                                  \
 674           range(0, max_uintx)                                               \
 675                                                                             \
 676   product_pd(size_t, HeapBaseMinAddress,                                    \
 677           "OS specific low limit for heap base address")                    \
 678           constraint(HeapBaseMinAddressConstraintFunc,AfterErgo)            \
 679                                                                             \
 680   product(size_t, PretenureSizeThreshold, 0,                                \
 681           "Maximum size in bytes of objects allocated in DefNew "           \
 682           "generation; zero means no maximum")                              \
 683           range(0, max_uintx)                                               \
 684                                                                             \
 685   product(size_t, MinTLABSize, 2*K,                                         \
 686           "Minimum allowed TLAB size (in bytes)")                           \
 687           range(1, max_uintx/2)                                             \
 688           constraint(MinTLABSizeConstraintFunc,AfterMemoryInit)             \
 689                                                                             \
 690   product(size_t, TLABSize, 0,                                              \
 691           "Starting TLAB size (in bytes); zero means set ergonomically")    \
 692           constraint(TLABSizeConstraintFunc,AfterMemoryInit)                \
 693                                                                             \
 694   product(size_t, YoungPLABSize, 4096,                                      \
 695           "Size of young gen promotion LAB's (in HeapWords)")               \
 696           constraint(YoungPLABSizeConstraintFunc,AfterMemoryInit)           \
 697                                                                             \
 698   product(size_t, OldPLABSize, 1024,                                        \
 699           "Size of old gen promotion LAB's (in HeapWords)")                 \
 700           constraint(OldPLABSizeConstraintFunc,AfterMemoryInit)             \
 701                                                                             \
 702   product(uintx, TLABAllocationWeight, 35,                                  \
 703           "Allocation averaging weight")                                    \
 704           range(0, 100)                                                     \
 705                                                                             \
 706   /* Limit the lower bound of this flag to 1 as it is used  */              \
 707   /* in a division expression.                              */              \
 708   product(uintx, TLABWasteTargetPercent, 1,                                 \
 709           "Percentage of Eden that can be wasted")                          \
 710           range(1, 100)                                                     \
 711                                                                             \
 712   product(uintx, TLABRefillWasteFraction,    64,                            \
 713           "Maximum TLAB waste at a refill (internal fragmentation)")        \
 714           range(1, max_juint)                                               \
 715                                                                             \
 716   product(uintx, TLABWasteIncrement,    4,                                  \
 717           "Increment allowed waste at slow allocation")                     \
 718           range(0, max_jint)                                                \
 719           constraint(TLABWasteIncrementConstraintFunc,AfterMemoryInit)      \
 720                                                                             \
 721   product(uintx, SurvivorRatio, 8,                                          \
 722           "Ratio of eden/survivor space size")                              \
 723           range(1, max_uintx-2)                                             \
 724           constraint(SurvivorRatioConstraintFunc,AfterMemoryInit)           \
 725                                                                             \
 726   product(uintx, NewRatio, 2,                                               \
 727           "Ratio of old/new generation sizes")                              \
 728           range(0, max_uintx-1)                                             \
 729                                                                             \
 730   product_pd(size_t, NewSizeThreadIncrease,                                 \
 731           "Additional size added to desired new generation size per "       \
 732           "non-daemon thread (in bytes)")                                   \
 733           range(0, max_uintx)                                               \
 734                                                                             \
 735   product(uintx, QueuedAllocationWarningCount, 0,                           \
 736           "Number of times an allocation that queues behind a GC "          \
 737           "will retry before printing a warning")                           \
 738           range(0, max_uintx)                                               \
 739                                                                             \
 740   diagnostic(uintx, VerifyGCStartAt,   0,                                   \
 741           "GC invoke count where +VerifyBefore/AfterGC kicks in")           \
 742           range(0, max_uintx)                                               \
 743                                                                             \
 744   diagnostic(intx, VerifyGCLevel,     0,                                    \
 745           "Generation level at which to start +VerifyBefore/AfterGC")       \
 746           range(0, 1)                                                       \
 747                                                                             \
 748   product(uintx, MaxTenuringThreshold,    15,                               \
 749           "Maximum value for tenuring threshold")                           \
 750           range(0, markWord::max_age + 1)                                   \
 751           constraint(MaxTenuringThresholdConstraintFunc,AfterErgo)          \
 752                                                                             \
 753   product(uintx, InitialTenuringThreshold,    7,                            \
 754           "Initial value for tenuring threshold")                           \
 755           range(0, markWord::max_age + 1)                                   \
 756           constraint(InitialTenuringThresholdConstraintFunc,AfterErgo)      \
 757                                                                             \
 758   product(uintx, TargetSurvivorRatio,    50,                                \
 759           "Desired percentage of survivor space used after scavenge")       \
 760           range(0, 100)                                                     \
 761                                                                             \
 762   product(uintx, MarkSweepDeadRatio,     5,                                 \
 763           "Percentage (0-100) of the old gen allowed as dead wood. "        \
 764           "Serial mark sweep treats this as both the minimum and maximum "  \
 765           "value. "                                                         \
 766           "Par compact uses a variable scale based on the density of the "  \
 767           "generation and treats this as the maximum value when the heap "  \
 768           "is either completely full or completely empty.  Par compact "    \
 769           "also has a smaller default value; see arguments.cpp.")           \
 770           range(0, 100)                                                     \
 771                                                                             \
 772   product(uint, MarkSweepAlwaysCompactCount,     4,                         \
 773           "How often should we fully compact the heap (ignoring the dead "  \
 774           "space parameters)")                                              \
 775           range(1, max_juint)                                               \
 776                                                                             \
 777   develop(uintx, GCExpandToAllocateDelayMillis, 0,                          \
 778           "Delay between expansion and allocation (in milliseconds)")       \
 779                                                                             \
 780   product(uintx, GCDrainStackTargetSize, 64,                                \
 781           "Number of entries we will try to leave on the stack "            \
 782           "during parallel gc")                                             \
 783           range(0, max_juint)
 784 
 785 #endif // SHARE_GC_SHARED_GC_GLOBALS_HPP


  29 #include "utilities/macros.hpp"
  30 #if INCLUDE_EPSILONGC
  31 #include "gc/epsilon/epsilon_globals.hpp"
  32 #endif
  33 #if INCLUDE_G1GC
  34 #include "gc/g1/g1_globals.hpp"
  35 #endif
  36 #if INCLUDE_PARALLELGC
  37 #include "gc/parallel/parallel_globals.hpp"
  38 #endif
  39 #if INCLUDE_SERIALGC
  40 #include "gc/serial/serial_globals.hpp"
  41 #endif
  42 #if INCLUDE_SHENANDOAHGC
  43 #include "gc/shenandoah/shenandoah_globals.hpp"
  44 #endif
  45 #if INCLUDE_ZGC
  46 #include "gc/z/z_globals.hpp"
  47 #endif
  48 
  49 #include "runtime/flags/jvmFlag.hpp"
  50 PRODUCT_FLAG(bool,     UseSerialGC, false, JVMFlag::DEFAULT,
  51                        "Use the Serial garbage collector");
  52 
  53 PRODUCT_FLAG(bool,     UseG1GC, false, JVMFlag::DEFAULT,
  54                        "Use the Garbage-First garbage collector");
  55 
  56 PRODUCT_FLAG(bool,     UseParallelGC, false, JVMFlag::DEFAULT,
  57                        "Use the Parallel garbage collector.");
  58 
  59 PRODUCT_FLAG(bool,     UseEpsilonGC, false, JVMFlag::EXPERIMENTAL,
  60                        "Use the Epsilon (no-op) garbage collector");
  61 
  62 PRODUCT_FLAG(bool,     UseZGC, false, JVMFlag::DEFAULT,
  63                        "Use the Z garbage collector");
  64 
  65 PRODUCT_FLAG(bool,     UseShenandoahGC, false, JVMFlag::EXPERIMENTAL,
  66                        "Use the Shenandoah garbage collector");
  67 
  68 PRODUCT_FLAG(uint,     ParallelGCThreads, 0, JVMFlag::CONSTRAINT,
  69                        "Number of parallel threads parallel gc will use");
  70    FLAG_CONSTRAINT(    ParallelGCThreads, (void*)ParallelGCThreadsConstraintFunc, JVMFlag::AfterErgo);
  71 
  72 PRODUCT_FLAG(bool,     UseSemaphoreGCThreadsSynchronization, true, JVMFlag::DIAGNOSTIC,
  73                        "Use semaphore synchronization for the GC Threads, "
  74                        "instead of synchronization based on mutexes");
  75 
  76 PRODUCT_FLAG(bool,     UseDynamicNumberOfGCThreads, true, JVMFlag::DEFAULT,
  77                        "Dynamically choose the number of threads up to a maximum of "
  78                        "ParallelGCThreads parallel collectors will use for garbage "
  79                        "collection work");
  80 
  81 PRODUCT_FLAG(bool,     InjectGCWorkerCreationFailure, false, JVMFlag::DIAGNOSTIC,
  82                        "Inject thread creation failures for "
  83                        "UseDynamicNumberOfGCThreads");
  84 
  85 PRODUCT_FLAG(size_t,   HeapSizePerGCThread, ScaleForWordSize(32*M), JVMFlag::RANGE,
  86                        "Size of heap (bytes) per GC thread used in calculating the "
  87                        "number of GC threads");
  88    FLAG_CUSTOM_RANGE(  HeapSizePerGCThread, VMPageSize);
  89 
  90 PRODUCT_FLAG(uint,     ConcGCThreads, 0, JVMFlag::CONSTRAINT,
  91                        "Number of threads concurrent gc will use");
  92    FLAG_CONSTRAINT(    ConcGCThreads, (void*)ConcGCThreadsConstraintFunc, JVMFlag::AfterErgo);
  93 
  94 PRODUCT_FLAG(bool,     AlwaysTenure, false, JVMFlag::DEFAULT,
  95                        "Always tenure objects in eden (ParallelGC only)");
  96 
  97 PRODUCT_FLAG(bool,     NeverTenure, false, JVMFlag::DEFAULT,
  98                        "Never tenure objects in eden, may tenure on overflow "
  99                        "(ParallelGC only)");
 100 
 101 PRODUCT_FLAG(bool,     ScavengeBeforeFullGC, true, JVMFlag::DEFAULT,
 102                        "Scavenge youngest generation before each full GC.");
 103 
 104 PRODUCT_FLAG(bool,     ExplicitGCInvokesConcurrent, false, JVMFlag::DEFAULT,
 105                        "A System.gc() request invokes a concurrent collection; "
 106                        "(effective only when using concurrent collectors)");
 107 
 108 PRODUCT_FLAG(uintx,    GCLockerEdenExpansionPercent, 5, JVMFlag::RANGE,
 109                        "How much the GC can expand the eden by while the GC locker "
 110                        "is active (as a percentage)");
 111    FLAG_RANGE(         GCLockerEdenExpansionPercent, 0, 100);
 112 
 113 PRODUCT_FLAG(uintx,    GCLockerRetryAllocationCount, 2, JVMFlag::DIAGNOSTIC | JVMFlag::RANGE,
 114                        "Number of times to retry allocations when "
 115                        "blocked by the GC locker");
 116    FLAG_RANGE(         GCLockerRetryAllocationCount, 0, max_uintx);
 117 
 118 PRODUCT_FLAG(uintx,    ParallelGCBufferWastePct, 10, JVMFlag::RANGE,
 119                        "Wasted fraction of parallel allocation buffer");
 120    FLAG_RANGE(         ParallelGCBufferWastePct, 0, 100);
 121 
 122 PRODUCT_FLAG(uintx,    TargetPLABWastePct, 10, JVMFlag::RANGE,
 123                        "Target wasted space in last buffer as percent of overall "
 124                        "allocation");
 125    FLAG_RANGE(         TargetPLABWastePct, 1, 100);
 126 
 127 PRODUCT_FLAG(uintx,    PLABWeight, 75, JVMFlag::RANGE,
 128                        "Percentage (0-100) used to weight the current sample when "
 129                        "computing exponentially decaying average for ResizePLAB");
 130    FLAG_RANGE(         PLABWeight, 0, 100);
 131 
 132 PRODUCT_FLAG(bool,     ResizePLAB, true, JVMFlag::DEFAULT,
 133                        "Dynamically resize (survivor space) promotion LAB's");
 134 
 135 PRODUCT_FLAG(int,      ParGCArrayScanChunk, 50, JVMFlag::RANGE,
 136                        "Scan a subset of object array and push remainder, if array is "
 137                        "bigger than this");
 138    FLAG_RANGE(         ParGCArrayScanChunk, 1, max_jint/3);
 139 
 140 PRODUCT_FLAG(bool,     AlwaysPreTouch, false, JVMFlag::DEFAULT,
 141                        "Force all freshly committed pages to be pre-touched");
 142 
 143 PRODUCT_FLAG(size_t,   PreTouchParallelChunkSize, 1 * G, JVMFlag::RANGE,
 144                        "Per-thread chunk size for parallel memory pre-touch.");
 145    FLAG_RANGE(         PreTouchParallelChunkSize, 1, SIZE_MAX / 2);
 146 
 147 
 148     //  where does the range max value of (max_jint - 1) come from? 
 149 PRODUCT_FLAG(size_t,   MarkStackSizeMax, NOT_LP64(4*M) LP64_ONLY(512*M), JVMFlag::RANGE,
 150                        "Maximum size of marking stack");
 151    FLAG_RANGE(         MarkStackSizeMax, 1, (max_jint - 1));
 152 
 153 PRODUCT_FLAG(size_t,   MarkStackSize, NOT_LP64(32*K) LP64_ONLY(4*M), JVMFlag::RANGE | JVMFlag::CONSTRAINT,
 154                        "Size of marking stack");
 155    FLAG_RANGE(         MarkStackSize, 1, (max_jint - 1));
 156    FLAG_CONSTRAINT(    MarkStackSize, (void*)MarkStackSizeConstraintFunc, JVMFlag::AfterErgo);
 157 
 158 PRODUCT_FLAG(intx,     RefDiscoveryPolicy, 0, JVMFlag::RANGE,
 159                        "Select type of reference discovery policy: "
 160                        "reference-based(0) or referent-based(1)");
 161  //TODO: to avoid circular dependency, the min/max cannot be declared in header file
 162  //FLAG_RANGE(         RefDiscoveryPolicy, ReferenceProcessor::DiscoveryPolicyMin,ReferenceProcessor::DiscoveryPolicyMax);
 163 
 164 PRODUCT_FLAG(bool,     ParallelRefProcEnabled, false, JVMFlag::DEFAULT,
 165                        "Enable parallel reference processing whenever possible");
 166 
 167 PRODUCT_FLAG(bool,     ParallelRefProcBalancingEnabled, true, JVMFlag::DEFAULT,
 168                        "Enable balancing of reference processing queues");
 169 
 170 PRODUCT_FLAG(size_t,   ReferencesPerThread, 1000, JVMFlag::EXPERIMENTAL,
 171                        "Ergonomically start one thread for this amount of "
 172                        "references for reference processing if "
 173                        "ParallelRefProcEnabled is true. Specify 0 to disable and "
 174                        "use all threads.");
 175 
 176 PRODUCT_FLAG(uintx,    InitiatingHeapOccupancyPercent, 45, JVMFlag::RANGE,
 177                        "The percent occupancy (IHOP) of the current old generation "
 178                        "capacity above which a concurrent mark cycle will be initiated "
 179                        "Its value may change over time if adaptive IHOP is enabled, "
 180                        "otherwise the value remains constant. "
 181                        "In the latter case a value of 0 will result as frequent as "
 182                        "possible concurrent marking cycles. A value of 100 disables "
 183                        "concurrent marking. "
 184                        "Fragmentation waste in the old generation is not considered "
 185                        "free space in this calculation. (G1 collector only)");
 186    FLAG_RANGE(         InitiatingHeapOccupancyPercent, 0, 100);
 187 
 188 NOTPROD_FLAG(bool,     ScavengeALot, false, JVMFlag::DEFAULT,
 189                        "Force scavenge at every Nth exit from the runtime system "
 190                        "(N=ScavengeALotInterval)");
 191 
 192 DEVELOP_FLAG(bool,     FullGCALot, false, JVMFlag::DEFAULT,
 193                        "Force full gc at every Nth exit from the runtime system "
 194                        "(N=FullGCALotInterval)");
 195 
 196 NOTPROD_FLAG(bool,     GCALotAtAllSafepoints, false, JVMFlag::DEFAULT,
 197                        "Enforce ScavengeALot/GCALot at all potential safepoints");
 198 
 199 NOTPROD_FLAG(bool,     PromotionFailureALot, false, JVMFlag::DEFAULT,
 200                        "Use promotion failure handling on every youngest generation "
 201                        "collection");
 202 
 203 DEVELOP_FLAG(uintx,    PromotionFailureALotCount, 1000, JVMFlag::DEFAULT,
 204                        "Number of promotion failures occurring at PLAB promotion "
 205                        "attempts at young collectors");
 206 
 207 DEVELOP_FLAG(uintx,    PromotionFailureALotInterval, 5, JVMFlag::DEFAULT,
 208                        "Total collections between promotion failures a lot");
 209 
 210 PRODUCT_FLAG(uintx,    WorkStealingSleepMillis, 1, JVMFlag::EXPERIMENTAL,
 211                        "Sleep time when sleep is used for yields");
 212 
 213 PRODUCT_FLAG(uintx,    WorkStealingYieldsBeforeSleep, 5000, JVMFlag::EXPERIMENTAL,
 214                        "Number of yields before a sleep is done during work stealing");
 215 
 216 PRODUCT_FLAG(uintx,    WorkStealingHardSpins, 4096, JVMFlag::EXPERIMENTAL,
 217                        "Number of iterations in a spin loop between checks on "
 218                        "time out of hard spin");
 219 
 220 PRODUCT_FLAG(uintx,    WorkStealingSpinToYieldRatio, 10, JVMFlag::EXPERIMENTAL,
 221                        "Ratio of hard spins to calls to yield");
 222 
 223 DEVELOP_FLAG(uintx,    ObjArrayMarkingStride, 2048, JVMFlag::DEFAULT,
 224                        "Number of object array elements to push onto the marking stack "
 225                        "before pushing a continuation entry");
 226 
 227 DEVELOP_FLAG(bool,     MetadataAllocationFailALot, false, JVMFlag::DEFAULT,
 228                        "Fail metadata allocations at intervals controlled by "
 229                        "MetadataAllocationFailALotInterval");
 230 
 231 DEVELOP_FLAG(uintx,    MetadataAllocationFailALotInterval, 1000, JVMFlag::DEFAULT,
 232                        "Metadata allocation failure a lot interval");
 233 
 234 PRODUCT_FLAG(bool,     ExecutingUnitTests, false, JVMFlag::DEFAULT,
 235                        "Whether the JVM is running unit tests or not");
 236 
 237 PRODUCT_FLAG_PD(bool,  UseTLAB, JVMFlag::DEFAULT,
 238                        "Use thread-local object allocation");
 239 
 240 PRODUCT_FLAG_PD(bool,  ResizeTLAB, JVMFlag::DEFAULT,
 241                        "Dynamically resize TLAB size for threads");
 242 
 243 PRODUCT_FLAG(bool,     ZeroTLAB, false, JVMFlag::DEFAULT,
 244                        "Zero out the newly created TLAB");
 245 
 246 PRODUCT_FLAG(bool,     TLABStats, true, JVMFlag::DEFAULT,
 247                        "Provide more detailed and expensive TLAB statistics.");
 248 
 249 PRODUCT_FLAG_PD(bool,  NeverActAsServerClassMachine, JVMFlag::DEFAULT,
 250                        "Never act like a server-class machine");
 251 
 252 PRODUCT_FLAG(bool,     AlwaysActAsServerClassMachine, false, JVMFlag::DEFAULT,
 253                        "Always act like a server-class machine");
 254 
 255 PRODUCT_FLAG_PD(uint64_t,    MaxRAM, JVMFlag::RANGE,
 256                        "Real memory size (in bytes) used to set maximum heap size");
 257    FLAG_RANGE(         MaxRAM, 0, 0XFFFFFFFFFFFFFFFF);
 258 
 259 PRODUCT_FLAG(bool,     AggressiveHeap, false, JVMFlag::DEFAULT,
 260                        "Optimize heap options for long-running memory intensive apps");
 261 
 262 PRODUCT_FLAG(size_t,   ErgoHeapSizeLimit, 0, JVMFlag::RANGE,
 263                        "Maximum ergonomically set heap size (in bytes); zero means use "
 264                        "MaxRAM * MaxRAMPercentage / 100");
 265    FLAG_RANGE(         ErgoHeapSizeLimit, 0, max_uintx);
 266 
 267 PRODUCT_FLAG(uintx,    MaxRAMFraction, 4, JVMFlag::RANGE,
 268                        "Maximum fraction (1/n) of real memory used for maximum heap "
 269                        "size. "
 270                        "Deprecated, use MaxRAMPercentage instead");
 271    FLAG_RANGE(         MaxRAMFraction, 1, max_uintx);
 272 
 273 PRODUCT_FLAG(uintx,    MinRAMFraction, 2, JVMFlag::RANGE,
 274                        "Minimum fraction (1/n) of real memory used for maximum heap "
 275                        "size on systems with small physical memory size. "
 276                        "Deprecated, use MinRAMPercentage instead");
 277    FLAG_RANGE(         MinRAMFraction, 1, max_uintx);
 278 
 279 PRODUCT_FLAG(uintx,    InitialRAMFraction, 64, JVMFlag::RANGE,
 280                        "Fraction (1/n) of real memory used for initial heap size. "
 281                        "Deprecated, use InitialRAMPercentage instead");
 282    FLAG_RANGE(         InitialRAMFraction, 1, max_uintx);
 283 
 284 PRODUCT_FLAG(double,   MaxRAMPercentage, 25.0, JVMFlag::RANGE,
 285                        "Maximum percentage of real memory used for maximum heap size");
 286    FLAG_RANGE(         MaxRAMPercentage, 0.0, 100.0);
 287 
 288 PRODUCT_FLAG(double,   MinRAMPercentage, 50.0, JVMFlag::RANGE,
 289                        "Minimum percentage of real memory used for maximum heap"
 290                        "size on systems with small physical memory size");
 291    FLAG_RANGE(         MinRAMPercentage, 0.0, 100.0);
 292 
 293 PRODUCT_FLAG(double,   InitialRAMPercentage, 1.5625, JVMFlag::RANGE,
 294                        "Percentage of real memory used for initial heap size");
 295    FLAG_RANGE(         InitialRAMPercentage, 0.0, 100.0);
 296 
 297 PRODUCT_FLAG(int,      ActiveProcessorCount, -1, JVMFlag::DEFAULT,
 298                        "Specify the CPU count the VM should use and report as active");
 299 
 300 DEVELOP_FLAG(uintx,    MaxVirtMemFraction, 2, JVMFlag::DEFAULT,
 301                        "Maximum fraction (1/n) of virtual memory used for ergonomically "
 302                        "determining maximum heap size");
 303 
 304 PRODUCT_FLAG(bool,     UseAdaptiveSizePolicy, true, JVMFlag::DEFAULT,
 305                        "Use adaptive generation sizing policies");
 306 
 307 PRODUCT_FLAG(bool,     UsePSAdaptiveSurvivorSizePolicy, true, JVMFlag::DEFAULT,
 308                        "Use adaptive survivor sizing policies");
 309 
 310 PRODUCT_FLAG(bool,     UseAdaptiveGenerationSizePolicyAtMinorCollection, true, JVMFlag::DEFAULT,
 311                        "Use adaptive young-old sizing policies at minor collections");
 312 
 313 PRODUCT_FLAG(bool,     UseAdaptiveGenerationSizePolicyAtMajorCollection, true, JVMFlag::DEFAULT,
 314                        "Use adaptive young-old sizing policies at major collections");
 315 
 316 PRODUCT_FLAG(bool,     UseAdaptiveSizePolicyWithSystemGC, false, JVMFlag::DEFAULT,
 317                        "Include statistics from System.gc() for adaptive size policy");
 318 
 319 PRODUCT_FLAG(bool,     UseAdaptiveGCBoundary, false, JVMFlag::DEFAULT,
 320                        "Allow young-old boundary to move");
 321 
 322 DEVELOP_FLAG(intx,     PSAdaptiveSizePolicyResizeVirtualSpaceAlot, -1, JVMFlag::RANGE,
 323                        "Resize the virtual spaces of the young or old generations");
 324    FLAG_RANGE(         PSAdaptiveSizePolicyResizeVirtualSpaceAlot, -1, 1);
 325 
 326 PRODUCT_FLAG(uintx,    AdaptiveSizeThroughPutPolicy, 0, JVMFlag::RANGE,
 327                        "Policy for changing generation size for throughput goals");
 328    FLAG_RANGE(         AdaptiveSizeThroughPutPolicy, 0, 1);
 329 
 330 PRODUCT_FLAG(uintx,    AdaptiveSizePolicyInitializingSteps, 20, JVMFlag::RANGE,
 331                        "Number of steps where heuristics is used before data is used");
 332    FLAG_RANGE(         AdaptiveSizePolicyInitializingSteps, 0, max_uintx);
 333 
 334 DEVELOP_FLAG(uintx,    AdaptiveSizePolicyReadyThreshold, 5, JVMFlag::DEFAULT,
 335                        "Number of collections before the adaptive sizing is started");
 336 
 337 PRODUCT_FLAG(uintx,    AdaptiveSizePolicyOutputInterval, 0, JVMFlag::RANGE,
 338                        "Collection interval for printing information; zero means never");
 339    FLAG_RANGE(         AdaptiveSizePolicyOutputInterval, 0, max_uintx);
 340 
 341 PRODUCT_FLAG(bool,     UseAdaptiveSizePolicyFootprintGoal, true, JVMFlag::DEFAULT,
 342                        "Use adaptive minimum footprint as a goal");
 343 
 344 PRODUCT_FLAG(uintx,    AdaptiveSizePolicyWeight, 10, JVMFlag::RANGE,
 345                        "Weight given to exponential resizing, between 0 and 100");
 346    FLAG_RANGE(         AdaptiveSizePolicyWeight, 0, 100);
 347 
 348 PRODUCT_FLAG(uintx,    AdaptiveTimeWeight, 25, JVMFlag::RANGE,
 349                        "Weight given to time in adaptive policy, between 0 and 100");
 350    FLAG_RANGE(         AdaptiveTimeWeight, 0, 100);
 351 
 352 PRODUCT_FLAG(uintx,    PausePadding, 1, JVMFlag::RANGE,
 353                        "How much buffer to keep for pause time");
 354    FLAG_RANGE(         PausePadding, 0, max_juint);
 355 
 356 PRODUCT_FLAG(uintx,    PromotedPadding, 3, JVMFlag::RANGE,
 357                        "How much buffer to keep for promotion failure");
 358    FLAG_RANGE(         PromotedPadding, 0, max_juint);
 359 
 360 PRODUCT_FLAG(uintx,    SurvivorPadding, 3, JVMFlag::RANGE,
 361                        "How much buffer to keep for survivor overflow");
 362    FLAG_RANGE(         SurvivorPadding, 0, max_juint);
 363 
 364 PRODUCT_FLAG(uintx,    ThresholdTolerance, 10, JVMFlag::RANGE,
 365                        "Allowed collection cost difference between generations");
 366    FLAG_RANGE(         ThresholdTolerance, 0, 100);
 367 
 368 PRODUCT_FLAG(uintx,    AdaptiveSizePolicyCollectionCostMargin, 50, JVMFlag::RANGE,
 369                        "If collection costs are within margin, reduce both by full "
 370                        "delta");
 371    FLAG_RANGE(         AdaptiveSizePolicyCollectionCostMargin, 0, 100);
 372 
 373 PRODUCT_FLAG(uintx,    YoungGenerationSizeIncrement, 20, JVMFlag::RANGE,
 374                        "Adaptive size percentage change in young generation");
 375    FLAG_RANGE(         YoungGenerationSizeIncrement, 0, 100);
 376 
 377 PRODUCT_FLAG(uintx,    YoungGenerationSizeSupplement, 80, JVMFlag::RANGE,
 378                        "Supplement to YoungedGenerationSizeIncrement used at startup");
 379    FLAG_RANGE(         YoungGenerationSizeSupplement, 0, 100);
 380 
 381 PRODUCT_FLAG(uintx,    YoungGenerationSizeSupplementDecay, 8, JVMFlag::RANGE,
 382                        "Decay factor to YoungedGenerationSizeSupplement");
 383    FLAG_RANGE(         YoungGenerationSizeSupplementDecay, 1, max_uintx);
 384 
 385 PRODUCT_FLAG(uintx,    TenuredGenerationSizeIncrement, 20, JVMFlag::RANGE,
 386                        "Adaptive size percentage change in tenured generation");
 387    FLAG_RANGE(         TenuredGenerationSizeIncrement, 0, 100);
 388 
 389 PRODUCT_FLAG(uintx,    TenuredGenerationSizeSupplement, 80, JVMFlag::RANGE,
 390                        "Supplement to TenuredGenerationSizeIncrement used at startup");
 391    FLAG_RANGE(         TenuredGenerationSizeSupplement, 0, 100);
 392 
 393 PRODUCT_FLAG(uintx,    TenuredGenerationSizeSupplementDecay, 2, JVMFlag::RANGE,
 394                        "Decay factor to TenuredGenerationSizeIncrement");
 395    FLAG_RANGE(         TenuredGenerationSizeSupplementDecay, 1, max_uintx);
 396 
 397 PRODUCT_FLAG(uintx,    MaxGCPauseMillis, max_uintx - 1, JVMFlag::RANGE | JVMFlag::CONSTRAINT,
 398                        "Adaptive size policy maximum GC pause time goal in millisecond, "
 399                        "or (G1 Only) the maximum GC time per MMU time slice");
 400    FLAG_RANGE(         MaxGCPauseMillis, 1, max_uintx - 1);
 401    FLAG_CONSTRAINT(    MaxGCPauseMillis, (void*)MaxGCPauseMillisConstraintFunc, JVMFlag::AfterErgo);
 402 
 403 PRODUCT_FLAG(uintx,    GCPauseIntervalMillis, 0, JVMFlag::CONSTRAINT,
 404                        "Time slice for MMU specification");
 405    FLAG_CONSTRAINT(    GCPauseIntervalMillis, (void*)GCPauseIntervalMillisConstraintFunc, JVMFlag::AfterErgo);
 406 
 407 PRODUCT_FLAG(uintx,    MaxGCMinorPauseMillis, max_uintx, JVMFlag::RANGE,
 408                        "Adaptive size policy maximum GC minor pause time goal "
 409                        "in millisecond");
 410    FLAG_RANGE(         MaxGCMinorPauseMillis, 0, max_uintx);
 411 
 412 PRODUCT_FLAG(uintx,    GCTimeRatio, 99, JVMFlag::RANGE,
 413                        "Adaptive size policy application time to GC time ratio");
 414    FLAG_RANGE(         GCTimeRatio, 0, max_juint);
 415 
 416 PRODUCT_FLAG(uintx,    AdaptiveSizeDecrementScaleFactor, 4, JVMFlag::RANGE,
 417                        "Adaptive size scale down factor for shrinking");
 418    FLAG_RANGE(         AdaptiveSizeDecrementScaleFactor, 1, max_uintx);
 419 
 420 PRODUCT_FLAG(bool,     UseAdaptiveSizeDecayMajorGCCost, true, JVMFlag::DEFAULT,
 421                        "Adaptive size decays the major cost for long major intervals");
 422 
 423 PRODUCT_FLAG(uintx,    AdaptiveSizeMajorGCDecayTimeScale, 10, JVMFlag::RANGE,
 424                        "Time scale over which major costs decay");
 425    FLAG_RANGE(         AdaptiveSizeMajorGCDecayTimeScale, 0, max_uintx);
 426 
 427 PRODUCT_FLAG(uintx,    MinSurvivorRatio, 3, JVMFlag::RANGE,
 428                        "Minimum ratio of young generation/survivor space size");
 429    FLAG_RANGE(         MinSurvivorRatio, 3, max_uintx);
 430 
 431 PRODUCT_FLAG(uintx,    InitialSurvivorRatio, 8, JVMFlag::RANGE,
 432                        "Initial ratio of young generation/survivor space size");
 433    FLAG_RANGE(         InitialSurvivorRatio, 0, max_uintx);
 434 
 435 PRODUCT_FLAG(size_t,   BaseFootPrintEstimate, 256*M, JVMFlag::RANGE,
 436                        "Estimate of footprint other than Java Heap");
 437    FLAG_RANGE(         BaseFootPrintEstimate, 0, max_uintx);
 438 
 439 PRODUCT_FLAG(bool,     UseGCOverheadLimit, true, JVMFlag::DEFAULT,
 440                        "Use policy to limit of proportion of time spent in GC "
 441                        "before an OutOfMemory error is thrown");
 442 
 443 PRODUCT_FLAG(uintx,    GCTimeLimit, 98, JVMFlag::RANGE,
 444                        "Limit of the proportion of time spent in GC before "
 445                        "an OutOfMemoryError is thrown (used with GCHeapFreeLimit)");
 446    FLAG_RANGE(         GCTimeLimit, 0, 100);
 447 
 448 PRODUCT_FLAG(uintx,    GCHeapFreeLimit, 2, JVMFlag::RANGE,
 449                        "Minimum percentage of free space after a full GC before an "
 450                        "OutOfMemoryError is thrown (used with GCTimeLimit)");
 451    FLAG_RANGE(         GCHeapFreeLimit, 0, 100);
 452 
 453 DEVELOP_FLAG(uintx,    GCOverheadLimitThreshold, 5, JVMFlag::RANGE,
 454                        "Number of consecutive collections before gc time limit fires");
 455    FLAG_RANGE(         GCOverheadLimitThreshold, 1, max_uintx);
 456 
 457 PRODUCT_FLAG(intx,     PrefetchCopyIntervalInBytes, -1, JVMFlag::RANGE,
 458                        "How far ahead to prefetch destination area (<= 0 means off)");
 459    FLAG_RANGE(         PrefetchCopyIntervalInBytes, -1, max_jint);
 460 
 461 PRODUCT_FLAG(intx,     PrefetchScanIntervalInBytes, -1, JVMFlag::RANGE,
 462                        "How far ahead to prefetch scan area (<= 0 means off)");
 463    FLAG_RANGE(         PrefetchScanIntervalInBytes, -1, max_jint);
 464 
 465 PRODUCT_FLAG(intx,     PrefetchFieldsAhead, -1, JVMFlag::RANGE,
 466                        "How many fields ahead to prefetch in oop scan (<= 0 means off)");
 467    FLAG_RANGE(         PrefetchFieldsAhead, -1, max_jint);
 468 
 469 PRODUCT_FLAG(bool,     VerifyDuringStartup, false, JVMFlag::DIAGNOSTIC,
 470                        "Verify memory system before executing any Java code "
 471                        "during VM initialization");
 472 
 473 PRODUCT_FLAG(bool,     VerifyBeforeExit, trueInDebug, JVMFlag::DIAGNOSTIC,
 474                        "Verify system before exiting");
 475 
 476 PRODUCT_FLAG(bool,     VerifyBeforeGC, false, JVMFlag::DIAGNOSTIC,
 477                        "Verify memory system before GC");
 478 
 479 PRODUCT_FLAG(bool,     VerifyAfterGC, false, JVMFlag::DIAGNOSTIC,
 480                        "Verify memory system after GC");
 481 
 482 PRODUCT_FLAG(bool,     VerifyDuringGC, false, JVMFlag::DIAGNOSTIC,
 483                        "Verify memory system during GC (between phases)");
 484 
 485 PRODUCT_FLAG(ccstr,    VerifyGCType, "", JVMFlag::DIAGNOSTIC | JVMFlag::STRINGLIST,
 486                        "GC type(s) to verify when Verify*GC is enabled."
 487                        "Available types are collector specific.");
 488 
 489 PRODUCT_FLAG(ccstr,    VerifySubSet, "", JVMFlag::DIAGNOSTIC | JVMFlag::STRINGLIST,
 490                        "Memory sub-systems to verify when Verify*GC flag(s) "
 491                        "are enabled. One or more sub-systems can be specified "
 492                        "in a comma separated string. Sub-systems are: "
 493                        "threads, heap, symbol_table, string_table, codecache, "
 494                        "dictionary, classloader_data_graph, metaspace, jni_handles, "
 495                        "codecache_oops");
 496 
 497 PRODUCT_FLAG(bool,     GCParallelVerificationEnabled, true, JVMFlag::DIAGNOSTIC,
 498                        "Enable parallel memory system verification");
 499 
 500 PRODUCT_FLAG(bool,     DeferInitialCardMark, false, JVMFlag::DIAGNOSTIC,
 501                        "When +ReduceInitialCardMarks, explicitly defer any that "
 502                        "may arise from new_pre_store_barrier");
 503 
 504 PRODUCT_FLAG(bool,     UseCondCardMark, false, JVMFlag::DEFAULT,
 505                        "Check for already marked card before updating card table");
 506 
 507 PRODUCT_FLAG(bool,     VerifyRememberedSets, false, JVMFlag::DIAGNOSTIC,
 508                        "Verify GC remembered sets");
 509 
 510 PRODUCT_FLAG(bool,     VerifyObjectStartArray, true, JVMFlag::DIAGNOSTIC,
 511                        "Verify GC object start array if verify before/after");
 512 
 513 PRODUCT_FLAG(bool,     DisableExplicitGC, false, JVMFlag::DEFAULT,
 514                        "Ignore calls to System.gc()");
 515 
 516 PRODUCT_FLAG(bool,     PrintGC, false, JVMFlag::DEFAULT,
 517                        "Print message at garbage collection. "
 518                        "Deprecated, use -Xlog:gc instead.");
 519 
 520 PRODUCT_FLAG(bool,     PrintGCDetails, false, JVMFlag::DEFAULT,
 521                        "Print more details at garbage collection. "
 522                        "Deprecated, use -Xlog:gc* instead.");
 523 
 524 DEVELOP_FLAG(intx,     ConcGCYieldTimeout, 0, JVMFlag::RANGE,
 525                        "If non-zero, assert that GC threads yield within this "
 526                        "number of milliseconds");
 527    FLAG_RANGE(         ConcGCYieldTimeout, 0, max_intx);
 528 
 529 NOTPROD_FLAG(intx,     ScavengeALotInterval, 1, JVMFlag::DEFAULT,
 530                        "Interval between which scavenge will occur with +ScavengeALot");
 531 
 532 NOTPROD_FLAG(intx,     FullGCALotInterval, 1, JVMFlag::DEFAULT,
 533                        "Interval between which full gc will occur with +FullGCALot");
 534 
 535 NOTPROD_FLAG(intx,     FullGCALotStart, 0, JVMFlag::DEFAULT,
 536                        "For which invocation to start FullGCAlot");
 537 
 538 NOTPROD_FLAG(intx,     FullGCALotDummies, 32*K, JVMFlag::DEFAULT,
 539                        "Dummy object allocated with +FullGCALot, forcing all objects "
 540                        "to move");
 541 
 542 
 543     //  gc parameters 
 544 PRODUCT_FLAG(size_t,   MinHeapSize, 0, JVMFlag::CONSTRAINT,
 545                        "Minimum heap size (in bytes); zero means use ergonomics");
 546    FLAG_CONSTRAINT(    MinHeapSize, (void*)MinHeapSizeConstraintFunc, JVMFlag::AfterErgo);
 547 
 548 PRODUCT_FLAG(size_t,   InitialHeapSize, 0, JVMFlag::CONSTRAINT,
 549                        "Initial heap size (in bytes); zero means use ergonomics");
 550    FLAG_CONSTRAINT(    InitialHeapSize, (void*)InitialHeapSizeConstraintFunc, JVMFlag::AfterErgo);
 551 
 552 PRODUCT_FLAG(size_t,   MaxHeapSize, ScaleForWordSize(96*M), JVMFlag::CONSTRAINT,
 553                        "Maximum heap size (in bytes)");
 554    FLAG_CONSTRAINT(    MaxHeapSize, (void*)MaxHeapSizeConstraintFunc, JVMFlag::AfterErgo);
 555 
 556 PRODUCT_FLAG(size_t,   SoftMaxHeapSize, 0, JVMFlag::MANAGEABLE | JVMFlag::CONSTRAINT,
 557                        "Soft limit for maximum heap size (in bytes)");
 558    FLAG_CONSTRAINT(    SoftMaxHeapSize, (void*)SoftMaxHeapSizeConstraintFunc, JVMFlag::AfterMemoryInit);
 559 
 560 PRODUCT_FLAG(size_t,   OldSize, ScaleForWordSize(4*M), JVMFlag::RANGE,
 561                        "Initial tenured generation size (in bytes)");
 562    FLAG_RANGE(         OldSize, 0, max_uintx);
 563 
 564 PRODUCT_FLAG(size_t,   NewSize, ScaleForWordSize(1*M), JVMFlag::CONSTRAINT,
 565                        "Initial new generation size (in bytes)");
 566    FLAG_CONSTRAINT(    NewSize, (void*)NewSizeConstraintFunc, JVMFlag::AfterErgo);
 567 
 568 PRODUCT_FLAG(size_t,   MaxNewSize, max_uintx, JVMFlag::RANGE,
 569                        "Maximum new generation size (in bytes), max_uintx means set "
 570                        "ergonomically");
 571    FLAG_RANGE(         MaxNewSize, 0, max_uintx);
 572 
 573 PRODUCT_FLAG_PD(size_t,  HeapBaseMinAddress, JVMFlag::CONSTRAINT,
 574                        "OS specific low limit for heap base address");
 575    FLAG_CONSTRAINT(    HeapBaseMinAddress, (void*)HeapBaseMinAddressConstraintFunc, JVMFlag::AfterErgo);
 576 
 577 PRODUCT_FLAG(size_t,   PretenureSizeThreshold, 0, JVMFlag::RANGE,
 578                        "Maximum size in bytes of objects allocated in DefNew "
 579                        "generation; zero means no maximum");
 580    FLAG_RANGE(         PretenureSizeThreshold, 0, max_uintx);
 581 
 582 PRODUCT_FLAG(size_t,   MinTLABSize, 2*K, JVMFlag::RANGE | JVMFlag::CONSTRAINT,
 583                        "Minimum allowed TLAB size (in bytes)");
 584    FLAG_RANGE(         MinTLABSize, 1, max_uintx/2);
 585    FLAG_CONSTRAINT(    MinTLABSize, (void*)MinTLABSizeConstraintFunc, JVMFlag::AfterMemoryInit);
 586 
 587 PRODUCT_FLAG(size_t,   TLABSize, 0, JVMFlag::CONSTRAINT,
 588                        "Starting TLAB size (in bytes); zero means set ergonomically");
 589    FLAG_CONSTRAINT(    TLABSize, (void*)TLABSizeConstraintFunc, JVMFlag::AfterMemoryInit);
 590 
 591 PRODUCT_FLAG(size_t,   YoungPLABSize, 4096, JVMFlag::CONSTRAINT,
 592                        "Size of young gen promotion LAB's (in HeapWords)");
 593    FLAG_CONSTRAINT(    YoungPLABSize, (void*)YoungPLABSizeConstraintFunc, JVMFlag::AfterMemoryInit);
 594 
 595 PRODUCT_FLAG(size_t,   OldPLABSize, 1024, JVMFlag::CONSTRAINT,
 596                        "Size of old gen promotion LAB's (in HeapWords)");
 597    FLAG_CONSTRAINT(    OldPLABSize, (void*)OldPLABSizeConstraintFunc, JVMFlag::AfterMemoryInit);
 598 
 599 PRODUCT_FLAG(uintx,    TLABAllocationWeight, 35, JVMFlag::RANGE,
 600                        "Allocation averaging weight");
 601    FLAG_RANGE(         TLABAllocationWeight, 0, 100);
 602 
 603 
 604     //  Limit the lower bound of this flag to 1 as it is used  
 605     //  in a division expression.                              
 606 PRODUCT_FLAG(uintx,    TLABWasteTargetPercent, 1, JVMFlag::RANGE,
 607                        "Percentage of Eden that can be wasted");
 608    FLAG_RANGE(         TLABWasteTargetPercent, 1, 100);
 609 
 610 PRODUCT_FLAG(uintx,    TLABRefillWasteFraction, 64, JVMFlag::RANGE,
 611                        "Maximum TLAB waste at a refill (internal fragmentation)");
 612    FLAG_RANGE(         TLABRefillWasteFraction, 1, max_juint);
 613 
 614 PRODUCT_FLAG(uintx,    TLABWasteIncrement, 4, JVMFlag::RANGE | JVMFlag::CONSTRAINT,
 615                        "Increment allowed waste at slow allocation");
 616    FLAG_RANGE(         TLABWasteIncrement, 0, max_jint);
 617    FLAG_CONSTRAINT(    TLABWasteIncrement, (void*)TLABWasteIncrementConstraintFunc, JVMFlag::AfterMemoryInit);
 618 
 619 PRODUCT_FLAG(uintx,    SurvivorRatio, 8, JVMFlag::RANGE | JVMFlag::CONSTRAINT,
 620                        "Ratio of eden/survivor space size");
 621    FLAG_RANGE(         SurvivorRatio, 1, max_uintx-2);
 622    FLAG_CONSTRAINT(    SurvivorRatio, (void*)SurvivorRatioConstraintFunc, JVMFlag::AfterMemoryInit);
 623 
 624 PRODUCT_FLAG(uintx,    NewRatio, 2, JVMFlag::RANGE,
 625                        "Ratio of old/new generation sizes");
 626    FLAG_RANGE(         NewRatio, 0, max_uintx-1);
 627 
 628 PRODUCT_FLAG_PD(size_t,  NewSizeThreadIncrease, JVMFlag::RANGE,
 629                        "Additional size added to desired new generation size per "
 630                        "non-daemon thread (in bytes)");
 631    FLAG_RANGE(         NewSizeThreadIncrease, 0, max_uintx);
 632 
 633 PRODUCT_FLAG(uintx,    QueuedAllocationWarningCount, 0, JVMFlag::RANGE,
 634                        "Number of times an allocation that queues behind a GC "
 635                        "will retry before printing a warning");
 636    FLAG_RANGE(         QueuedAllocationWarningCount, 0, max_uintx);
 637 
 638 PRODUCT_FLAG(uintx,    VerifyGCStartAt, 0, JVMFlag::DIAGNOSTIC | JVMFlag::RANGE,
 639                        "GC invoke count where +VerifyBefore/AfterGC kicks in");
 640    FLAG_RANGE(         VerifyGCStartAt, 0, max_uintx);
 641 
 642 PRODUCT_FLAG(intx,     VerifyGCLevel, 0, JVMFlag::DIAGNOSTIC | JVMFlag::RANGE,
 643                        "Generation level at which to start +VerifyBefore/AfterGC");
 644    FLAG_RANGE(         VerifyGCLevel, 0, 1);
 645 
 646 PRODUCT_FLAG(uintx,    MaxTenuringThreshold, 15, JVMFlag::RANGE | JVMFlag::CONSTRAINT,
 647                        "Maximum value for tenuring threshold");
 648  //TODO: to avoid circular dependency, the min/max cannot be declared in header file
 649  //FLAG_RANGE(         MaxTenuringThreshold, 0, markWord::max_age + 1);
 650    FLAG_CONSTRAINT(    MaxTenuringThreshold, (void*)MaxTenuringThresholdConstraintFunc, JVMFlag::AfterErgo);
 651 
 652 PRODUCT_FLAG(uintx,    InitialTenuringThreshold, 7, JVMFlag::RANGE | JVMFlag::CONSTRAINT,
 653                        "Initial value for tenuring threshold");
 654  //TODO: to avoid circular dependency, the min/max cannot be declared in header file
 655  //FLAG_RANGE(         InitialTenuringThreshold, 0, markWord::max_age + 1);
 656    FLAG_CONSTRAINT(    InitialTenuringThreshold, (void*)InitialTenuringThresholdConstraintFunc, JVMFlag::AfterErgo);
 657 
 658 PRODUCT_FLAG(uintx,    TargetSurvivorRatio, 50, JVMFlag::RANGE,
 659                        "Desired percentage of survivor space used after scavenge");
 660    FLAG_RANGE(         TargetSurvivorRatio, 0, 100);
 661 
 662 PRODUCT_FLAG(uintx,    MarkSweepDeadRatio, 5, JVMFlag::RANGE,
 663                        "Percentage (0-100) of the old gen allowed as dead wood. "
 664                        "Serial mark sweep treats this as both the minimum and maximum "
 665                        "value. "
 666                        "Par compact uses a variable scale based on the density of the "
 667                        "generation and treats this as the maximum value when the heap "
 668                        "is either completely full or completely empty.  Par compact "
 669                        "also has a smaller default value; see arguments.cpp.");
 670    FLAG_RANGE(         MarkSweepDeadRatio, 0, 100);
 671 
 672 PRODUCT_FLAG(uint,     MarkSweepAlwaysCompactCount, 4, JVMFlag::RANGE,
 673                        "How often should we fully compact the heap (ignoring the dead "
 674                        "space parameters)");
 675    FLAG_RANGE(         MarkSweepAlwaysCompactCount, 1, max_juint);
 676 
 677 DEVELOP_FLAG(uintx,    GCExpandToAllocateDelayMillis, 0, JVMFlag::DEFAULT,
 678                        "Delay between expansion and allocation (in milliseconds)");
 679 
 680 PRODUCT_FLAG(uintx,    GCDrainStackTargetSize, 64, JVMFlag::RANGE,
 681                        "Number of entries we will try to leave on the stack "
 682                        "during parallel gc");
 683    FLAG_RANGE(         GCDrainStackTargetSize, 0, max_juint);




































































































 684 
 685 #endif // SHARE_GC_SHARED_GC_GLOBALS_HPP
< prev index next >