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