1 /* 2 * Copyright (c) 2016, Red Hat, Inc. and/or its affiliates. 3 * 4 * This code is free software; you can redistribute it and/or modify it 5 * under the terms of the GNU General Public License version 2 only, as 6 * published by the Free Software Foundation. 7 * 8 * This code is distributed in the hope that it will be useful, but WITHOUT 9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 11 * version 2 for more details (a copy is included in the LICENSE file that 12 * accompanied this code). 13 * 14 * You should have received a copy of the GNU General Public License version 15 * 2 along with this work; if not, write to the Free Software Foundation, 16 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 17 * 18 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 19 * or visit www.oracle.com if you need additional information or have any 20 * questions. 21 * 22 */ 23 24 #ifndef SHARE_VM_GC_SHENANDOAH_SHENANDOAH_GLOBALS_HPP 25 #define SHARE_VM_GC_SHENANDOAH_SHENANDOAH_GLOBALS_HPP 26 27 #include "runtime/globals.hpp" 28 29 #define SHENANDOAH_FLAGS(develop, \ 30 develop_pd, \ 31 product, \ 32 product_pd, \ 33 diagnostic, \ 34 experimental, \ 35 notproduct, \ 36 manageable, \ 37 product_rw, \ 38 range, \ 39 constraint, \ 40 writeable) \ 41 \ 42 product(bool, UseShenandoahGC, false, \ 43 "Use the Shenandoah garbage collector") \ 44 \ 45 product(bool, ShenandoahPrintGCDetails, false, \ 46 "Print GC pause summary on termination.") \ 47 \ 48 product(bool, ShenandoahOptimizeFinals, true, \ 49 "Optimize barriers on final and stable fields/arrays") \ 50 \ 51 product(uintx, ShenandoahHeapRegionSize, 0, \ 52 "Size of the Shenandoah regions.") \ 53 \ 54 develop(bool, ShenandoahDumpHeapBeforeConcurrentMark, false, \ 55 "Dump the ShenanodahHeap Before Each ConcurrentMark") \ 56 \ 57 develop(bool, ShenandoahDumpHeapAfterConcurrentMark, false, \ 58 "Dump the ShenanodahHeap After Each Concurrent Mark") \ 59 \ 60 product(bool, ShenandoahTraceHumongous, false, \ 61 "Trace Shenandoah humongous objects") \ 62 \ 63 develop(bool, ShenandoahTraceAllocations, false, \ 64 "Trace Shenandoah Allocations") \ 65 \ 66 develop(bool, ShenandoahTraceBrooksPointers, false, \ 67 "Trace Brooks Pointer updates") \ 68 \ 69 develop(bool, ShenandoahTraceEvacuations, false, \ 70 "Trace Shenandoah Evacuations") \ 71 \ 72 develop(bool, ShenandoahVerifyWritesToFromSpace, false, \ 73 "Use Memory Protection to signal illegal writes to from space") \ 74 \ 75 develop(bool, ShenandoahVerifyReadsToFromSpace, false, \ 76 "Use Memory Protection to signal illegal reads to from space") \ 77 \ 78 develop(bool, ShenandoahTraceConcurrentMarking, false, \ 79 "Trace Concurrent Marking") \ 80 \ 81 develop(bool, ShenandoahTraceUpdates, false, \ 82 "Trace Shenandoah Updates") \ 83 \ 84 develop(bool, ShenandoahTraceTLabs, false, \ 85 "Trace TLabs in Shenandoah Heap") \ 86 \ 87 develop(bool, ShenandoahTraceWeakReferences, false, \ 88 "Trace Weak Reference Processing in Shenandoah Heap") \ 89 \ 90 product(bool, ShenandoahGCVerbose, false, \ 91 "Verbose information about the Shenandoah garbage collector") \ 92 \ 93 product(bool, ShenandoahLogConfig, false, \ 94 "Log information about Shenandoah's configuration settings") \ 95 \ 96 develop(bool, ShenandoahVerify, false, \ 97 "Verify the Shenandoah garbage collector") \ 98 \ 99 product(bool, ShenandoahWriteBarrier, true, \ 100 "Turn on/off write barriers in Shenandoah") \ 101 \ 102 product(bool, ShenandoahReadBarrier, true, \ 103 "Turn on/off read barriers in Shenandoah") \ 104 \ 105 product(ccstr, ShenandoahGCHeuristics, "dynamic", \ 106 "The heuristics to use in Shenandoah GC; possible values: " \ 107 "statusquo, aggressive, halfway, lazy, dynamic") \ 108 \ 109 product(uintx, ShenandoahGarbageThreshold, 60, \ 110 "Sets the percentage of garbage a region need to contain before " \ 111 "it can be marked for collection. Applies to " \ 112 "Shenandoah GC dynamic Heuristic mode only (ignored otherwise)") \ 113 \ 114 product(uintx, ShenandoahFreeThreshold, 25, \ 115 "Set the percentage of heap free in relation to the total " \ 116 "capacity before a region can enter the concurrent marking " \ 117 "phase. Applies to Shenandoah GC dynamic Heuristic mode only " \ 118 "(ignored otherwise)") \ 119 \ 120 product(uintx, ShenandoahInitialFreeThreshold, 50, \ 121 "Set the percentage of heap free in relation to the total " \ 122 "capacity before a region can enter the concurrent marking " \ 123 "phase. Applies to Shenandoah GC dynamic Heuristic mode only " \ 124 "(ignored otherwise)") \ 125 \ 126 product(uintx, ShenandoahAllocationThreshold, 0, \ 127 "Set the number of bytes allocated since last GC cycle before" \ 128 "a region can enter the concurrent marking " \ 129 "phase. Applies to Shenandoah GC dynamic Heuristic mode only " \ 130 "(ignored otherwise)") \ 131 \ 132 product(uintx, ShenandoahTargetHeapOccupancy, 80, \ 133 "Sets the target maximum percentage occupance of the heap we" \ 134 "would like to maintain." \ 135 "Shenandoah GC newadaptive Heuristic mode only.") \ 136 \ 137 product(uintx, ShenandoahAllocReserveRegions, 10, \ 138 "How many regions should be kept as allocation reserve, before " \ 139 "Shenandoah attempts to grow the heap") \ 140 \ 141 product(uintx, ShenandoahRefProcFrequency, 5, \ 142 "How often should (weak, soft, etc) references be processed" \ 143 "References get processed at every Nth GC cycle." \ 144 "Set to 0 to disable reference processing.") \ 145 \ 146 product(uintx, ShenandoahUnloadClassesFrequency, 5, \ 147 "How often should classes get unloaded." \ 148 "Class unloading is performed at every Nth GC cycle." \ 149 "Set to 0 to disable concurrent class unloading.") \ 150 \ 151 product(bool, ShenandoahWarnings, false, \ 152 "Print Shenandoah related warnings. Useful for Shenandoah devs.") \ 153 \ 154 product(bool, ShenandoahPrintCollectionSet, false, \ 155 "Print the collection set before each GC phase") \ 156 \ 157 develop(bool, VerifyStrictOopOperations, false, \ 158 "Verify that == and != are not used on oops. Only in fastdebug") \ 159 \ 160 develop(bool, ShenandoahVerifyOptoBarriers, false, \ 161 "Verify no missing barriers in c2") \ 162 \ 163 experimental(bool, ShenandoahParallelizeRoots, false, \ 164 "Be more aggressive about parallelizing root processing") \ 165 \ 166 experimental(bool, ShenandoahConcurrentCodeRoots, false, \ 167 "Scan code roots concurrently, instead of during a pause") \ 168 \ 169 product(bool, ShenandoahNoBarriersForConst, true, \ 170 "Constant oops don't need barriers") \ 171 \ 172 product(bool, ShenandoahDontIncreaseWBFreq, true, \ 173 "Common 2 WriteBarriers or WriteBarrier and a ReadBarrier only " \ 174 "if the resulting WriteBarrier isn't executed more frequently") \ 175 \ 176 177 178 SHENANDOAH_FLAGS(DECLARE_DEVELOPER_FLAG, \ 179 DECLARE_PD_DEVELOPER_FLAG, \ 180 DECLARE_PRODUCT_FLAG, \ 181 DECLARE_PD_PRODUCT_FLAG, \ 182 DECLARE_DIAGNOSTIC_FLAG, \ 183 DECLARE_EXPERIMENTAL_FLAG, \ 184 DECLARE_NOTPRODUCT_FLAG, \ 185 DECLARE_MANAGEABLE_FLAG, \ 186 DECLARE_PRODUCT_RW_FLAG, \ 187 IGNORE_RANGE, \ 188 IGNORE_CONSTRAINT, \ 189 IGNORE_WRITEABLE) 190 191 #endif // SHARE_VM_GC_SHENANDOAH_SHENANDOAH_GLOBALS_HPP