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