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