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