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 * 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 *
24 */
25
26 #ifndef SHARE_GC_SHENANDOAH_SHENANDOAH_GLOBALS_HPP
27 #define SHARE_GC_SHENANDOAH_SHENANDOAH_GLOBALS_HPP
28
29 #define GC_SHENANDOAH_FLAGS(develop, \
30 develop_pd, \
31 product, \
32 product_pd, \
33 range, \
34 constraint) \
35 \
36 product(size_t, ShenandoahRegionSize, 0, EXPERIMENTAL, \
37 "Static heap region size. Set zero to enable automatic sizing.") \
38 \
39 product(size_t, ShenandoahTargetNumRegions, 2048, EXPERIMENTAL, \
40 "With automatic region sizing, this is the approximate number " \
41 "of regions that would be used, within min/max region size " \
42 "limits.") \
43 \
44 product(size_t, ShenandoahMinRegionSize, 256 * K, EXPERIMENTAL, \
45 "With automatic region sizing, the regions would be at least " \
46 "this large.") \
47 \
48 product(size_t, ShenandoahMaxRegionSize, 32 * M, EXPERIMENTAL, \
49 "With automatic region sizing, the regions would be at most " \
50 "this large.") \
51 \
52 product(ccstr, ShenandoahGCMode, "satb", \
53 "GC mode to use. Among other things, this defines which " \
54 "barriers are in in use. Possible values are:" \
55 " satb - snapshot-at-the-beginning concurrent GC (three pass mark-evac-update);" \
56 " iu - incremental-update concurrent GC (three pass mark-evac-update);" \
57 " passive - stop the world GC only (either degenerated or full)") \
58 \
59 product(ccstr, ShenandoahGCHeuristics, "adaptive", \
60 "GC heuristics to use. This fine-tunes the GC mode selected, " \
61 "by choosing when to start the GC, how much to process on each " \
62 "cycle, and what other features to automatically enable. " \
63 "Possible values are:" \
64 " adaptive - adapt to maintain the given amount of free heap " \
65 "at all times, even during the GC cycle;" \
66 " static - trigger GC when free heap falls below the threshold;" \
67 " aggressive - run GC continuously, try to evacuate everything;" \
68 " compact - run GC more frequently and with deeper targets to " \
69 "free up more memory.") \
70 \
71 product(uintx, ShenandoahGarbageThreshold, 25, EXPERIMENTAL, \
72 "How much garbage a region has to contain before it would be " \
73 "taken for collection. This a guideline only, as GC heuristics " \
74 "may select the region for collection even if it has little " \
75 "garbage. This also affects how much internal fragmentation the " \
76 "collector accepts. In percents of heap region size.") \
77 range(0,100) \
78 \
79 product(uintx, ShenandoahInitFreeThreshold, 70, EXPERIMENTAL, \
80 "How much heap should be free before some heuristics trigger the "\
81 "initial (learning) cycles. Affects cycle frequency on startup " \
82 "and after drastic state changes, e.g. after degenerated/full " \
83 "GC cycles. In percents of (soft) max heap size.") \
84 range(0,100) \
85 \
86 product(uintx, ShenandoahMinFreeThreshold, 10, EXPERIMENTAL, \
87 "How much heap should be free before most heuristics trigger the "\
88 "collection, even without other triggers. Provides the safety " \
89 "margin for many heuristics. In percents of (soft) max heap size.")\
90 range(0,100) \
91 \
92 product(uintx, ShenandoahAllocationThreshold, 0, EXPERIMENTAL, \
93 "How many new allocations should happen since the last GC cycle " \
94 "before some heuristics trigger the collection. In percents of " \
95 "(soft) max heap size. Set to zero to effectively disable.") \
96 range(0,100) \
97 \
98 product(uintx, ShenandoahAllocSpikeFactor, 5, EXPERIMENTAL, \
99 "How much of heap should some heuristics reserve for absorbing " \
100 "the allocation spikes. Larger value wastes more memory in " \
101 "non-emergency cases, but provides more safety in emergency " \
102 "cases. In percents of (soft) max heap size.") \
103 range(0,100) \
104 \
105 product(uintx, ShenandoahLearningSteps, 5, EXPERIMENTAL, \
106 "The number of cycles some heuristics take to collect in order " \
107 "to learn application and GC performance.") \
108 range(0,100) \
109 \
132 product(double, ShenandoahAdaptiveInitialSpikeThreshold, 1.8, EXPERIMENTAL, \
133 "If the most recently sampled allocation rate is more than " \
134 "this many standard deviations away from the moving average, " \
135 "then a cycle is initiated. This value controls how sensitive " \
136 "the heuristic is to allocation spikes. Decreasing this number " \
137 "increases the sensitivity. ") \
138 \
139 product(double, ShenandoahAdaptiveDecayFactor, 0.5, EXPERIMENTAL, \
140 "The decay factor (alpha) used for values in the weighted " \
141 "moving average of cycle time and allocation rate. " \
142 "Larger values give more weight to recent values.") \
143 range(0,1.0) \
144 \
145 product(uintx, ShenandoahGuaranteedGCInterval, 5*60*1000, EXPERIMENTAL, \
146 "Many heuristics would guarantee a concurrent GC cycle at " \
147 "least with this interval. This is useful when large idle " \
148 "intervals are present, where GC can run without stealing " \
149 "time from active application. Time is in milliseconds. " \
150 "Setting this to 0 disables the feature.") \
151 \
152 product(bool, ShenandoahAlwaysClearSoftRefs, false, EXPERIMENTAL, \
153 "Unconditionally clear soft references, instead of using any " \
154 "other cleanup policy. This minimizes footprint at expense of" \
155 "more soft reference churn in applications.") \
156 \
157 product(bool, ShenandoahUncommit, true, EXPERIMENTAL, \
158 "Allow to uncommit memory under unused regions and metadata. " \
159 "This optimizes footprint at expense of allocation latency in " \
160 "regions that require committing back. Uncommits would be " \
161 "disabled by some heuristics, or with static heap size.") \
162 \
163 product(uintx, ShenandoahUncommitDelay, 5*60*1000, EXPERIMENTAL, \
164 "Uncommit memory for regions that were not used for more than " \
165 "this time. First use after that would incur allocation stalls. " \
166 "Actively used regions would never be uncommitted, because they " \
167 "do not become unused longer than this delay. Time is in " \
168 "milliseconds. Setting this delay to 0 effectively uncommits " \
169 "regions almost immediately after they become unused.") \
170 \
171 product(bool, ShenandoahRegionSampling, false, EXPERIMENTAL, \
191 product(uintx, ShenandoahControlIntervalAdjustPeriod, 1000, EXPERIMENTAL, \
192 "The time period for one step in control loop interval " \
193 "adjustment. Lower values make adjustments faster, at the " \
194 "expense of higher perf overhead. Time is in milliseconds.") \
195 \
196 product(bool, ShenandoahVerify, false, DIAGNOSTIC, \
197 "Enable internal verification. This would catch many GC bugs, " \
198 "but it would also stall the collector during the verification, " \
199 "which prolongs the pauses and might hide other bugs.") \
200 \
201 product(intx, ShenandoahVerifyLevel, 4, DIAGNOSTIC, \
202 "Verification level, higher levels check more, taking more time. "\
203 "Accepted values are:" \
204 " 0 = basic heap checks; " \
205 " 1 = previous level, plus basic region checks; " \
206 " 2 = previous level, plus all roots; " \
207 " 3 = previous level, plus all reachable objects; " \
208 " 4 = previous level, plus all marked objects") \
209 \
210 product(uintx, ShenandoahEvacReserve, 5, EXPERIMENTAL, \
211 "How much of heap to reserve for evacuations. Larger values make "\
212 "GC evacuate more live objects on every cycle, while leaving " \
213 "less headroom for application to allocate in. In percents of " \
214 "total heap size.") \
215 range(1,100) \
216 \
217 product(double, ShenandoahEvacWaste, 1.2, EXPERIMENTAL, \
218 "How much waste evacuations produce within the reserved space. " \
219 "Larger values make evacuations more resilient against " \
220 "evacuation conflicts, at expense of evacuating less on each " \
221 "GC cycle.") \
222 range(1.0,100.0) \
223 \
224 product(bool, ShenandoahEvacReserveOverflow, true, EXPERIMENTAL, \
225 "Allow evacuations to overflow the reserved space. Enabling it " \
226 "will make evacuations more resilient when evacuation " \
227 "reserve/waste is incorrect, at the risk that application " \
228 "runs out of memory too early.") \
229 \
230 product(bool, ShenandoahPacing, true, EXPERIMENTAL, \
231 "Pace application allocations to give GC chance to start " \
232 "and complete before allocation failure is reached.") \
233 \
234 product(uintx, ShenandoahPacingMaxDelay, 10, EXPERIMENTAL, \
235 "Max delay for pacing application allocations. Larger values " \
236 "provide more resilience against out of memory, at expense at " \
237 "hiding the GC latencies in the allocation path. Time is in " \
238 "milliseconds. Setting it to arbitrarily large value makes " \
239 "GC effectively stall the threads indefinitely instead of going " \
240 "to degenerated or Full GC.") \
241 \
242 product(uintx, ShenandoahPacingIdleSlack, 2, EXPERIMENTAL, \
243 "How much of heap counted as non-taxable allocations during idle "\
244 "phases. Larger value makes the pacing milder when collector is " \
245 "idle, requiring less rendezvous with control thread. Lower " \
246 "value makes the pacing control less responsive to out-of-cycle " \
247 "allocs. In percent of total heap size.") \
248 range(0, 100) \
249 \
284 "that progress is determined by ShenandoahCriticalFreeThreshold") \
285 \
286 product(bool, ShenandoahImplicitGCInvokesConcurrent, false, EXPERIMENTAL, \
287 "Should internally-caused GC requests invoke concurrent cycles, " \
288 "should they do the stop-the-world (Degenerated / Full GC)? " \
289 "Many heuristics automatically enable this. This option is " \
290 "similar to global ExplicitGCInvokesConcurrent.") \
291 \
292 product(bool, ShenandoahHumongousMoves, true, DIAGNOSTIC, \
293 "Allow moving humongous regions. This makes GC more resistant " \
294 "to external fragmentation that may otherwise fail other " \
295 "humongous allocations, at the expense of higher GC copying " \
296 "costs. Currently affects stop-the-world (Full) cycle only.") \
297 \
298 product(bool, ShenandoahOOMDuringEvacALot, false, DIAGNOSTIC, \
299 "Testing: simulate OOM during evacuation.") \
300 \
301 product(bool, ShenandoahAllocFailureALot, false, DIAGNOSTIC, \
302 "Testing: make lots of artificial allocation failures.") \
303 \
304 product(intx, ShenandoahMarkScanPrefetch, 32, EXPERIMENTAL, \
305 "How many objects to prefetch ahead when traversing mark bitmaps."\
306 "Set to 0 to disable prefetching.") \
307 range(0, 256) \
308 \
309 product(uintx, ShenandoahMarkLoopStride, 1000, EXPERIMENTAL, \
310 "How many items to process during one marking iteration before " \
311 "checking for cancellation, yielding, etc. Larger values improve "\
312 "marking performance at expense of responsiveness.") \
313 \
314 product(uintx, ShenandoahParallelRegionStride, 0, EXPERIMENTAL, \
315 "How many regions to process at once during parallel region " \
316 "iteration. Affects heaps with lots of regions. " \
317 "Set to 0 to let Shenandoah to decide the best value.") \
318 \
319 product(size_t, ShenandoahSATBBufferSize, 1 * K, EXPERIMENTAL, \
320 "Number of entries in an SATB log buffer.") \
321 range(1, max_uintx) \
322 \
323 product(uintx, ShenandoahMaxSATBBufferFlushes, 5, EXPERIMENTAL, \
324 "How many times to maximum attempt to flush SATB buffers at the " \
325 "end of concurrent marking.") \
326 \
327 product(bool, ShenandoahSATBBarrier, true, DIAGNOSTIC, \
328 "Turn on/off SATB barriers in Shenandoah") \
329 \
330 product(bool, ShenandoahCASBarrier, true, DIAGNOSTIC, \
331 "Turn on/off CAS barriers in Shenandoah") \
332 \
333 product(bool, ShenandoahCloneBarrier, true, DIAGNOSTIC, \
334 "Turn on/off clone barriers in Shenandoah") \
335 \
336 product(bool, ShenandoahLoadRefBarrier, true, DIAGNOSTIC, \
337 "Turn on/off load-reference barriers in Shenandoah") \
338 \
339 product(bool, ShenandoahStackWatermarkBarrier, true, DIAGNOSTIC, \
340 "Turn on/off stack watermark barriers in Shenandoah") \
341 \
342 develop(bool, ShenandoahVerifyOptoBarriers, trueInDebug, \
343 "Verify no missing barriers in C2.") \
344 \
345
346 // end of GC_SHENANDOAH_FLAGS
347
348 #endif // SHARE_GC_SHENANDOAH_SHENANDOAH_GLOBALS_HPP
|
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(ccstr, ShenandoahGCMode, "satb", \
134 "GC mode to use. Among other things, this defines which " \
135 "barriers are in in use. Possible values are:" \
136 " satb - snapshot-at-the-beginning concurrent GC (three pass mark-evac-update);" \
137 " iu - incremental-update concurrent GC (three pass mark-evac-update);" \
138 " passive - stop the world GC only (either degenerated or full);" \
139 " generational - generational concurrent GC") \
140 \
141 product(ccstr, ShenandoahGCHeuristics, "adaptive", \
142 "GC heuristics to use. This fine-tunes the GC mode selected, " \
143 "by choosing when to start the GC, how much to process on each " \
144 "cycle, and what other features to automatically enable. " \
145 "Possible values are:" \
146 " adaptive - adapt to maintain the given amount of free heap " \
147 "at all times, even during the GC cycle;" \
148 " static - trigger GC when free heap falls below the threshold;" \
149 " aggressive - run GC continuously, try to evacuate everything;" \
150 " compact - run GC more frequently and with deeper targets to " \
151 "free up more memory.") \
152 \
153 product(uintx, ShenandoahExpeditePromotionsThreshold, 5, EXPERIMENTAL, \
154 "When Shenandoah expects to promote at least this percentage " \
155 "of the young generation, trigger a young collection to " \
156 "expedite these promotions.") \
157 range(0,100) \
158 \
159 product(uintx, ShenandoahExpediteMixedThreshold, 10, EXPERIMENTAL, \
160 "When there are this many old regions waiting to be collected, " \
161 "trigger a mixed collection immediately.") \
162 \
163 product(uintx, ShenandoahGarbageThreshold, 25, EXPERIMENTAL, \
164 "How much garbage a region has to contain before it would be " \
165 "taken for collection. This a guideline only, as GC heuristics " \
166 "may select the region for collection even if it has little " \
167 "garbage. This also affects how much internal fragmentation the " \
168 "collector accepts. In percents of heap region size.") \
169 range(0,100) \
170 \
171 product(uintx, ShenandoahOldGarbageThreshold, 15, EXPERIMENTAL, \
172 "How much garbage an old region has to contain before it would " \
173 "be taken for collection.") \
174 range(0,100) \
175 \
176 product(uintx, ShenandoahIgnoreGarbageThreshold, 5, EXPERIMENTAL, \
177 "When less than this amount of garbage (as a percentage of " \
178 "region size) exists within a region, the region will not be " \
179 "added to the collection set, even when the heuristic has " \
180 "chosen to aggressively add regions with less than " \
181 "ShenandoahGarbageThreshold amount of garbage into the " \
182 "collection set.") \
183 range(0,100) \
184 \
185 product(uintx, ShenandoahInitFreeThreshold, 70, EXPERIMENTAL, \
186 "When less than this amount of memory is free within the" \
187 "heap or generation, trigger a learning cycle if we are " \
188 "in learning mode. Learning mode happens during initialization " \
189 "and following a drastic state change, such as following a " \
190 "degenerated or Full GC cycle. In percents of soft max " \
191 "heap size.") \
192 range(0,100) \
193 \
194 product(uintx, ShenandoahMinFreeThreshold, 10, EXPERIMENTAL, \
195 "Percentage of free heap memory (or young generation, in " \
196 "generational mode) below which most heuristics trigger " \
197 "collection independent of other triggers. Provides a safety " \
198 "margin for many heuristics. In percents of (soft) max heap " \
199 "size.") \
200 range(0,100) \
201 \
202 product(uintx, ShenandoahAllocationThreshold, 0, EXPERIMENTAL, \
203 "How many new allocations should happen since the last GC cycle " \
204 "before some heuristics trigger the collection. In percents of " \
205 "(soft) max heap size. Set to zero to effectively disable.") \
206 range(0,100) \
207 \
208 product(uintx, ShenandoahAllocSpikeFactor, 5, EXPERIMENTAL, \
209 "How much of heap should some heuristics reserve for absorbing " \
210 "the allocation spikes. Larger value wastes more memory in " \
211 "non-emergency cases, but provides more safety in emergency " \
212 "cases. In percents of (soft) max heap size.") \
213 range(0,100) \
214 \
215 product(uintx, ShenandoahLearningSteps, 5, EXPERIMENTAL, \
216 "The number of cycles some heuristics take to collect in order " \
217 "to learn application and GC performance.") \
218 range(0,100) \
219 \
242 product(double, ShenandoahAdaptiveInitialSpikeThreshold, 1.8, EXPERIMENTAL, \
243 "If the most recently sampled allocation rate is more than " \
244 "this many standard deviations away from the moving average, " \
245 "then a cycle is initiated. This value controls how sensitive " \
246 "the heuristic is to allocation spikes. Decreasing this number " \
247 "increases the sensitivity. ") \
248 \
249 product(double, ShenandoahAdaptiveDecayFactor, 0.5, EXPERIMENTAL, \
250 "The decay factor (alpha) used for values in the weighted " \
251 "moving average of cycle time and allocation rate. " \
252 "Larger values give more weight to recent values.") \
253 range(0,1.0) \
254 \
255 product(uintx, ShenandoahGuaranteedGCInterval, 5*60*1000, EXPERIMENTAL, \
256 "Many heuristics would guarantee a concurrent GC cycle at " \
257 "least with this interval. This is useful when large idle " \
258 "intervals are present, where GC can run without stealing " \
259 "time from active application. Time is in milliseconds. " \
260 "Setting this to 0 disables the feature.") \
261 \
262 product(uintx, ShenandoahGuaranteedOldGCInterval, 10*60*1000, EXPERIMENTAL, \
263 "Run a collection of the old generation at least this often. " \
264 "Heuristics may trigger collections more frequently. Time is in " \
265 "milliseconds. Setting this to 0 disables the feature.") \
266 \
267 product(uintx, ShenandoahGuaranteedYoungGCInterval, 5*60*1000, EXPERIMENTAL, \
268 "Run a collection of the young generation at least this often. " \
269 "Heuristics may trigger collections more frequently. Time is in " \
270 "milliseconds. Setting this to 0 disables the feature.") \
271 \
272 product(bool, ShenandoahAlwaysClearSoftRefs, false, EXPERIMENTAL, \
273 "Unconditionally clear soft references, instead of using any " \
274 "other cleanup policy. This minimizes footprint at expense of" \
275 "more soft reference churn in applications.") \
276 \
277 product(bool, ShenandoahUncommit, true, EXPERIMENTAL, \
278 "Allow to uncommit memory under unused regions and metadata. " \
279 "This optimizes footprint at expense of allocation latency in " \
280 "regions that require committing back. Uncommits would be " \
281 "disabled by some heuristics, or with static heap size.") \
282 \
283 product(uintx, ShenandoahUncommitDelay, 5*60*1000, EXPERIMENTAL, \
284 "Uncommit memory for regions that were not used for more than " \
285 "this time. First use after that would incur allocation stalls. " \
286 "Actively used regions would never be uncommitted, because they " \
287 "do not become unused longer than this delay. Time is in " \
288 "milliseconds. Setting this delay to 0 effectively uncommits " \
289 "regions almost immediately after they become unused.") \
290 \
291 product(bool, ShenandoahRegionSampling, false, EXPERIMENTAL, \
311 product(uintx, ShenandoahControlIntervalAdjustPeriod, 1000, EXPERIMENTAL, \
312 "The time period for one step in control loop interval " \
313 "adjustment. Lower values make adjustments faster, at the " \
314 "expense of higher perf overhead. Time is in milliseconds.") \
315 \
316 product(bool, ShenandoahVerify, false, DIAGNOSTIC, \
317 "Enable internal verification. This would catch many GC bugs, " \
318 "but it would also stall the collector during the verification, " \
319 "which prolongs the pauses and might hide other bugs.") \
320 \
321 product(intx, ShenandoahVerifyLevel, 4, DIAGNOSTIC, \
322 "Verification level, higher levels check more, taking more time. "\
323 "Accepted values are:" \
324 " 0 = basic heap checks; " \
325 " 1 = previous level, plus basic region checks; " \
326 " 2 = previous level, plus all roots; " \
327 " 3 = previous level, plus all reachable objects; " \
328 " 4 = previous level, plus all marked objects") \
329 \
330 product(uintx, ShenandoahEvacReserve, 5, EXPERIMENTAL, \
331 "How much of (young-generation) heap to reserve for " \
332 "(young-generation) evacuations. Larger values allow GC to " \
333 "evacuate more live objects on every cycle, while leaving " \
334 "less headroom for application to allocate while GC is " \
335 "evacuating and updating references. This parameter is " \
336 "consulted at the end of marking, before selecting the " \
337 "collection set. If available memory at this time is smaller " \
338 "than the indicated reserve, the bound on collection set size is "\
339 "adjusted downward. The size of a generational mixed " \
340 "evacuation collection set (comprised of both young and old " \
341 "regions) is also bounded by this parameter. In percents of " \
342 "total (young-generation) heap size.") \
343 range(1,100) \
344 \
345 product(double, ShenandoahEvacWaste, 1.2, EXPERIMENTAL, \
346 "How much waste evacuations produce within the reserved space. " \
347 "Larger values make evacuations more resilient against " \
348 "evacuation conflicts, at expense of evacuating less on each " \
349 "GC cycle. Smaller values increase the risk of evacuation " \
350 "failures, which will trigger stop-the-world Full GC passes.") \
351 range(1.0,100.0) \
352 \
353 product(double, ShenandoahOldEvacWaste, 1.4, EXPERIMENTAL, \
354 "How much waste evacuations produce within the reserved space. " \
355 "Larger values make evacuations more resilient against " \
356 "evacuation conflicts, at expense of evacuating less on each " \
357 "GC cycle. Smaller values increase the risk of evacuation " \
358 "failures, which will trigger stop-the-world Full GC passes.") \
359 range(1.0,100.0) \
360 \
361 product(double, ShenandoahPromoEvacWaste, 1.2, EXPERIMENTAL, \
362 "How much waste promotions produce within the reserved space. " \
363 "Larger values make evacuations more resilient against " \
364 "evacuation conflicts, at expense of promoting less on each " \
365 "GC cycle. Smaller values increase the risk of evacuation " \
366 "failures, which will trigger stop-the-world Full GC passes.") \
367 range(1.0,100.0) \
368 \
369 product(bool, ShenandoahEvacReserveOverflow, true, EXPERIMENTAL, \
370 "Allow evacuations to overflow the reserved space. Enabling it " \
371 "will make evacuations more resilient when evacuation " \
372 "reserve/waste is incorrect, at the risk that application " \
373 "runs out of memory too early.") \
374 \
375 product(uintx, ShenandoahOldEvacRatioPercent, 75, EXPERIMENTAL, \
376 "The maximum proportion of evacuation from old-gen memory, " \
377 "expressed as a percentage. The default value 75 denotes that no" \
378 "more than 75% of the collection set evacuation workload may be " \
379 "towards evacuation of old-gen heap regions. This limits both the"\
380 "promotion of aged regions and the compaction of existing old " \
381 "regions. A value of 75 denotes that the total evacuation work" \
382 "may increase to up to four times the young gen evacuation work." \
383 "A larger value allows quicker promotion and allows" \
384 "a smaller number of mixed evacuations to process " \
385 "the entire list of old-gen collection candidates at the cost " \
386 "of an increased disruption of the normal cadence of young-gen " \
387 "collections. A value of 100 allows a mixed evacuation to " \
388 "focus entirely on old-gen memory, allowing no young-gen " \
389 "regions to be collected, likely resulting in subsequent " \
390 "allocation failures because the allocation pool is not " \
391 "replenished. A value of 0 allows a mixed evacuation to" \
392 "focus entirely on young-gen memory, allowing no old-gen " \
393 "regions to be collected, likely resulting in subsequent " \
394 "promotion failures and triggering of stop-the-world full GC " \
395 "events.") \
396 range(0,100) \
397 \
398 product(uintx, ShenandoahMinYoungPercentage, 20, EXPERIMENTAL, \
399 "The minimum percentage of the heap to use for the young " \
400 "generation. Heuristics will not adjust the young generation " \
401 "to be less than this.") \
402 range(0, 100) \
403 \
404 product(uintx, ShenandoahMaxYoungPercentage, 100, EXPERIMENTAL, \
405 "The maximum percentage of the heap to use for the young " \
406 "generation. Heuristics will not adjust the young generation " \
407 "to be more than this.") \
408 range(0, 100) \
409 \
410 product(bool, ShenandoahPacing, true, EXPERIMENTAL, \
411 "Pace application allocations to give GC chance to start " \
412 "and complete before allocation failure is reached.") \
413 \
414 product(uintx, ShenandoahPacingMaxDelay, 10, EXPERIMENTAL, \
415 "Max delay for pacing application allocations. Larger values " \
416 "provide more resilience against out of memory, at expense at " \
417 "hiding the GC latencies in the allocation path. Time is in " \
418 "milliseconds. Setting it to arbitrarily large value makes " \
419 "GC effectively stall the threads indefinitely instead of going " \
420 "to degenerated or Full GC.") \
421 \
422 product(uintx, ShenandoahPacingIdleSlack, 2, EXPERIMENTAL, \
423 "How much of heap counted as non-taxable allocations during idle "\
424 "phases. Larger value makes the pacing milder when collector is " \
425 "idle, requiring less rendezvous with control thread. Lower " \
426 "value makes the pacing control less responsive to out-of-cycle " \
427 "allocs. In percent of total heap size.") \
428 range(0, 100) \
429 \
464 "that progress is determined by ShenandoahCriticalFreeThreshold") \
465 \
466 product(bool, ShenandoahImplicitGCInvokesConcurrent, false, EXPERIMENTAL, \
467 "Should internally-caused GC requests invoke concurrent cycles, " \
468 "should they do the stop-the-world (Degenerated / Full GC)? " \
469 "Many heuristics automatically enable this. This option is " \
470 "similar to global ExplicitGCInvokesConcurrent.") \
471 \
472 product(bool, ShenandoahHumongousMoves, true, DIAGNOSTIC, \
473 "Allow moving humongous regions. This makes GC more resistant " \
474 "to external fragmentation that may otherwise fail other " \
475 "humongous allocations, at the expense of higher GC copying " \
476 "costs. Currently affects stop-the-world (Full) cycle only.") \
477 \
478 product(bool, ShenandoahOOMDuringEvacALot, false, DIAGNOSTIC, \
479 "Testing: simulate OOM during evacuation.") \
480 \
481 product(bool, ShenandoahAllocFailureALot, false, DIAGNOSTIC, \
482 "Testing: make lots of artificial allocation failures.") \
483 \
484 product(uintx, ShenandoahCoalesceChance, 0, DIAGNOSTIC, \
485 "Testing: Abandon remaining mixed collections with this " \
486 "likelihood. Following each mixed collection, abandon all " \
487 "remaining mixed collection candidate regions with likelihood " \
488 "ShenandoahCoalesceChance. Abandoning a mixed collection will " \
489 "cause the old regions to be made parsable, rather than being " \
490 "evacuated.") \
491 range(0, 100) \
492 \
493 product(intx, ShenandoahMarkScanPrefetch, 32, EXPERIMENTAL, \
494 "How many objects to prefetch ahead when traversing mark bitmaps."\
495 "Set to 0 to disable prefetching.") \
496 range(0, 256) \
497 \
498 product(uintx, ShenandoahMarkLoopStride, 1000, EXPERIMENTAL, \
499 "How many items to process during one marking iteration before " \
500 "checking for cancellation, yielding, etc. Larger values improve "\
501 "marking performance at expense of responsiveness.") \
502 \
503 product(uintx, ShenandoahParallelRegionStride, 0, EXPERIMENTAL, \
504 "How many regions to process at once during parallel region " \
505 "iteration. Affects heaps with lots of regions. " \
506 "Set to 0 to let Shenandoah to decide the best value.") \
507 \
508 product(size_t, ShenandoahSATBBufferSize, 1 * K, EXPERIMENTAL, \
509 "Number of entries in an SATB log buffer.") \
510 range(1, max_uintx) \
511 \
512 product(uintx, ShenandoahMaxSATBBufferFlushes, 5, EXPERIMENTAL, \
513 "How many times to maximum attempt to flush SATB buffers at the " \
514 "end of concurrent marking.") \
515 \
516 product(bool, ShenandoahSATBBarrier, true, DIAGNOSTIC, \
517 "Turn on/off SATB barriers in Shenandoah") \
518 \
519 product(bool, ShenandoahCardBarrier, false, DIAGNOSTIC, \
520 "Turn on/off card-marking post-write barrier in Shenandoah: " \
521 " true when ShenandoahGCMode is generational, false otherwise") \
522 \
523 product(bool, ShenandoahCASBarrier, true, DIAGNOSTIC, \
524 "Turn on/off CAS barriers in Shenandoah") \
525 \
526 product(bool, ShenandoahCloneBarrier, true, DIAGNOSTIC, \
527 "Turn on/off clone barriers in Shenandoah") \
528 \
529 product(bool, ShenandoahLoadRefBarrier, true, DIAGNOSTIC, \
530 "Turn on/off load-reference barriers in Shenandoah") \
531 \
532 product(bool, ShenandoahStackWatermarkBarrier, true, DIAGNOSTIC, \
533 "Turn on/off stack watermark barriers in Shenandoah") \
534 \
535 develop(bool, ShenandoahVerifyOptoBarriers, trueInDebug, \
536 "Verify no missing barriers in C2.") \
537 \
538 product(uintx, ShenandoahOldCompactionReserve, 8, EXPERIMENTAL, \
539 "During generational GC, prevent promotions from filling " \
540 "this number of heap regions. These regions are reserved " \
541 "for the purpose of supporting compaction of old-gen " \
542 "memory. Otherwise, old-gen memory cannot be compacted.") \
543 range(0, 128) \
544 \
545 product(bool, ShenandoahAllowOldMarkingPreemption, true, DIAGNOSTIC, \
546 "Allow young generation collections to suspend concurrent" \
547 " marking in the old generation.") \
548 \
549 product(uintx, ShenandoahAgingCyclePeriod, 1, EXPERIMENTAL, \
550 "With generational mode, increment the age of objects and" \
551 "regions each time this many young-gen GC cycles are completed.") \
552 \
553 develop(bool, ShenandoahEnableCardStats, false, \
554 "Enable statistics collection related to clean & dirty cards") \
555 \
556 develop(int, ShenandoahCardStatsLogInterval, 50, \
557 "Log cumulative card stats every so many remembered set or " \
558 "update refs scans") \
559 \
560 product(uintx, ShenandoahMinimumOldTimeMs, 100, EXPERIMENTAL, \
561 "Minimum amount of time in milliseconds to run old collections " \
562 "before a young collection is allowed to run. This is intended " \
563 "to prevent starvation of the old collector. Setting this to " \
564 "0 will allow back to back young collections to run during old " \
565 "collections.") \
566 // end of GC_SHENANDOAH_FLAGS
567
568 #endif // SHARE_GC_SHENANDOAH_SHENANDOAH_GLOBALS_HPP
|