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