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(uintx, WorkStealingSleepMillis, 1, \ 352 "Sleep time when sleep is used for yields") \ 353 \ 354 experimental(uintx, WorkStealingYieldsBeforeSleep, 5000, \ 355 "Number of yields before a sleep is done during work stealing") \ 356 \ 357 experimental(uintx, WorkStealingHardSpins, 4096, \ 358 "Number of iterations in a spin loop between checks on " \ 359 "time out of hard spin") \ 360 \ 361 experimental(uintx, WorkStealingSpinToYieldRatio, 10, \ 362 "Ratio of hard spins to calls to yield") \ 363 \ 364 develop(uintx, ObjArrayMarkingStride, 2048, \ 365 "Number of object array elements to push onto the marking stack " \ 366 "before pushing a continuation entry") \ 367 \ 368 develop(bool, MetadataAllocationFailALot, false, \ 369 "Fail metadata allocations at intervals controlled by " \ 370 "MetadataAllocationFailALotInterval") \ 371 \ 372 develop(uintx, MetadataAllocationFailALotInterval, 1000, \ 373 "Metadata allocation failure a lot interval") \ 374 \ 375 notproduct(bool, ExecuteInternalVMTests, false, \ 376 "Enable execution of internal VM tests") \ 377 \ 378 notproduct(bool, VerboseInternalVMTests, false, \ 379 "Turn on logging for internal VM tests.") \ 380 \ 381 product(bool, ExecutingUnitTests, false, \ 382 "Whether the JVM is running unit tests or not") \ 383 \ 384 product_pd(bool, UseTLAB, "Use thread-local object allocation") \ 385 \ 386 product_pd(bool, ResizeTLAB, \ 387 "Dynamically resize TLAB size for threads") \ 388 \ 389 product(bool, ZeroTLAB, false, \ 390 "Zero out the newly created TLAB") \ 391 \ 392 product(bool, TLABStats, true, \ 393 "Provide more detailed and expensive TLAB statistics.") \ 394 \ 395 product_pd(bool, NeverActAsServerClassMachine, \ 396 "Never act like a server-class machine") \ 397 \ 398 product(bool, AlwaysActAsServerClassMachine, false, \ 399 "Always act like a server-class machine") \ 400 \ 401 product_pd(uint64_t, MaxRAM, \ 402 "Real memory size (in bytes) used to set maximum heap size") \ 403 range(0, 0XFFFFFFFFFFFFFFFF) \ 404 \ 405 product(bool, AggressiveHeap, false, \ 406 "Optimize heap options for long-running memory intensive apps") \ 407 \ 408 product(size_t, ErgoHeapSizeLimit, 0, \ 409 "Maximum ergonomically set heap size (in bytes); zero means use " \ 410 "MaxRAM * MaxRAMPercentage / 100") \ 411 range(0, max_uintx) \ 412 \ 413 product(uintx, MaxRAMFraction, 4, \ 414 "Maximum fraction (1/n) of real memory used for maximum heap " \ 415 "size. " \ 416 "Deprecated, use MaxRAMPercentage instead") \ 417 range(1, max_uintx) \ 418 \ 419 product(uintx, MinRAMFraction, 2, \ 420 "Minimum fraction (1/n) of real memory used for maximum heap " \ 421 "size on systems with small physical memory size. " \ 422 "Deprecated, use MinRAMPercentage instead") \ 423 range(1, max_uintx) \ 424 \ 425 product(uintx, InitialRAMFraction, 64, \ 426 "Fraction (1/n) of real memory used for initial heap size. " \ 427 "Deprecated, use InitialRAMPercentage instead") \ 428 range(1, max_uintx) \ 429 \ 430 product(double, MaxRAMPercentage, 25.0, \ 431 "Maximum percentage of real memory used for maximum heap size") \ 432 range(0.0, 100.0) \ 433 \ 434 product(double, MinRAMPercentage, 50.0, \ 435 "Minimum percentage of real memory used for maximum heap" \ 436 "size on systems with small physical memory size") \ 437 range(0.0, 100.0) \ 438 \ 439 product(double, InitialRAMPercentage, 1.5625, \ 440 "Percentage of real memory used for initial heap size") \ 441 range(0.0, 100.0) \ 442 \ 443 product(int, ActiveProcessorCount, -1, \ 444 "Specify the CPU count the VM should use and report as active") \ 445 \ 446 develop(uintx, MaxVirtMemFraction, 2, \ 447 "Maximum fraction (1/n) of virtual memory used for ergonomically "\ 448 "determining maximum heap size") \ 449 \ 450 product(bool, UseAdaptiveSizePolicy, true, \ 451 "Use adaptive generation sizing policies") \ 452 \ 453 product(bool, UsePSAdaptiveSurvivorSizePolicy, true, \ 454 "Use adaptive survivor sizing policies") \ 455 \ 456 product(bool, UseAdaptiveGenerationSizePolicyAtMinorCollection, true, \ 457 "Use adaptive young-old sizing policies at minor collections") \ 458 \ 459 product(bool, UseAdaptiveGenerationSizePolicyAtMajorCollection, true, \ 460 "Use adaptive young-old sizing policies at major collections") \ 461 \ 462 product(bool, UseAdaptiveSizePolicyWithSystemGC, false, \ 463 "Include statistics from System.gc() for adaptive size policy") \ 464 \ 465 product(bool, UseAdaptiveGCBoundary, false, \ 466 "Allow young-old boundary to move") \ 467 \ 468 develop(intx, PSAdaptiveSizePolicyResizeVirtualSpaceAlot, -1, \ 469 "Resize the virtual spaces of the young or old generations") \ 470 range(-1, 1) \ 471 \ 472 product(uintx, AdaptiveSizeThroughPutPolicy, 0, \ 473 "Policy for changing generation size for throughput goals") \ 474 range(0, 1) \ 475 \ 476 product(uintx, AdaptiveSizePolicyInitializingSteps, 20, \ 477 "Number of steps where heuristics is used before data is used") \ 478 range(0, max_uintx) \ 479 \ 480 develop(uintx, AdaptiveSizePolicyReadyThreshold, 5, \ 481 "Number of collections before the adaptive sizing is started") \ 482 \ 483 product(uintx, AdaptiveSizePolicyOutputInterval, 0, \ 484 "Collection interval for printing information; zero means never") \ 485 range(0, max_uintx) \ 486 \ 487 product(bool, UseAdaptiveSizePolicyFootprintGoal, true, \ 488 "Use adaptive minimum footprint as a goal") \ 489 \ 490 product(uintx, AdaptiveSizePolicyWeight, 10, \ 491 "Weight given to exponential resizing, between 0 and 100") \ 492 range(0, 100) \ 493 \ 494 product(uintx, AdaptiveTimeWeight, 25, \ 495 "Weight given to time in adaptive policy, between 0 and 100") \ 496 range(0, 100) \ 497 \ 498 product(uintx, PausePadding, 1, \ 499 "How much buffer to keep for pause time") \ 500 range(0, max_juint) \ 501 \ 502 product(uintx, PromotedPadding, 3, \ 503 "How much buffer to keep for promotion failure") \ 504 range(0, max_juint) \ 505 \ 506 product(uintx, SurvivorPadding, 3, \ 507 "How much buffer to keep for survivor overflow") \ 508 range(0, max_juint) \ 509 \ 510 product(uintx, ThresholdTolerance, 10, \ 511 "Allowed collection cost difference between generations") \ 512 range(0, 100) \ 513 \ 514 product(uintx, AdaptiveSizePolicyCollectionCostMargin, 50, \ 515 "If collection costs are within margin, reduce both by full " \ 516 "delta") \ 517 range(0, 100) \ 518 \ 519 product(uintx, YoungGenerationSizeIncrement, 20, \ 520 "Adaptive size percentage change in young generation") \ 521 range(0, 100) \ 522 \ 523 product(uintx, YoungGenerationSizeSupplement, 80, \ 524 "Supplement to YoungedGenerationSizeIncrement used at startup") \ 525 range(0, 100) \ 526 \ 527 product(uintx, YoungGenerationSizeSupplementDecay, 8, \ 528 "Decay factor to YoungedGenerationSizeSupplement") \ 529 range(1, max_uintx) \ 530 \ 531 product(uintx, TenuredGenerationSizeIncrement, 20, \ 532 "Adaptive size percentage change in tenured generation") \ 533 range(0, 100) \ 534 \ 535 product(uintx, TenuredGenerationSizeSupplement, 80, \ 536 "Supplement to TenuredGenerationSizeIncrement used at startup") \ 537 range(0, 100) \ 538 \ 539 product(uintx, TenuredGenerationSizeSupplementDecay, 2, \ 540 "Decay factor to TenuredGenerationSizeIncrement") \ 541 range(1, max_uintx) \ 542 \ 543 product(uintx, MaxGCPauseMillis, max_uintx - 1, \ 544 "Adaptive size policy maximum GC pause time goal in millisecond, "\ 545 "or (G1 Only) the maximum GC time per MMU time slice") \ 546 range(1, max_uintx - 1) \ 547 constraint(MaxGCPauseMillisConstraintFunc,AfterErgo) \ 548 \ 549 product(uintx, GCPauseIntervalMillis, 0, \ 550 "Time slice for MMU specification") \ 551 constraint(GCPauseIntervalMillisConstraintFunc,AfterErgo) \ 552 \ 553 product(uintx, MaxGCMinorPauseMillis, max_uintx, \ 554 "Adaptive size policy maximum GC minor pause time goal " \ 555 "in millisecond") \ 556 range(0, max_uintx) \ 557 \ 558 product(uintx, GCTimeRatio, 99, \ 559 "Adaptive size policy application time to GC time ratio") \ 560 range(0, max_juint) \ 561 \ 562 product(uintx, AdaptiveSizeDecrementScaleFactor, 4, \ 563 "Adaptive size scale down factor for shrinking") \ 564 range(1, max_uintx) \ 565 \ 566 product(bool, UseAdaptiveSizeDecayMajorGCCost, true, \ 567 "Adaptive size decays the major cost for long major intervals") \ 568 \ 569 product(uintx, AdaptiveSizeMajorGCDecayTimeScale, 10, \ 570 "Time scale over which major costs decay") \ 571 range(0, max_uintx) \ 572 \ 573 product(uintx, MinSurvivorRatio, 3, \ 574 "Minimum ratio of young generation/survivor space size") \ 575 range(3, max_uintx) \ 576 \ 577 product(uintx, InitialSurvivorRatio, 8, \ 578 "Initial ratio of young generation/survivor space size") \ 579 range(0, max_uintx) \ 580 \ 581 product(size_t, BaseFootPrintEstimate, 256*M, \ 582 "Estimate of footprint other than Java Heap") \ 583 range(0, max_uintx) \ 584 \ 585 product(bool, UseGCOverheadLimit, true, \ 586 "Use policy to limit of proportion of time spent in GC " \ 587 "before an OutOfMemory error is thrown") \ 588 \ 589 product(uintx, GCTimeLimit, 98, \ 590 "Limit of the proportion of time spent in GC before " \ 591 "an OutOfMemoryError is thrown (used with GCHeapFreeLimit)") \ 592 range(0, 100) \ 593 \ 594 product(uintx, GCHeapFreeLimit, 2, \ 595 "Minimum percentage of free space after a full GC before an " \ 596 "OutOfMemoryError is thrown (used with GCTimeLimit)") \ 597 range(0, 100) \ 598 \ 599 develop(uintx, AdaptiveSizePolicyGCTimeLimitThreshold, 5, \ 600 "Number of consecutive collections before gc time limit fires") \ 601 range(1, max_uintx) \ 602 \ 603 product(intx, PrefetchCopyIntervalInBytes, -1, \ 604 "How far ahead to prefetch destination area (<= 0 means off)") \ 605 range(-1, max_jint) \ 606 \ 607 product(intx, PrefetchScanIntervalInBytes, -1, \ 608 "How far ahead to prefetch scan area (<= 0 means off)") \ 609 range(-1, max_jint) \ 610 \ 611 product(intx, PrefetchFieldsAhead, -1, \ 612 "How many fields ahead to prefetch in oop scan (<= 0 means off)") \ 613 range(-1, max_jint) \ 614 \ 615 diagnostic(bool, VerifyDuringStartup, false, \ 616 "Verify memory system before executing any Java code " \ 617 "during VM initialization") \ 618 \ 619 diagnostic(bool, VerifyBeforeExit, trueInDebug, \ 620 "Verify system before exiting") \ 621 \ 622 diagnostic(bool, VerifyBeforeGC, false, \ 623 "Verify memory system before GC") \ 624 \ 625 diagnostic(bool, VerifyAfterGC, false, \ 626 "Verify memory system after GC") \ 627 \ 628 diagnostic(bool, VerifyDuringGC, false, \ 629 "Verify memory system during GC (between phases)") \ 630 \ 631 diagnostic(ccstrlist, VerifyGCType, "", \ 632 "GC type(s) to verify when Verify*GC is enabled." \ 633 "Available types are collector specific.") \ 634 \ 635 diagnostic(ccstrlist, VerifySubSet, "", \ 636 "Memory sub-systems to verify when Verify*GC flag(s) " \ 637 "are enabled. One or more sub-systems can be specified " \ 638 "in a comma separated string. Sub-systems are: " \ 639 "threads, heap, symbol_table, string_table, codecache, " \ 640 "dictionary, classloader_data_graph, metaspace, jni_handles, " \ 641 "codecache_oops") \ 642 \ 643 diagnostic(bool, GCParallelVerificationEnabled, true, \ 644 "Enable parallel memory system verification") \ 645 \ 646 diagnostic(bool, DeferInitialCardMark, false, \ 647 "When +ReduceInitialCardMarks, explicitly defer any that " \ 648 "may arise from new_pre_store_barrier") \ 649 \ 650 product(bool, UseCondCardMark, false, \ 651 "Check for already marked card before updating card table") \ 652 \ 653 diagnostic(bool, VerifyRememberedSets, false, \ 654 "Verify GC remembered sets") \ 655 \ 656 diagnostic(bool, VerifyObjectStartArray, true, \ 657 "Verify GC object start array if verify before/after") \ 658 \ 659 product(bool, DisableExplicitGC, false, \ 660 "Ignore calls to System.gc()") \ 661 \ 662 product(bool, BindGCTaskThreadsToCPUs, false, \ 663 "Bind GCTaskThreads to CPUs if possible") \ 664 \ 665 product(bool, UseGCTaskAffinity, false, \ 666 "Use worker affinity when asking for GCTasks") \ 667 \ 668 product(bool, PrintGC, false, \ 669 "Print message at garbage collection. " \ 670 "Deprecated, use -Xlog:gc instead.") \ 671 \ 672 product(bool, PrintGCDetails, false, \ 673 "Print more details at garbage collection. " \ 674 "Deprecated, use -Xlog:gc* instead.") \ 675 \ 676 develop(intx, ConcGCYieldTimeout, 0, \ 677 "If non-zero, assert that GC threads yield within this " \ 678 "number of milliseconds") \ 679 range(0, max_intx) \ 680 \ 681 notproduct(intx, ScavengeALotInterval, 1, \ 682 "Interval between which scavenge will occur with +ScavengeALot") \ 683 \ 684 notproduct(intx, FullGCALotInterval, 1, \ 685 "Interval between which full gc will occur with +FullGCALot") \ 686 \ 687 notproduct(intx, FullGCALotStart, 0, \ 688 "For which invocation to start FullGCAlot") \ 689 \ 690 notproduct(intx, FullGCALotDummies, 32*K, \ 691 "Dummy object allocated with +FullGCALot, forcing all objects " \ 692 "to move") \ 693 \ 694 /* gc parameters */ \ 695 product(size_t, InitialHeapSize, 0, \ 696 "Initial heap size (in bytes); zero means use ergonomics") \ 697 constraint(InitialHeapSizeConstraintFunc,AfterErgo) \ 698 \ 699 product(size_t, MaxHeapSize, ScaleForWordSize(96*M), \ 700 "Maximum heap size (in bytes)") \ 701 constraint(MaxHeapSizeConstraintFunc,AfterErgo) \ 702 \ 703 product(size_t, OldSize, ScaleForWordSize(4*M), \ 704 "Initial tenured generation size (in bytes)") \ 705 range(0, max_uintx) \ 706 \ 707 product(size_t, NewSize, ScaleForWordSize(1*M), \ 708 "Initial new generation size (in bytes)") \ 709 constraint(NewSizeConstraintFunc,AfterErgo) \ 710 \ 711 product(size_t, MaxNewSize, max_uintx, \ 712 "Maximum new generation size (in bytes), max_uintx means set " \ 713 "ergonomically") \ 714 range(0, max_uintx) \ 715 \ 716 product_pd(size_t, HeapBaseMinAddress, \ 717 "OS specific low limit for heap base address") \ 718 constraint(HeapBaseMinAddressConstraintFunc,AfterErgo) \ 719 \ 720 product(size_t, PretenureSizeThreshold, 0, \ 721 "Maximum size in bytes of objects allocated in DefNew " \ 722 "generation; zero means no maximum") \ 723 range(0, max_uintx) \ 724 \ 725 product(size_t, MinTLABSize, 2*K, \ 726 "Minimum allowed TLAB size (in bytes)") \ 727 range(1, max_uintx/2) \ 728 constraint(MinTLABSizeConstraintFunc,AfterMemoryInit) \ 729 \ 730 product(size_t, TLABSize, 0, \ 731 "Starting TLAB size (in bytes); zero means set ergonomically") \ 732 constraint(TLABSizeConstraintFunc,AfterMemoryInit) \ 733 \ 734 product(size_t, YoungPLABSize, 4096, \ 735 "Size of young gen promotion LAB's (in HeapWords)") \ 736 constraint(YoungPLABSizeConstraintFunc,AfterMemoryInit) \ 737 \ 738 product(size_t, OldPLABSize, 1024, \ 739 "Size of old gen promotion LAB's (in HeapWords), or Number " \ 740 "of blocks to attempt to claim when refilling CMS LAB's") \ 741 constraint(OldPLABSizeConstraintFunc,AfterMemoryInit) \ 742 \ 743 product(uintx, TLABAllocationWeight, 35, \ 744 "Allocation averaging weight") \ 745 range(0, 100) \ 746 \ 747 /* Limit the lower bound of this flag to 1 as it is used */ \ 748 /* in a division expression. */ \ 749 product(uintx, TLABWasteTargetPercent, 1, \ 750 "Percentage of Eden that can be wasted") \ 751 range(1, 100) \ 752 \ 753 product(uintx, TLABRefillWasteFraction, 64, \ 754 "Maximum TLAB waste at a refill (internal fragmentation)") \ 755 range(1, max_juint) \ 756 \ 757 product(uintx, TLABWasteIncrement, 4, \ 758 "Increment allowed waste at slow allocation") \ 759 range(0, max_jint) \ 760 constraint(TLABWasteIncrementConstraintFunc,AfterMemoryInit) \ 761 \ 762 product(uintx, SurvivorRatio, 8, \ 763 "Ratio of eden/survivor space size") \ 764 range(1, max_uintx-2) \ 765 constraint(SurvivorRatioConstraintFunc,AfterMemoryInit) \ 766 \ 767 product(uintx, NewRatio, 2, \ 768 "Ratio of old/new generation sizes") \ 769 range(0, max_uintx-1) \ 770 \ 771 product_pd(size_t, NewSizeThreadIncrease, \ 772 "Additional size added to desired new generation size per " \ 773 "non-daemon thread (in bytes)") \ 774 range(0, max_uintx) \ 775 \ 776 product(uintx, QueuedAllocationWarningCount, 0, \ 777 "Number of times an allocation that queues behind a GC " \ 778 "will retry before printing a warning") \ 779 range(0, max_uintx) \ 780 \ 781 diagnostic(uintx, VerifyGCStartAt, 0, \ 782 "GC invoke count where +VerifyBefore/AfterGC kicks in") \ 783 range(0, max_uintx) \ 784 \ 785 diagnostic(intx, VerifyGCLevel, 0, \ 786 "Generation level at which to start +VerifyBefore/AfterGC") \ 787 range(0, 1) \ 788 \ 789 product(uintx, MaxTenuringThreshold, 15, \ 790 "Maximum value for tenuring threshold") \ 791 range(0, markOopDesc::max_age + 1) \ 792 constraint(MaxTenuringThresholdConstraintFunc,AfterErgo) \ 793 \ 794 product(uintx, InitialTenuringThreshold, 7, \ 795 "Initial value for tenuring threshold") \ 796 range(0, markOopDesc::max_age + 1) \ 797 constraint(InitialTenuringThresholdConstraintFunc,AfterErgo) \ 798 \ 799 product(uintx, TargetSurvivorRatio, 50, \ 800 "Desired percentage of survivor space used after scavenge") \ 801 range(0, 100) \ 802 \ 803 product(uintx, MarkSweepDeadRatio, 5, \ 804 "Percentage (0-100) of the old gen allowed as dead wood. " \ 805 "Serial mark sweep treats this as both the minimum and maximum " \ 806 "value. " \ 807 "CMS uses this value only if it falls back to mark sweep. " \ 808 "Par compact uses a variable scale based on the density of the " \ 809 "generation and treats this as the maximum value when the heap " \ 810 "is either completely full or completely empty. Par compact " \ 811 "also has a smaller default value; see arguments.cpp.") \ 812 range(0, 100) \ 813 \ 814 product(uint, MarkSweepAlwaysCompactCount, 4, \ 815 "How often should we fully compact the heap (ignoring the dead " \ 816 "space parameters)") \ 817 range(1, max_juint) \ 818 \ 819 develop(uintx, GCExpandToAllocateDelayMillis, 0, \ 820 "Delay between expansion and allocation (in milliseconds)") \ 821 \ 822 product(uintx, GCDrainStackTargetSize, 64, \ 823 "Number of entries we will try to leave on the stack " \ 824 "during parallel gc") \ 825 range(0, max_juint) 826 827 #endif // SHARE_GC_SHARED_GC_GLOBALS_HPP