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