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