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