1 /* 2 * Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. 3 * Copyright (c) 2016, 2021, Red Hat, Inc. All rights reserved. 4 * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 5 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 6 * 7 * This code is free software; you can redistribute it and/or modify it 8 * under the terms of the GNU General Public License version 2 only, as 9 * published by the Free Software Foundation. 10 * 11 * This code is distributed in the hope that it will be useful, but WITHOUT 12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 * version 2 for more details (a copy is included in the LICENSE file that 15 * accompanied this code). 16 * 17 * You should have received a copy of the GNU General Public License version 18 * 2 along with this work; if not, write to the Free Software Foundation, 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 * 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 * 25 */ 26 27 #ifndef SHARE_GC_SHENANDOAH_SHENANDOAH_GLOBALS_HPP 28 #define SHARE_GC_SHENANDOAH_SHENANDOAH_GLOBALS_HPP 29 30 #define GC_SHENANDOAH_FLAGS(develop, \ 31 develop_pd, \ 32 product, \ 33 product_pd, \ 34 range, \ 35 constraint) \ 36 \ 37 product(uintx, ShenandoahGenerationalHumongousReserve, 0, EXPERIMENTAL, \ 38 "(Generational mode only) What percent of the heap should be " \ 39 "reserved for humongous objects if possible. Old-generation " \ 40 "collections will endeavor to evacuate old-gen regions within " \ 41 "this reserved area even if these regions do not contain high " \ 42 "percentage of garbage. Setting a larger value will cause " \ 43 "more frequent old-gen collections. A smaller value will " \ 44 "increase the likelihood that humongous object allocations " \ 45 "fail, resulting in stop-the-world full GCs.") \ 46 range(0,100) \ 47 \ 48 product(double, ShenandoahMinOldGenGrowthPercent, 12.5, EXPERIMENTAL, \ 49 "(Generational mode only) If the usage within old generation " \ 50 "has grown by at least this percent of its live memory size " \ 51 "at completion of the most recent old-generation marking " \ 52 "effort, heuristics may trigger the start of a new old-gen " \ 53 "collection.") \ 54 range(0.0,100.0) \ 55 \ 56 product(uintx, ShenandoahIgnoreOldGrowthBelowPercentage,10, EXPERIMENTAL, \ 57 "(Generational mode only) If the total usage of the old " \ 58 "generation is smaller than this percent, we do not trigger " \ 59 "old gen collections even if old has grown, except when " \ 60 "ShenandoahGenerationalDoNotIgnoreGrowthAfterYoungCycles " \ 61 "consecutive cycles have been completed following the " \ 62 "preceding old-gen collection.") \ 63 range(0,100) \ 64 \ 65 product(uintx, ShenandoahDoNotIgnoreGrowthAfterYoungCycles, \ 66 50, EXPERIMENTAL, \ 67 "(Generational mode only) Even if the usage of old generation " \ 68 "is below ShenandoahIgnoreOldGrowthBelowPercentage, " \ 69 "trigger an old-generation mark if old has grown and this " \ 70 "many consecutive young-gen collections have been " \ 71 "completed following the preceding old-gen collection.") \ 72 \ 73 product(bool, ShenandoahGenerationalCensusAtEvac, false, EXPERIMENTAL, \ 74 "(Generational mode only) Object age census at evacuation, " \ 75 "rather than during marking.") \ 76 \ 77 product(bool, ShenandoahGenerationalAdaptiveTenuring, true, EXPERIMENTAL, \ 78 "(Generational mode only) Dynamically adapt tenuring age.") \ 79 \ 80 product(bool, ShenandoahGenerationalCensusIgnoreOlderCohorts, true, \ 81 EXPERIMENTAL,\ 82 "(Generational mode only) Ignore mortality rates older than the " \ 83 "oldest cohort under the tenuring age for the last cycle." ) \ 84 \ 85 product(uintx, ShenandoahGenerationalMinTenuringAge, 1, EXPERIMENTAL, \ 86 "(Generational mode only) Floor for adaptive tenuring age. " \ 87 "Setting floor and ceiling to the same value fixes the tenuring " \ 88 "age; setting both to 1 simulates a poor approximation to " \ 89 "AlwaysTenure, and setting both to 16 simulates NeverTenure.") \ 90 range(1,16) \ 91 \ 92 product(uintx, ShenandoahGenerationalMaxTenuringAge, 15, EXPERIMENTAL, \ 93 "(Generational mode only) Ceiling for adaptive tenuring age. " \ 94 "Setting floor and ceiling to the same value fixes the tenuring " \ 95 "age; setting both to 1 simulates a poor approximation to " \ 96 "AlwaysTenure, and setting both to 16 simulates NeverTenure.") \ 97 range(1,16) \ 98 \ 99 product(double, ShenandoahGenerationalTenuringMortalityRateThreshold, \ 100 0.1, EXPERIMENTAL, \ 101 "(Generational mode only) Cohort mortality rates below this " \ 102 "value will be treated as indicative of longevity, leading to " \ 103 "tenuring. A lower value delays tenuring, a higher value hastens "\ 104 "it. Used only when ShenandoahGenerationalhenAdaptiveTenuring is "\ 105 "enabled.") \ 106 range(0.001,0.999) \ 107 \ 108 product(size_t, ShenandoahGenerationalTenuringCohortPopulationThreshold, \ 109 4*K, EXPERIMENTAL, \ 110 "(Generational mode only) Cohorts whose population is lower than "\ 111 "this value in the previous census are ignored wrt tenuring " \ 112 "decisions. Effectively this makes then tenurable as soon as all "\ 113 "older cohorts are. Set this value to the largest cohort " \ 114 "population volume that you are comfortable ignoring when making "\ 115 "tenuring decisions.") \ 116 \ 117 product(size_t, ShenandoahRegionSize, 0, EXPERIMENTAL, \ 118 "Static heap region size. Set zero to enable automatic sizing.") \ 119 \ 120 product(size_t, ShenandoahTargetNumRegions, 2048, EXPERIMENTAL, \ 121 "With automatic region sizing, this is the approximate number " \ 122 "of regions that would be used, within min/max region size " \ 123 "limits.") \ 124 \ 125 product(size_t, ShenandoahMinRegionSize, 256 * K, EXPERIMENTAL, \ 126 "With automatic region sizing, the regions would be at least " \ 127 "this large.") \ 128 \ 129 product(size_t, ShenandoahMaxRegionSize, 32 * M, EXPERIMENTAL, \ 130 "With automatic region sizing, the regions would be at most " \ 131 "this large.") \ 132 \ 133 product(intx, ShenandoahHumongousThreshold, 100, EXPERIMENTAL, \ 134 "Humongous objects are allocated in separate regions. " \ 135 "This setting defines how large the object should be to be " \ 136 "deemed humongous. Value is in percents of heap region size. " \ 137 "This also caps the maximum TLAB size.") \ 138 range(1, 100) \ 139 \ 140 product(ccstr, ShenandoahGCMode, "satb", \ 141 "GC mode to use. Among other things, this defines which " \ 142 "barriers are in in use. Possible values are:" \ 143 " satb - snapshot-at-the-beginning concurrent GC (three pass mark-evac-update);" \ 144 " iu - incremental-update concurrent GC (three pass mark-evac-update);" \ 145 " passive - stop the world GC only (either degenerated or full);" \ 146 " generational - generational concurrent GC") \ 147 \ 148 product(ccstr, ShenandoahGCHeuristics, "adaptive", \ 149 "GC heuristics to use. This fine-tunes the GC mode selected, " \ 150 "by choosing when to start the GC, how much to process on each " \ 151 "cycle, and what other features to automatically enable. " \ 152 "Possible values are:" \ 153 " adaptive - adapt to maintain the given amount of free heap " \ 154 "at all times, even during the GC cycle;" \ 155 " static - trigger GC when free heap falls below the threshold;" \ 156 " aggressive - run GC continuously, try to evacuate everything;" \ 157 " compact - run GC more frequently and with deeper targets to " \ 158 "free up more memory.") \ 159 \ 160 product(uintx, ShenandoahExpeditePromotionsThreshold, 5, EXPERIMENTAL, \ 161 "When Shenandoah expects to promote at least this percentage " \ 162 "of the young generation, trigger a young collection to " \ 163 "expedite these promotions.") \ 164 range(0,100) \ 165 \ 166 product(uintx, ShenandoahExpediteMixedThreshold, 10, EXPERIMENTAL, \ 167 "When there are this many old regions waiting to be collected, " \ 168 "trigger a mixed collection immediately.") \ 169 \ 170 product(uintx, ShenandoahGarbageThreshold, 25, EXPERIMENTAL, \ 171 "How much garbage a region has to contain before it would be " \ 172 "taken for collection. This a guideline only, as GC heuristics " \ 173 "may select the region for collection even if it has little " \ 174 "garbage. This also affects how much internal fragmentation the " \ 175 "collector accepts. In percents of heap region size.") \ 176 range(0,100) \ 177 \ 178 product(uintx, ShenandoahOldGarbageThreshold, 15, EXPERIMENTAL, \ 179 "How much garbage an old region has to contain before it would " \ 180 "be taken for collection.") \ 181 range(0,100) \ 182 \ 183 product(uintx, ShenandoahIgnoreGarbageThreshold, 5, EXPERIMENTAL, \ 184 "When less than this amount of garbage (as a percentage of " \ 185 "region size) exists within a region, the region will not be " \ 186 "added to the collection set, even when the heuristic has " \ 187 "chosen to aggressively add regions with less than " \ 188 "ShenandoahGarbageThreshold amount of garbage into the " \ 189 "collection set.") \ 190 range(0,100) \ 191 \ 192 product(uintx, ShenandoahInitFreeThreshold, 70, EXPERIMENTAL, \ 193 "When less than this amount of memory is free within the" \ 194 "heap or generation, trigger a learning cycle if we are " \ 195 "in learning mode. Learning mode happens during initialization " \ 196 "and following a drastic state change, such as following a " \ 197 "degenerated or Full GC cycle. In percents of soft max " \ 198 "heap size.") \ 199 range(0,100) \ 200 \ 201 product(uintx, ShenandoahMinFreeThreshold, 10, EXPERIMENTAL, \ 202 "Percentage of free heap memory (or young generation, in " \ 203 "generational mode) below which most heuristics trigger " \ 204 "collection independent of other triggers. Provides a safety " \ 205 "margin for many heuristics. In percents of (soft) max heap " \ 206 "size.") \ 207 range(0,100) \ 208 \ 209 product(uintx, ShenandoahAllocationThreshold, 0, EXPERIMENTAL, \ 210 "How many new allocations should happen since the last GC cycle " \ 211 "before some heuristics trigger the collection. In percents of " \ 212 "(soft) max heap size. Set to zero to effectively disable.") \ 213 range(0,100) \ 214 \ 215 product(uintx, ShenandoahAllocSpikeFactor, 5, EXPERIMENTAL, \ 216 "How much of heap should some heuristics reserve for absorbing " \ 217 "the allocation spikes. Larger value wastes more memory in " \ 218 "non-emergency cases, but provides more safety in emergency " \ 219 "cases. In percents of (soft) max heap size.") \ 220 range(0,100) \ 221 \ 222 product(uintx, ShenandoahLearningSteps, 10, EXPERIMENTAL, \ 223 "The number of cycles some heuristics take to collect in order " \ 224 "to learn application and GC performance.") \ 225 range(0,100) \ 226 \ 227 product(uintx, ShenandoahImmediateThreshold, 70, EXPERIMENTAL, \ 228 "The cycle may shortcut when enough garbage can be reclaimed " \ 229 "from the immediate garbage (completely garbage regions). " \ 230 "In percents of total garbage found. Setting this threshold " \ 231 "to 100 effectively disables the shortcut.") \ 232 range(0,100) \ 233 \ 234 product(uintx, ShenandoahAdaptiveSampleFrequencyHz, 10, EXPERIMENTAL, \ 235 "The number of times per second to update the allocation rate " \ 236 "moving average.") \ 237 \ 238 product(uintx, ShenandoahAdaptiveSampleSizeSeconds, 10, EXPERIMENTAL, \ 239 "The size of the moving window over which the average " \ 240 "allocation rate is maintained. The total number of samples " \ 241 "is the product of this number and the sample frequency.") \ 242 \ 243 product(double, ShenandoahAdaptiveInitialConfidence, 1.8, EXPERIMENTAL, \ 244 "The number of standard deviations used to determine an initial " \ 245 "margin of error for the average cycle time and average " \ 246 "allocation rate. Increasing this value will cause the " \ 247 "heuristic to initiate more concurrent cycles." ) \ 248 \ 249 product(double, ShenandoahAdaptiveInitialSpikeThreshold, 1.8, EXPERIMENTAL, \ 250 "If the most recently sampled allocation rate is more than " \ 251 "this many standard deviations away from the moving average, " \ 252 "then a cycle is initiated. This value controls how sensitive " \ 253 "the heuristic is to allocation spikes. Decreasing this number " \ 254 "increases the sensitivity. ") \ 255 \ 256 product(double, ShenandoahAdaptiveDecayFactor, 0.1, EXPERIMENTAL, \ 257 "The decay factor (alpha) used for values in the weighted " \ 258 "moving average of cycle time and allocation rate. " \ 259 "Larger values give more weight to recent values.") \ 260 range(0,1.0) \ 261 \ 262 product(bool, ShenandoahAdaptiveIgnoreShortCycles, true, EXPERIMENTAL, \ 263 "The adaptive heuristic tracks a moving average of cycle " \ 264 "times in order to start a gc before memory is exhausted. " \ 265 "In some cases, Shenandoah may skip the evacuation and update " \ 266 "reference phases, resulting in a shorter cycle. These may skew " \ 267 "the average cycle time downward and may cause the heuristic " \ 268 "to wait too long to start a cycle. Disabling this will have " \ 269 "the gc run less often, which will reduce CPU utilization, but" \ 270 "increase the risk of degenerated cycles.") \ 271 \ 272 product(uintx, ShenandoahGuaranteedGCInterval, 5*60*1000, EXPERIMENTAL, \ 273 "Many heuristics would guarantee a concurrent GC cycle at " \ 274 "least with this interval. This is useful when large idle " \ 275 "intervals are present, where GC can run without stealing " \ 276 "time from active application. Time is in milliseconds. " \ 277 "Setting this to 0 disables the feature.") \ 278 \ 279 product(uintx, ShenandoahGuaranteedOldGCInterval, 10*60*1000, EXPERIMENTAL, \ 280 "Run a collection of the old generation at least this often. " \ 281 "Heuristics may trigger collections more frequently. Time is in " \ 282 "milliseconds. Setting this to 0 disables the feature.") \ 283 \ 284 product(uintx, ShenandoahGuaranteedYoungGCInterval, 5*60*1000, EXPERIMENTAL, \ 285 "Run a collection of the young generation at least this often. " \ 286 "Heuristics may trigger collections more frequently. Time is in " \ 287 "milliseconds. Setting this to 0 disables the feature.") \ 288 \ 289 product(bool, ShenandoahAlwaysClearSoftRefs, false, EXPERIMENTAL, \ 290 "Unconditionally clear soft references, instead of using any " \ 291 "other cleanup policy. This minimizes footprint at expense of" \ 292 "more soft reference churn in applications.") \ 293 \ 294 product(bool, ShenandoahUncommit, true, EXPERIMENTAL, \ 295 "Allow to uncommit memory under unused regions and metadata. " \ 296 "This optimizes footprint at expense of allocation latency in " \ 297 "regions that require committing back. Uncommits would be " \ 298 "disabled by some heuristics, or with static heap size.") \ 299 \ 300 product(uintx, ShenandoahUncommitDelay, 5*60*1000, EXPERIMENTAL, \ 301 "Uncommit memory for regions that were not used for more than " \ 302 "this time. First use after that would incur allocation stalls. " \ 303 "Actively used regions would never be uncommitted, because they " \ 304 "do not become unused longer than this delay. Time is in " \ 305 "milliseconds. Setting this delay to 0 effectively uncommits " \ 306 "regions almost immediately after they become unused.") \ 307 \ 308 product(bool, ShenandoahRegionSampling, false, EXPERIMENTAL, \ 309 "Provide heap region sampling data via jvmstat.") \ 310 \ 311 product(int, ShenandoahRegionSamplingRate, 40, EXPERIMENTAL, \ 312 "Sampling rate for heap region sampling. In milliseconds between "\ 313 "the samples. Higher values provide more fidelity, at expense " \ 314 "of more sampling overhead.") \ 315 \ 316 product(uintx, ShenandoahControlIntervalMin, 1, EXPERIMENTAL, \ 317 "The minimum sleep interval for the control loop that drives " \ 318 "the cycles. Lower values would increase GC responsiveness " \ 319 "to changing heap conditions, at the expense of higher perf " \ 320 "overhead. Time is in milliseconds.") \ 321 \ 322 product(uintx, ShenandoahControlIntervalMax, 10, EXPERIMENTAL, \ 323 "The maximum sleep interval for control loop that drives " \ 324 "the cycles. Lower values would increase GC responsiveness " \ 325 "to changing heap conditions, at the expense of higher perf " \ 326 "overhead. Time is in milliseconds.") \ 327 \ 328 product(uintx, ShenandoahControlIntervalAdjustPeriod, 1000, EXPERIMENTAL, \ 329 "The time period for one step in control loop interval " \ 330 "adjustment. Lower values make adjustments faster, at the " \ 331 "expense of higher perf overhead. Time is in milliseconds.") \ 332 \ 333 product(bool, ShenandoahVerify, false, DIAGNOSTIC, \ 334 "Enable internal verification. This would catch many GC bugs, " \ 335 "but it would also stall the collector during the verification, " \ 336 "which prolongs the pauses and might hide other bugs.") \ 337 \ 338 product(intx, ShenandoahVerifyLevel, 4, DIAGNOSTIC, \ 339 "Verification level, higher levels check more, taking more time. "\ 340 "Accepted values are:" \ 341 " 0 = basic heap checks; " \ 342 " 1 = previous level, plus basic region checks; " \ 343 " 2 = previous level, plus all roots; " \ 344 " 3 = previous level, plus all reachable objects; " \ 345 " 4 = previous level, plus all marked objects") \ 346 \ 347 product(uintx, ShenandoahEvacReserve, 5, EXPERIMENTAL, \ 348 "How much of (young-generation) heap to reserve for " \ 349 "(young-generation) evacuations. Larger values allow GC to " \ 350 "evacuate more live objects on every cycle, while leaving " \ 351 "less headroom for application to allocate while GC is " \ 352 "evacuating and updating references. This parameter is " \ 353 "consulted at the end of marking, before selecting the " \ 354 "collection set. If available memory at this time is smaller " \ 355 "than the indicated reserve, the bound on collection set size is "\ 356 "adjusted downward. The size of a generational mixed " \ 357 "evacuation collection set (comprised of both young and old " \ 358 "regions) is also bounded by this parameter. In percents of " \ 359 "total (young-generation) heap size.") \ 360 range(1,100) \ 361 \ 362 product(double, ShenandoahEvacWaste, 1.2, EXPERIMENTAL, \ 363 "How much waste evacuations produce within the reserved space. " \ 364 "Larger values make evacuations more resilient against " \ 365 "evacuation conflicts, at expense of evacuating less on each " \ 366 "GC cycle. Smaller values increase the risk of evacuation " \ 367 "failures, which will trigger stop-the-world Full GC passes.") \ 368 range(1.0,100.0) \ 369 \ 370 product(double, ShenandoahOldEvacWaste, 1.4, EXPERIMENTAL, \ 371 "How much waste evacuations produce within the reserved space. " \ 372 "Larger values make evacuations more resilient against " \ 373 "evacuation conflicts, at expense of evacuating less on each " \ 374 "GC cycle. Smaller values increase the risk of evacuation " \ 375 "failures, which will trigger stop-the-world Full GC passes.") \ 376 range(1.0,100.0) \ 377 \ 378 product(double, ShenandoahPromoEvacWaste, 1.2, EXPERIMENTAL, \ 379 "How much waste promotions produce within the reserved space. " \ 380 "Larger values make evacuations more resilient against " \ 381 "evacuation conflicts, at expense of promoting less on each " \ 382 "GC cycle. Smaller values increase the risk of evacuation " \ 383 "failures, which will trigger stop-the-world Full GC passes.") \ 384 range(1.0,100.0) \ 385 \ 386 product(uintx, ShenandoahMaxEvacLABRatio, 0, EXPERIMENTAL, \ 387 "Potentially, each running thread maintains a PLAB for " \ 388 "evacuating objects into old-gen memory and a GCLAB for " \ 389 "evacuating objects into young-gen memory. Each time a thread " \ 390 "exhausts its PLAB or GCLAB, a new local buffer is allocated. " \ 391 "By default, the new buffer is twice the size of the previous " \ 392 "buffer. The sizes are reset to the minimum at the start of " \ 393 "each GC pass. This parameter limits the growth of evacuation " \ 394 "buffer sizes to its value multiplied by the minimum buffer " \ 395 "size. A higher value allows evacuation allocations to be more " \ 396 "efficient because less synchronization is required by " \ 397 "individual threads. However, a larger value increases the " \ 398 "likelihood of evacuation failures, leading to long " \ 399 "stop-the-world pauses. This is because a large value " \ 400 "allows individual threads to consume large percentages of " \ 401 "the total evacuation budget without necessarily effectively " \ 402 "filling their local evacuation buffers with evacuated " \ 403 "objects. A value of zero means no maximum size is enforced.") \ 404 range(0, 1024) \ 405 \ 406 product(bool, ShenandoahEvacReserveOverflow, true, EXPERIMENTAL, \ 407 "Allow evacuations to overflow the reserved space. Enabling it " \ 408 "will make evacuations more resilient when evacuation " \ 409 "reserve/waste is incorrect, at the risk that application " \ 410 "runs out of memory too early.") \ 411 \ 412 product(uintx, ShenandoahOldEvacRatioPercent, 75, EXPERIMENTAL, \ 413 "The maximum proportion of evacuation from old-gen memory, " \ 414 "expressed as a percentage. The default value 75 denotes that no" \ 415 "more than 75% of the collection set evacuation workload may be " \ 416 "towards evacuation of old-gen heap regions. This limits both the"\ 417 "promotion of aged regions and the compaction of existing old " \ 418 "regions. A value of 75 denotes that the total evacuation work" \ 419 "may increase to up to four times the young gen evacuation work." \ 420 "A larger value allows quicker promotion and allows" \ 421 "a smaller number of mixed evacuations to process " \ 422 "the entire list of old-gen collection candidates at the cost " \ 423 "of an increased disruption of the normal cadence of young-gen " \ 424 "collections. A value of 100 allows a mixed evacuation to " \ 425 "focus entirely on old-gen memory, allowing no young-gen " \ 426 "regions to be collected, likely resulting in subsequent " \ 427 "allocation failures because the allocation pool is not " \ 428 "replenished. A value of 0 allows a mixed evacuation to" \ 429 "focus entirely on young-gen memory, allowing no old-gen " \ 430 "regions to be collected, likely resulting in subsequent " \ 431 "promotion failures and triggering of stop-the-world full GC " \ 432 "events.") \ 433 range(0,100) \ 434 \ 435 product(uintx, ShenandoahMinYoungPercentage, 20, EXPERIMENTAL, \ 436 "The minimum percentage of the heap to use for the young " \ 437 "generation. Heuristics will not adjust the young generation " \ 438 "to be less than this.") \ 439 range(0, 100) \ 440 \ 441 product(uintx, ShenandoahMaxYoungPercentage, 100, EXPERIMENTAL, \ 442 "The maximum percentage of the heap to use for the young " \ 443 "generation. Heuristics will not adjust the young generation " \ 444 "to be more than this.") \ 445 range(0, 100) \ 446 \ 447 product(bool, ShenandoahPacing, true, EXPERIMENTAL, \ 448 "Pace application allocations to give GC chance to start " \ 449 "and complete before allocation failure is reached.") \ 450 \ 451 product(uintx, ShenandoahPacingMaxDelay, 10, EXPERIMENTAL, \ 452 "Max delay for pacing application allocations. Larger values " \ 453 "provide more resilience against out of memory, at expense at " \ 454 "hiding the GC latencies in the allocation path. Time is in " \ 455 "milliseconds. Setting it to arbitrarily large value makes " \ 456 "GC effectively stall the threads indefinitely instead of going " \ 457 "to degenerated or Full GC.") \ 458 \ 459 product(uintx, ShenandoahPacingIdleSlack, 2, EXPERIMENTAL, \ 460 "How much of heap counted as non-taxable allocations during idle "\ 461 "phases. Larger value makes the pacing milder when collector is " \ 462 "idle, requiring less rendezvous with control thread. Lower " \ 463 "value makes the pacing control less responsive to out-of-cycle " \ 464 "allocs. In percent of total heap size.") \ 465 range(0, 100) \ 466 \ 467 product(uintx, ShenandoahPacingCycleSlack, 10, EXPERIMENTAL, \ 468 "How much of free space to take as non-taxable allocations " \ 469 "the GC cycle. Larger value makes the pacing milder at the " \ 470 "beginning of the GC cycle. Lower value makes the pacing less " \ 471 "uniform during the cycle. In percent of free space.") \ 472 range(0, 100) \ 473 \ 474 product(double, ShenandoahPacingSurcharge, 1.1, EXPERIMENTAL, \ 475 "Additional pacing tax surcharge to help unclutter the heap. " \ 476 "Larger values makes the pacing more aggressive. Lower values " \ 477 "risk GC cycles finish with less memory than were available at " \ 478 "the beginning of it.") \ 479 range(1.0, 100.0) \ 480 \ 481 product(uintx, ShenandoahCriticalFreeThreshold, 1, EXPERIMENTAL, \ 482 "How much of the heap needs to be free after recovery cycles, " \ 483 "either Degenerated or Full GC to be claimed successful. If this "\ 484 "much space is not available, next recovery step would be " \ 485 "triggered.") \ 486 range(0, 100) \ 487 \ 488 product(bool, ShenandoahDegeneratedGC, true, DIAGNOSTIC, \ 489 "Enable Degenerated GC as the graceful degradation step. " \ 490 "Disabling this option leads to degradation to Full GC instead. " \ 491 "When running in passive mode, this can be toggled to measure " \ 492 "either Degenerated GC or Full GC costs.") \ 493 \ 494 product(uintx, ShenandoahFullGCThreshold, 3, EXPERIMENTAL, \ 495 "How many back-to-back Degenerated GCs should happen before " \ 496 "going to a Full GC.") \ 497 \ 498 product(uintx, ShenandoahNoProgressThreshold, 5, EXPERIMENTAL, \ 499 "After this number of consecutive Full GCs fail to make " \ 500 "progress, Shenandoah will raise out of memory errors. Note " \ 501 "that progress is determined by ShenandoahCriticalFreeThreshold") \ 502 \ 503 product(bool, ShenandoahImplicitGCInvokesConcurrent, false, EXPERIMENTAL, \ 504 "Should internally-caused GC requests invoke concurrent cycles, " \ 505 "should they do the stop-the-world (Degenerated / Full GC)? " \ 506 "Many heuristics automatically enable this. This option is " \ 507 "similar to global ExplicitGCInvokesConcurrent.") \ 508 \ 509 product(bool, ShenandoahHumongousMoves, true, DIAGNOSTIC, \ 510 "Allow moving humongous regions. This makes GC more resistant " \ 511 "to external fragmentation that may otherwise fail other " \ 512 "humongous allocations, at the expense of higher GC copying " \ 513 "costs. Currently affects stop-the-world (Full) cycle only.") \ 514 \ 515 product(bool, ShenandoahOOMDuringEvacALot, false, DIAGNOSTIC, \ 516 "Testing: simulate OOM during evacuation.") \ 517 \ 518 product(bool, ShenandoahAllocFailureALot, false, DIAGNOSTIC, \ 519 "Testing: make lots of artificial allocation failures.") \ 520 \ 521 product(uintx, ShenandoahCoalesceChance, 0, DIAGNOSTIC, \ 522 "Testing: Abandon remaining mixed collections with this " \ 523 "likelihood. Following each mixed collection, abandon all " \ 524 "remaining mixed collection candidate regions with likelihood " \ 525 "ShenandoahCoalesceChance. Abandoning a mixed collection will " \ 526 "cause the old regions to be made parsable, rather than being " \ 527 "evacuated.") \ 528 range(0, 100) \ 529 \ 530 product(intx, ShenandoahMarkScanPrefetch, 32, EXPERIMENTAL, \ 531 "How many objects to prefetch ahead when traversing mark bitmaps."\ 532 "Set to 0 to disable prefetching.") \ 533 range(0, 256) \ 534 \ 535 product(uintx, ShenandoahMarkLoopStride, 1000, EXPERIMENTAL, \ 536 "How many items to process during one marking iteration before " \ 537 "checking for cancellation, yielding, etc. Larger values improve "\ 538 "marking performance at expense of responsiveness.") \ 539 \ 540 product(uintx, ShenandoahParallelRegionStride, 1024, EXPERIMENTAL, \ 541 "How many regions to process at once during parallel region " \ 542 "iteration. Affects heaps with lots of regions.") \ 543 \ 544 product(size_t, ShenandoahSATBBufferSize, 1 * K, EXPERIMENTAL, \ 545 "Number of entries in an SATB log buffer.") \ 546 range(1, max_uintx) \ 547 \ 548 product(uintx, ShenandoahMaxSATBBufferFlushes, 5, EXPERIMENTAL, \ 549 "How many times to maximum attempt to flush SATB buffers at the " \ 550 "end of concurrent marking.") \ 551 \ 552 product(bool, ShenandoahSATBBarrier, true, DIAGNOSTIC, \ 553 "Turn on/off SATB barriers in Shenandoah") \ 554 \ 555 product(bool, ShenandoahIUBarrier, false, DIAGNOSTIC, \ 556 "Turn on/off I-U barriers barriers in Shenandoah") \ 557 \ 558 product(bool, ShenandoahCardBarrier, false, DIAGNOSTIC, \ 559 "Turn on/off card-marking post-write barrier in Shenandoah: " \ 560 " true when ShenandoahGCMode is generational, false otherwise") \ 561 \ 562 product(bool, ShenandoahCASBarrier, true, DIAGNOSTIC, \ 563 "Turn on/off CAS barriers in Shenandoah") \ 564 \ 565 product(bool, ShenandoahCloneBarrier, true, DIAGNOSTIC, \ 566 "Turn on/off clone barriers in Shenandoah") \ 567 \ 568 product(bool, ShenandoahLoadRefBarrier, true, DIAGNOSTIC, \ 569 "Turn on/off load-reference barriers in Shenandoah") \ 570 \ 571 product(bool, ShenandoahStackWatermarkBarrier, true, DIAGNOSTIC, \ 572 "Turn on/off stack watermark barriers in Shenandoah") \ 573 \ 574 develop(bool, ShenandoahVerifyOptoBarriers, trueInDebug, \ 575 "Verify no missing barriers in C2.") \ 576 \ 577 product(uintx, ShenandoahOldCompactionReserve, 8, EXPERIMENTAL, \ 578 "During generational GC, prevent promotions from filling " \ 579 "this number of heap regions. These regions are reserved " \ 580 "for the purpose of supporting compaction of old-gen " \ 581 "memory. Otherwise, old-gen memory cannot be compacted.") \ 582 range(0, 128) \ 583 \ 584 product(bool, ShenandoahAllowOldMarkingPreemption, true, DIAGNOSTIC, \ 585 "Allow young generation collections to suspend concurrent" \ 586 " marking in the old generation.") \ 587 \ 588 product(uintx, ShenandoahAgingCyclePeriod, 1, EXPERIMENTAL, \ 589 "With generational mode, increment the age of objects and" \ 590 "regions each time this many young-gen GC cycles are completed.") \ 591 \ 592 develop(bool, ShenandoahEnableCardStats, false, \ 593 "Enable statistics collection related to clean & dirty cards") \ 594 \ 595 develop(int, ShenandoahCardStatsLogInterval, 50, \ 596 "Log cumulative card stats every so many remembered set or " \ 597 "update refs scans") \ 598 \ 599 product(uintx, ShenandoahMinimumOldMarkTimeMs, 100, EXPERIMENTAL, \ 600 "Minimum amount of time in milliseconds to run old marking " \ 601 "before a young collection is allowed to run. This is intended " \ 602 "to prevent starvation of the old collector. Setting this to " \ 603 "0 will allow back to back young collections to run during old " \ 604 "marking.") \ 605 // end of GC_SHENANDOAH_FLAGS 606 607 #endif // SHARE_GC_SHENANDOAH_SHENANDOAH_GLOBALS_HPP