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