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 develop(bool, ShenandoahTraceJNICritical, false, \ 61 "Trace Shenandoah stalls for JNI critical regions") \ 62 \ 63 product(bool, ShenandoahTraceHumongous, false, \ 64 "Trace Shenandoah humongous objects") \ 65 \ 66 develop(bool, ShenandoahTraceAllocations, false, \ 67 "Trace Shenandoah Allocations") \ 68 \ 69 develop(bool, ShenandoahTraceBrooksPointers, false, \ 70 "Trace Brooks Pointer updates") \ 71 \ 72 develop(bool, ShenandoahTraceEvacuations, false, \ 73 "Trace Shenandoah Evacuations") \ 74 \ 75 develop(bool, ShenandoahVerifyWritesToFromSpace, false, \ 76 "Use Memory Protection to signal illegal writes to from space") \ 77 \ 78 develop(bool, ShenandoahVerifyReadsToFromSpace, false, \ 79 "Use Memory Protection to signal illegal reads to from space") \ 80 \ 81 develop(bool, ShenandoahTraceConcurrentMarking, false, \ 82 "Trace Concurrent Marking") \ 83 \ 84 develop(bool, ShenandoahTraceUpdates, false, \ 85 "Trace Shenandoah Updates") \ 86 \ 87 develop(bool, ShenandoahTraceTLabs, false, \ 88 "Trace TLabs in Shenandoah Heap") \ 89 \ 90 develop(bool, ShenandoahTraceWeakReferences, false, \ 91 "Trace Weak Reference Processing in Shenandoah Heap") \ 92 \ 93 product(bool, ShenandoahGCVerbose, false, \ 94 "Verbose information about the Shenandoah garbage collector") \ 95 \ 96 product(bool, ShenandoahLogConfig, false, \ 97 "Log information about Shenandoah's configuration settings") \ 98 \ 99 develop(bool, ShenandoahVerify, false, \ 100 "Verify the Shenandoah garbage collector") \ 101 \ 102 product(bool, ShenandoahWriteBarrier, true, \ 103 "Turn on/off write barriers in Shenandoah") \ 104 \ 105 product(bool, ShenandoahReadBarrier, true, \ 106 "Turn on/off read barriers in Shenandoah") \ 107 \ 108 product(ccstr, ShenandoahGCHeuristics, "dynamic", \ 109 "The heuristics to use in Shenandoah GC; possible values: " \ 110 "statusquo, aggressive, halfway, lazy, dynamic") \ 111 \ 112 product(uintx, ShenandoahGarbageThreshold, 60, \ 113 "Sets the percentage of garbage a region need to contain before " \ 114 "it can be marked for collection. Applies to " \ 115 "Shenandoah GC dynamic Heuristic mode only (ignored otherwise)") \ 116 \ 117 product(uintx, ShenandoahFreeThreshold, 25, \ 118 "Set the percentage of heap free in relation to the total " \ 119 "capacity before a region can enter the concurrent marking " \ 120 "phase. Applies to Shenandoah GC dynamic Heuristic mode only " \ 121 "(ignored otherwise)") \ 122 \ 123 product(uintx, ShenandoahInitialFreeThreshold, 50, \ 124 "Set the percentage of heap free in relation to the total " \ 125 "capacity before a region can enter the concurrent marking " \ 126 "phase. Applies to Shenandoah GC dynamic Heuristic mode only " \ 127 "(ignored otherwise)") \ 128 \ 129 product(uintx, ShenandoahAllocationThreshold, 0, \ 130 "Set the number of bytes allocated since last GC cycle before" \ 131 "a region can enter the concurrent marking " \ 132 "phase. Applies to Shenandoah GC dynamic Heuristic mode only " \ 133 "(ignored otherwise)") \ 134 \ 135 product(uintx, ShenandoahTargetHeapOccupancy, 80, \ 136 "Sets the target maximum percentage occupance of the heap we" \ 137 "would like to maintain." \ 138 "Shenandoah GC newadaptive Heuristic mode only.") \ 139 \ 140 product(uintx, ShenandoahAllocReserveRegions, 10, \ 141 "How many regions should be kept as allocation reserve, before " \ 142 "Shenandoah attempts to grow the heap") \ 143 \ 144 product(uintx, ShenandoahRefProcFrequency, 5, \ 145 "How often should (weak, soft, etc) references be processed" \ 146 "References get processed at every Nth GC cycle." \ 147 "Set to 0 to disable reference processing.") \ 148 \ 149 product(uintx, ShenandoahUnloadClassesFrequency, 5, \ 150 "How often should classes get unloaded." \ 151 "Class unloading is performed at every Nth GC cycle." \ 152 "Set to 0 to disable concurrent class unloading.") \ 153 \ 154 product(bool, ShenandoahWarnings, false, \ 155 "Print Shenandoah related warnings. Useful for Shenandoah devs.") \ 156 \ 157 product(bool, ShenandoahPrintCollectionSet, false, \ 158 "Print the collection set before each GC phase") \ 159 \ 160 develop(bool, VerifyStrictOopOperations, false, \ 161 "Verify that == and != are not used on oops. Only in fastdebug") \ 162 \ 163 develop(bool, ShenandoahVerifyOptoBarriers, false, \ 164 "Verify no missing barriers in c2") \ 165 \ 166 experimental(bool, ShenandoahParallelizeRoots, false, \ 167 "Be more aggressive about parallelizing root processing") \ 168 \ 169 experimental(bool, ShenandoahConcurrentCodeRoots, false, \ 170 "Scan code roots concurrently, instead of during a pause") \ 171 \ 172 product(bool, ShenandoahNoBarriersForConst, true, \ 173 "Constant oops don't need barriers") \ 174 \ 175 product(bool, ShenandoahDontIncreaseWBFreq, true, \ 176 "Common 2 WriteBarriers or WriteBarrier and a ReadBarrier only " \ 177 "if the resulting WriteBarrier isn't executed more frequently") \ 178 \ 179 180 181 SHENANDOAH_FLAGS(DECLARE_DEVELOPER_FLAG, \ 182 DECLARE_PD_DEVELOPER_FLAG, \ 183 DECLARE_PRODUCT_FLAG, \ 184 DECLARE_PD_PRODUCT_FLAG, \ 185 DECLARE_DIAGNOSTIC_FLAG, \ 186 DECLARE_EXPERIMENTAL_FLAG, \ 187 DECLARE_NOTPRODUCT_FLAG, \ 188 DECLARE_MANAGEABLE_FLAG, \ 189 DECLARE_PRODUCT_RW_FLAG, \ 190 IGNORE_RANGE, \ 191 IGNORE_CONSTRAINT, \ 192 IGNORE_WRITEABLE) 193 194 #endif // SHARE_VM_GC_SHENANDOAH_SHENANDOAH_GLOBALS_HPP