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