24 25 #ifndef SHARE_VM_GC_G1_G1_GLOBALS_HPP 26 #define SHARE_VM_GC_G1_G1_GLOBALS_HPP 27 28 #include "runtime/globals.hpp" 29 #include <float.h> // for DBL_MAX 30 // 31 // Defines all globals flags used by the garbage-first compiler. 32 // 33 34 #define G1_FLAGS(develop, develop_pd, product, product_pd, diagnostic, experimental, notproduct, manageable, product_rw, range, constraint) \ 35 \ 36 product(uintx, G1ConfidencePercent, 50, \ 37 "Confidence level for MMU/pause predictions") \ 38 range(0, 100) \ 39 \ 40 develop(intx, G1MarkingOverheadPercent, 0, \ 41 "Overhead of concurrent marking") \ 42 range(0, 100) \ 43 \ 44 develop(intx, G1MarkingVerboseLevel, 0, \ 45 "Level (0-4) of verboseness of the marking code") \ 46 range(0, 4) \ 47 \ 48 develop(bool, G1TraceMarkStackOverflow, false, \ 49 "If true, extra debugging code for CM restart for ovflw.") \ 50 \ 51 diagnostic(bool, G1SummarizeConcMark, false, \ 52 "Summarize concurrent mark info") \ 53 \ 54 diagnostic(bool, G1SummarizeRSetStats, false, \ 55 "Summarize remembered set processing info") \ 56 \ 57 diagnostic(intx, G1SummarizeRSetStatsPeriod, 0, \ 58 "The period (in number of GCs) at which we will generate " \ 59 "update buffer processing info " \ 60 "(0 means do not periodically generate this info); " \ 61 "it also requires -XX:+G1SummarizeRSetStats") \ 62 range(0, max_intx) \ 63 \ 64 diagnostic(bool, G1TraceConcRefinement, false, \ 65 "Trace G1 concurrent refinement") \ 66 \ 67 experimental(bool, G1TraceStringSymbolTableScrubbing, false, \ 68 "Trace information string and symbol table scrubbing.") \ 69 \ 70 product(double, G1ConcMarkStepDurationMillis, 10.0, \ 71 "Target duration of individual concurrent marking steps " \ 72 "in milliseconds.") \ 73 range(1.0, DBL_MAX) \ 74 \ 75 product(intx, G1RefProcDrainInterval, 10, \ 76 "The number of discovered reference objects to process before " \ 77 "draining concurrent marking work queues.") \ 78 range(1, max_intx) \ 79 \ 80 experimental(bool, G1UseConcMarkReferenceProcessing, true, \ 81 "If true, enable reference discovery during concurrent " \ 82 "marking and reference processing at the end of remark.") \ 83 \ 84 experimental(double, G1LastPLABAverageOccupancy, 50.0, \ 85 "The expected average occupancy of the last PLAB in " \ 86 "percent.") \ 87 range(0.001, 100.0) \ 88 \ 89 product(size_t, G1SATBBufferSize, 1*K, \ 92 \ 93 develop(intx, G1SATBProcessCompletedThreshold, 20, \ 94 "Number of completed buffers that triggers log processing.") \ 95 range(0, max_jint) \ 96 \ 97 product(uintx, G1SATBBufferEnqueueingThresholdPercent, 60, \ 98 "Before enqueueing them, each mutator thread tries to do some " \ 99 "filtering on the SATB buffers it generates. If post-filtering " \ 100 "the percentage of retained entries is over this threshold " \ 101 "the buffer will be enqueued for processing. A value of 0 " \ 102 "specifies that mutator threads should not do such filtering.") \ 103 range(0, 100) \ 104 \ 105 experimental(intx, G1ExpandByPercentOfAvailable, 20, \ 106 "When expanding, % of uncommitted space to claim.") \ 107 range(0, 100) \ 108 \ 109 develop(bool, G1RSBarrierRegionFilter, true, \ 110 "If true, generate region filtering code in RS barrier") \ 111 \ 112 diagnostic(bool, G1PrintRegionLivenessInfo, false, \ 113 "Prints the liveness information for all regions in the heap " \ 114 "at the end of a marking cycle.") \ 115 \ 116 product(size_t, G1UpdateBufferSize, 256, \ 117 "Size of an update buffer") \ 118 range(1, NOT_LP64(32*M) LP64_ONLY(1*G)) \ 119 \ 120 product(intx, G1ConcRefinementYellowZone, 0, \ 121 "Number of enqueued update buffers that will " \ 122 "trigger concurrent processing. Will be selected ergonomically " \ 123 "by default.") \ 124 range(0, max_intx) \ 125 \ 126 product(intx, G1ConcRefinementRedZone, 0, \ 127 "Maximum number of enqueued update buffers before mutator " \ 128 "threads start processing new ones instead of enqueueing them. " \ 129 "Will be selected ergonomically by default. Zero will disable " \ 130 "concurrent processing.") \ 131 range(0, max_intx) \ 132 \ 133 product(intx, G1ConcRefinementGreenZone, 0, \ 134 "The number of update buffers that are left in the queue by the " \ 135 "concurrent processing threads. Will be selected ergonomically " \ 175 \ 176 develop(intx, G1RSetSparseRegionEntriesBase, 4, \ 177 "Max number of entries per region in a sparse table " \ 178 "per MB.") \ 179 range(1, max_jint/wordSize) \ 180 \ 181 product(intx, G1RSetSparseRegionEntries, 0, \ 182 "Max number of entries per region in a sparse table." \ 183 "Will be set ergonomically by default.") \ 184 range(0, max_jint/wordSize) \ 185 constraint(G1RSetSparseRegionEntriesConstraintFunc,AfterErgo) \ 186 \ 187 develop(intx, G1MaxVerifyFailures, -1, \ 188 "The maximum number of verification failures to print. " \ 189 "-1 means print all.") \ 190 range(-1, max_jint) \ 191 \ 192 develop(bool, G1ScrubRemSets, true, \ 193 "When true, do RS scrubbing after cleanup.") \ 194 \ 195 develop(bool, G1RSScrubVerbose, false, \ 196 "When true, do RS scrubbing with verbose output.") \ 197 \ 198 develop(bool, G1YoungSurvRateVerbose, false, \ 199 "print out the survival rate of young regions according to age.") \ 200 \ 201 develop(intx, G1YoungSurvRateNumRegionsSummary, 0, \ 202 "the number of regions for which we'll print a surv rate " \ 203 "summary.") \ 204 range(0, max_intx) \ 205 constraint(G1YoungSurvRateNumRegionsSummaryConstraintFunc,AfterErgo)\ 206 \ 207 product(uintx, G1ReservePercent, 10, \ 208 "It determines the minimum reserve we should have in the heap " \ 209 "to minimize the probability of promotion failure.") \ 210 range(0, 50) \ 211 \ 212 diagnostic(bool, G1PrintHeapRegions, false, \ 213 "If set G1 will print information on which regions are being " \ 214 "allocated and which are reclaimed.") \ 215 \ 216 develop(bool, G1HRRSUseSparseTable, true, \ 217 "When true, use sparse table to save space.") \ 218 \ 219 develop(bool, G1HRRSFlushLogBuffersOnVerify, false, \ 220 "Forces flushing of log buffers before verification.") \ 221 \ 222 product(size_t, G1HeapRegionSize, 0, \ 223 "Size of the G1 regions.") \ 224 range(0, 32*M) \ 225 constraint(G1HeapRegionSizeConstraintFunc,AfterMemoryInit) \ 226 \ 227 product(uintx, G1ConcRefinementThreads, 0, \ 228 "If non-0 is the number of parallel rem set update threads, " \ 229 "otherwise the value is determined ergonomically.") \ 230 range(0, (max_jint-1)/wordSize) \ 231 \ 232 develop(bool, G1VerifyCTCleanup, false, \ 233 "Verify card table cleanup.") \ 234 \ 235 product(size_t, G1RSetScanBlockSize, 64, \ 236 "Size of a work unit of cards claimed by a worker thread" \ 237 "during RSet scanning.") \ 238 range(1, max_uintx) \ 239 \ 240 develop(uintx, G1SecondaryFreeListAppendLength, 5, \ 241 "The number of regions we will add to the secondary free list " \ 242 "at every append operation") \ 243 \ 244 develop(bool, G1ConcRegionFreeingVerbose, false, \ 245 "Enables verboseness during concurrent region freeing") \ 246 \ 247 develop(bool, G1StressConcRegionFreeing, false, \ 248 "It stresses the concurrent region freeing operation") \ 249 \ 250 develop(uintx, G1StressConcRegionFreeingDelayMillis, 0, \ 251 "Artificial delay during concurrent region freeing") \ 252 \ 253 develop(uintx, G1DummyRegionsPerGC, 0, \ 254 "The number of dummy regions G1 will allocate at the end of " \ 255 "each evacuation pause in order to artificially fill up the " \ 256 "heap and stress the marking implementation.") \ 257 \ 258 develop(bool, G1ExitOnExpansionFailure, false, \ 259 "Raise a fatal VM exit out of memory failure in the event " \ 260 " that heap expansion fails due to running out of swap.") \ 261 \ 262 develop(uintx, G1ConcMarkForceOverflow, 0, \ 263 "The number of times we'll force an overflow during " \ 264 "concurrent marking") \ 265 \ 266 experimental(uintx, G1MaxNewSizePercent, 60, \ 279 "Threshold for regions to be considered for inclusion in the " \ 280 "collection set of mixed GCs. " \ 281 "Regions with live bytes exceeding this will not be collected.") \ 282 range(0, 100) \ 283 \ 284 product(uintx, G1HeapWastePercent, 5, \ 285 "Amount of space, expressed as a percentage of the heap size, " \ 286 "that G1 is willing not to collect to avoid expensive GCs.") \ 287 range(0, 100) \ 288 \ 289 product(uintx, G1MixedGCCountTarget, 8, \ 290 "The target number of mixed GCs after a marking cycle.") \ 291 \ 292 experimental(bool, G1EagerReclaimHumongousObjects, true, \ 293 "Try to reclaim dead large objects at every young GC.") \ 294 \ 295 experimental(bool, G1EagerReclaimHumongousObjectsWithStaleRefs, true, \ 296 "Try to reclaim dead large objects that have a few stale " \ 297 "references at every young GC.") \ 298 \ 299 experimental(bool, G1TraceEagerReclaimHumongousObjects, false, \ 300 "Print some information about large object liveness " \ 301 "at every young GC.") \ 302 \ 303 experimental(uintx, G1OldCSetRegionThresholdPercent, 10, \ 304 "An upper bound for the number of old CSet regions expressed " \ 305 "as a percentage of the heap size.") \ 306 range(0, 100) \ 307 \ 308 experimental(ccstr, G1LogLevel, NULL, \ 309 "Log level for G1 logging: fine, finer, finest") \ 310 \ 311 notproduct(bool, G1EvacuationFailureALot, false, \ 312 "Force use of evacuation failure handling during certain " \ 313 "evacuation pauses") \ 314 \ 315 develop(uintx, G1EvacuationFailureALotCount, 1000, \ 316 "Number of successful evacuations between evacuation failures " \ 317 "occurring at object copying") \ 318 \ 319 develop(uintx, G1EvacuationFailureALotInterval, 5, \ 320 "Total collections between forced triggering of evacuation " \ 321 "failures") \ 322 \ 323 develop(bool, G1EvacuationFailureALotDuringConcMark, true, \ 324 "Force use of evacuation failure handling during evacuation " \ 325 "pauses when marking is in progress") \ 326 \ 327 develop(bool, G1EvacuationFailureALotDuringInitialMark, true, \ 328 "Force use of evacuation failure handling during initial mark " \ 329 "evacuation pauses") \ | 24 25 #ifndef SHARE_VM_GC_G1_G1_GLOBALS_HPP 26 #define SHARE_VM_GC_G1_G1_GLOBALS_HPP 27 28 #include "runtime/globals.hpp" 29 #include <float.h> // for DBL_MAX 30 // 31 // Defines all globals flags used by the garbage-first compiler. 32 // 33 34 #define G1_FLAGS(develop, develop_pd, product, product_pd, diagnostic, experimental, notproduct, manageable, product_rw, range, constraint) \ 35 \ 36 product(uintx, G1ConfidencePercent, 50, \ 37 "Confidence level for MMU/pause predictions") \ 38 range(0, 100) \ 39 \ 40 develop(intx, G1MarkingOverheadPercent, 0, \ 41 "Overhead of concurrent marking") \ 42 range(0, 100) \ 43 \ 44 diagnostic(intx, G1SummarizeRSetStatsPeriod, 0, \ 45 "The period (in number of GCs) at which we will generate " \ 46 "update buffer processing info " \ 47 "(0 means do not periodically generate this info); " \ 48 "it also requires that logging is enabled on the trace" \ 49 "level for gc,remset") \ 50 range(0, max_intx) \ 51 \ 52 diagnostic(bool, G1TraceConcRefinement, false, \ 53 "Trace G1 concurrent refinement") \ 54 \ 55 product(double, G1ConcMarkStepDurationMillis, 10.0, \ 56 "Target duration of individual concurrent marking steps " \ 57 "in milliseconds.") \ 58 range(1.0, DBL_MAX) \ 59 \ 60 product(intx, G1RefProcDrainInterval, 10, \ 61 "The number of discovered reference objects to process before " \ 62 "draining concurrent marking work queues.") \ 63 range(1, max_intx) \ 64 \ 65 experimental(bool, G1UseConcMarkReferenceProcessing, true, \ 66 "If true, enable reference discovery during concurrent " \ 67 "marking and reference processing at the end of remark.") \ 68 \ 69 experimental(double, G1LastPLABAverageOccupancy, 50.0, \ 70 "The expected average occupancy of the last PLAB in " \ 71 "percent.") \ 72 range(0.001, 100.0) \ 73 \ 74 product(size_t, G1SATBBufferSize, 1*K, \ 77 \ 78 develop(intx, G1SATBProcessCompletedThreshold, 20, \ 79 "Number of completed buffers that triggers log processing.") \ 80 range(0, max_jint) \ 81 \ 82 product(uintx, G1SATBBufferEnqueueingThresholdPercent, 60, \ 83 "Before enqueueing them, each mutator thread tries to do some " \ 84 "filtering on the SATB buffers it generates. If post-filtering " \ 85 "the percentage of retained entries is over this threshold " \ 86 "the buffer will be enqueued for processing. A value of 0 " \ 87 "specifies that mutator threads should not do such filtering.") \ 88 range(0, 100) \ 89 \ 90 experimental(intx, G1ExpandByPercentOfAvailable, 20, \ 91 "When expanding, % of uncommitted space to claim.") \ 92 range(0, 100) \ 93 \ 94 develop(bool, G1RSBarrierRegionFilter, true, \ 95 "If true, generate region filtering code in RS barrier") \ 96 \ 97 product(size_t, G1UpdateBufferSize, 256, \ 98 "Size of an update buffer") \ 99 range(1, NOT_LP64(32*M) LP64_ONLY(1*G)) \ 100 \ 101 product(intx, G1ConcRefinementYellowZone, 0, \ 102 "Number of enqueued update buffers that will " \ 103 "trigger concurrent processing. Will be selected ergonomically " \ 104 "by default.") \ 105 range(0, max_intx) \ 106 \ 107 product(intx, G1ConcRefinementRedZone, 0, \ 108 "Maximum number of enqueued update buffers before mutator " \ 109 "threads start processing new ones instead of enqueueing them. " \ 110 "Will be selected ergonomically by default. Zero will disable " \ 111 "concurrent processing.") \ 112 range(0, max_intx) \ 113 \ 114 product(intx, G1ConcRefinementGreenZone, 0, \ 115 "The number of update buffers that are left in the queue by the " \ 116 "concurrent processing threads. Will be selected ergonomically " \ 156 \ 157 develop(intx, G1RSetSparseRegionEntriesBase, 4, \ 158 "Max number of entries per region in a sparse table " \ 159 "per MB.") \ 160 range(1, max_jint/wordSize) \ 161 \ 162 product(intx, G1RSetSparseRegionEntries, 0, \ 163 "Max number of entries per region in a sparse table." \ 164 "Will be set ergonomically by default.") \ 165 range(0, max_jint/wordSize) \ 166 constraint(G1RSetSparseRegionEntriesConstraintFunc,AfterErgo) \ 167 \ 168 develop(intx, G1MaxVerifyFailures, -1, \ 169 "The maximum number of verification failures to print. " \ 170 "-1 means print all.") \ 171 range(-1, max_jint) \ 172 \ 173 develop(bool, G1ScrubRemSets, true, \ 174 "When true, do RS scrubbing after cleanup.") \ 175 \ 176 develop(intx, G1YoungSurvRateNumRegionsSummary, 0, \ 177 "the number of regions for which we'll print a surv rate " \ 178 "summary.") \ 179 range(0, max_intx) \ 180 constraint(G1YoungSurvRateNumRegionsSummaryConstraintFunc,AfterErgo)\ 181 \ 182 product(uintx, G1ReservePercent, 10, \ 183 "It determines the minimum reserve we should have in the heap " \ 184 "to minimize the probability of promotion failure.") \ 185 range(0, 50) \ 186 \ 187 develop(bool, G1HRRSUseSparseTable, true, \ 188 "When true, use sparse table to save space.") \ 189 \ 190 develop(bool, G1HRRSFlushLogBuffersOnVerify, false, \ 191 "Forces flushing of log buffers before verification.") \ 192 \ 193 product(size_t, G1HeapRegionSize, 0, \ 194 "Size of the G1 regions.") \ 195 range(0, 32*M) \ 196 constraint(G1HeapRegionSizeConstraintFunc,AfterMemoryInit) \ 197 \ 198 product(uintx, G1ConcRefinementThreads, 0, \ 199 "If non-0 is the number of parallel rem set update threads, " \ 200 "otherwise the value is determined ergonomically.") \ 201 range(0, (max_jint-1)/wordSize) \ 202 \ 203 develop(bool, G1VerifyCTCleanup, false, \ 204 "Verify card table cleanup.") \ 205 \ 206 product(size_t, G1RSetScanBlockSize, 64, \ 207 "Size of a work unit of cards claimed by a worker thread" \ 208 "during RSet scanning.") \ 209 range(1, max_uintx) \ 210 \ 211 develop(uintx, G1SecondaryFreeListAppendLength, 5, \ 212 "The number of regions we will add to the secondary free list " \ 213 "at every append operation") \ 214 \ 215 develop(bool, G1StressConcRegionFreeing, false, \ 216 "It stresses the concurrent region freeing operation") \ 217 \ 218 develop(uintx, G1StressConcRegionFreeingDelayMillis, 0, \ 219 "Artificial delay during concurrent region freeing") \ 220 \ 221 develop(uintx, G1DummyRegionsPerGC, 0, \ 222 "The number of dummy regions G1 will allocate at the end of " \ 223 "each evacuation pause in order to artificially fill up the " \ 224 "heap and stress the marking implementation.") \ 225 \ 226 develop(bool, G1ExitOnExpansionFailure, false, \ 227 "Raise a fatal VM exit out of memory failure in the event " \ 228 " that heap expansion fails due to running out of swap.") \ 229 \ 230 develop(uintx, G1ConcMarkForceOverflow, 0, \ 231 "The number of times we'll force an overflow during " \ 232 "concurrent marking") \ 233 \ 234 experimental(uintx, G1MaxNewSizePercent, 60, \ 247 "Threshold for regions to be considered for inclusion in the " \ 248 "collection set of mixed GCs. " \ 249 "Regions with live bytes exceeding this will not be collected.") \ 250 range(0, 100) \ 251 \ 252 product(uintx, G1HeapWastePercent, 5, \ 253 "Amount of space, expressed as a percentage of the heap size, " \ 254 "that G1 is willing not to collect to avoid expensive GCs.") \ 255 range(0, 100) \ 256 \ 257 product(uintx, G1MixedGCCountTarget, 8, \ 258 "The target number of mixed GCs after a marking cycle.") \ 259 \ 260 experimental(bool, G1EagerReclaimHumongousObjects, true, \ 261 "Try to reclaim dead large objects at every young GC.") \ 262 \ 263 experimental(bool, G1EagerReclaimHumongousObjectsWithStaleRefs, true, \ 264 "Try to reclaim dead large objects that have a few stale " \ 265 "references at every young GC.") \ 266 \ 267 experimental(uintx, G1OldCSetRegionThresholdPercent, 10, \ 268 "An upper bound for the number of old CSet regions expressed " \ 269 "as a percentage of the heap size.") \ 270 range(0, 100) \ 271 \ 272 notproduct(bool, G1EvacuationFailureALot, false, \ 273 "Force use of evacuation failure handling during certain " \ 274 "evacuation pauses") \ 275 \ 276 develop(uintx, G1EvacuationFailureALotCount, 1000, \ 277 "Number of successful evacuations between evacuation failures " \ 278 "occurring at object copying") \ 279 \ 280 develop(uintx, G1EvacuationFailureALotInterval, 5, \ 281 "Total collections between forced triggering of evacuation " \ 282 "failures") \ 283 \ 284 develop(bool, G1EvacuationFailureALotDuringConcMark, true, \ 285 "Force use of evacuation failure handling during evacuation " \ 286 "pauses when marking is in progress") \ 287 \ 288 develop(bool, G1EvacuationFailureALotDuringInitialMark, true, \ 289 "Force use of evacuation failure handling during initial mark " \ 290 "evacuation pauses") \ |