author | pliden |
Mon, 14 May 2018 15:42:59 +0200 | |
changeset 50102 | 454fa295105c |
parent 47216 | 71c04702a3d5 |
child 53244 | 9807daeb47c4 |
permissions | -rw-r--r-- |
1 | 1 |
/* |
38273
2634194d7555
8073500: Prevent certain commercial flags from being changed at runtime
gziemski
parents:
37268
diff
changeset
|
2 |
* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. |
1 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
7 |
* published by the Free Software Foundation. |
|
8 |
* |
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
13 |
* accompanied this code). |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License version |
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
18 |
* |
|
5547
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
5353
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
5353
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
5353
diff
changeset
|
21 |
* questions. |
1 | 22 |
* |
23 |
*/ |
|
24 |
||
7397 | 25 |
#ifndef SHARE_VM_C1_C1_GLOBALS_HPP |
26 |
#define SHARE_VM_C1_C1_GLOBALS_HPP |
|
27 |
||
28 |
#include "runtime/globals.hpp" |
|
40010 | 29 |
#include "utilities/macros.hpp" |
30 |
||
31 |
#include CPU_HEADER(c1_globals) |
|
32 |
#include OS_HEADER(c1_globals) |
|
7397 | 33 |
|
1 | 34 |
// |
35 |
// Defines all global flags used by the client compiler. |
|
36 |
// |
|
38273
2634194d7555
8073500: Prevent certain commercial flags from being changed at runtime
gziemski
parents:
37268
diff
changeset
|
37 |
#define C1_FLAGS(develop, \ |
2634194d7555
8073500: Prevent certain commercial flags from being changed at runtime
gziemski
parents:
37268
diff
changeset
|
38 |
develop_pd, \ |
2634194d7555
8073500: Prevent certain commercial flags from being changed at runtime
gziemski
parents:
37268
diff
changeset
|
39 |
product, \ |
2634194d7555
8073500: Prevent certain commercial flags from being changed at runtime
gziemski
parents:
37268
diff
changeset
|
40 |
product_pd, \ |
2634194d7555
8073500: Prevent certain commercial flags from being changed at runtime
gziemski
parents:
37268
diff
changeset
|
41 |
diagnostic, \ |
39117 | 42 |
diagnostic_pd, \ |
38273
2634194d7555
8073500: Prevent certain commercial flags from being changed at runtime
gziemski
parents:
37268
diff
changeset
|
43 |
notproduct, \ |
2634194d7555
8073500: Prevent certain commercial flags from being changed at runtime
gziemski
parents:
37268
diff
changeset
|
44 |
range, \ |
2634194d7555
8073500: Prevent certain commercial flags from being changed at runtime
gziemski
parents:
37268
diff
changeset
|
45 |
constraint, \ |
2634194d7555
8073500: Prevent certain commercial flags from being changed at runtime
gziemski
parents:
37268
diff
changeset
|
46 |
writeable) \ |
1 | 47 |
\ |
48 |
/* Printing */ \ |
|
49 |
notproduct(bool, PrintC1Statistics, false, \ |
|
50 |
"Print Compiler1 statistics" ) \ |
|
51 |
\ |
|
52 |
notproduct(bool, PrintInitialBlockList, false, \ |
|
53 |
"Print block list of BlockListBuilder") \ |
|
54 |
\ |
|
55 |
notproduct(bool, PrintCFG, false, \ |
|
56 |
"Print control flow graph after each change") \ |
|
57 |
\ |
|
58 |
notproduct(bool, PrintCFG0, false, \ |
|
59 |
"Print control flow graph after construction") \ |
|
60 |
\ |
|
61 |
notproduct(bool, PrintCFG1, false, \ |
|
62 |
"Print control flow graph after optimizations") \ |
|
63 |
\ |
|
64 |
notproduct(bool, PrintCFG2, false, \ |
|
65 |
"Print control flow graph before code generation") \ |
|
66 |
\ |
|
67 |
notproduct(bool, PrintIRDuringConstruction, false, \ |
|
68 |
"Print IR as it's being constructed (helpful for debugging frontend)")\ |
|
69 |
\ |
|
6453 | 70 |
notproduct(bool, PrintPhiFunctions, false, \ |
1 | 71 |
"Print phi functions when they are created and simplified") \ |
72 |
\ |
|
73 |
notproduct(bool, PrintIR, false, \ |
|
74 |
"Print full intermediate representation after each change") \ |
|
75 |
\ |
|
76 |
notproduct(bool, PrintIR0, false, \ |
|
77 |
"Print full intermediate representation after construction") \ |
|
78 |
\ |
|
79 |
notproduct(bool, PrintIR1, false, \ |
|
80 |
"Print full intermediate representation after optimizations") \ |
|
81 |
\ |
|
82 |
notproduct(bool, PrintIR2, false, \ |
|
83 |
"Print full intermediate representation before code generation") \ |
|
84 |
\ |
|
85 |
notproduct(bool, PrintSimpleStubs, false, \ |
|
86 |
"Print SimpleStubs") \ |
|
87 |
\ |
|
88 |
/* C1 optimizations */ \ |
|
89 |
\ |
|
90 |
develop(bool, UseC1Optimizations, true, \ |
|
91 |
"Turn on C1 optimizations") \ |
|
92 |
\ |
|
93 |
develop(bool, SelectivePhiFunctions, true, \ |
|
94 |
"create phi functions at loop headers only when necessary") \ |
|
95 |
\ |
|
7100 | 96 |
develop(bool, OptimizeIfOps, true, \ |
97 |
"Optimize multiple IfOps") \ |
|
98 |
\ |
|
1 | 99 |
develop(bool, DoCEE, true, \ |
100 |
"Do Conditional Expression Elimination to simplify CFG") \ |
|
101 |
\ |
|
102 |
develop(bool, PrintCEE, false, \ |
|
103 |
"Print Conditional Expression Elimination") \ |
|
104 |
\ |
|
105 |
develop(bool, UseLocalValueNumbering, true, \ |
|
106 |
"Use Local Value Numbering (embedded in GraphBuilder)") \ |
|
107 |
\ |
|
108 |
develop(bool, UseGlobalValueNumbering, true, \ |
|
109 |
"Use Global Value Numbering (separate phase)") \ |
|
110 |
\ |
|
16611 | 111 |
product(bool, UseLoopInvariantCodeMotion, true, \ |
112 |
"Simple loop invariant code motion for short loops during GVN") \ |
|
113 |
\ |
|
114 |
develop(bool, TracePredicateFailedTraps, false, \ |
|
115 |
"trace runtime traps caused by predicate failure") \ |
|
116 |
\ |
|
117 |
develop(bool, StressLoopInvariantCodeMotion, false, \ |
|
118 |
"stress loop invariant code motion") \ |
|
119 |
\ |
|
120 |
develop(bool, TraceRangeCheckElimination, false, \ |
|
121 |
"Trace Range Check Elimination") \ |
|
122 |
\ |
|
123 |
develop(bool, AssertRangeCheckElimination, false, \ |
|
124 |
"Assert Range Check Elimination") \ |
|
125 |
\ |
|
126 |
develop(bool, StressRangeCheckElimination, false, \ |
|
127 |
"stress Range Check Elimination") \ |
|
128 |
\ |
|
1 | 129 |
develop(bool, PrintValueNumbering, false, \ |
130 |
"Print Value Numbering") \ |
|
131 |
\ |
|
132 |
product(intx, ValueMapInitialSize, 11, \ |
|
133 |
"Initial size of a value map") \ |
|
31371
311143309e73
8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
29180
diff
changeset
|
134 |
range(1, NOT_LP64(1*K) LP64_ONLY(32*K)) \ |
1 | 135 |
\ |
136 |
product(intx, ValueMapMaxLoopSize, 8, \ |
|
137 |
"maximum size of a loop optimized by global value numbering") \ |
|
33163
9e128b399e48
8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents:
31371
diff
changeset
|
138 |
range(0, 128) \ |
1 | 139 |
\ |
140 |
develop(bool, EliminateBlocks, true, \ |
|
141 |
"Eliminate unneccessary basic blocks") \ |
|
142 |
\ |
|
143 |
develop(bool, PrintBlockElimination, false, \ |
|
144 |
"Print basic block elimination") \ |
|
145 |
\ |
|
146 |
develop(bool, EliminateNullChecks, true, \ |
|
147 |
"Eliminate unneccessary null checks") \ |
|
148 |
\ |
|
149 |
develop(bool, PrintNullCheckElimination, false, \ |
|
150 |
"Print null check elimination") \ |
|
151 |
\ |
|
152 |
develop(bool, EliminateFieldAccess, true, \ |
|
153 |
"Optimize field loads and stores") \ |
|
154 |
\ |
|
155 |
develop(bool, InlineMethodsWithExceptionHandlers, true, \ |
|
156 |
"Inline methods containing exception handlers " \ |
|
157 |
"(NOTE: does not work with current backend)") \ |
|
158 |
\ |
|
15200
73bac1831823
8005639: Move InlineSynchronizedMethods flag from develop to product
vladidan
parents:
13728
diff
changeset
|
159 |
product(bool, InlineSynchronizedMethods, true, \ |
1 | 160 |
"Inline synchronized methods") \ |
161 |
\ |
|
38285
20b85a0ba796
8153655: Make intrinsics flags diagnostic and update intrinsics tests to enable diagnostic options
rraghavan
parents:
37268
diff
changeset
|
162 |
diagnostic(bool, InlineNIOCheckIndex, true, \ |
1 | 163 |
"Intrinsify java.nio.Buffer.checkIndex") \ |
164 |
\ |
|
165 |
develop(bool, CanonicalizeNodes, true, \ |
|
166 |
"Canonicalize graph nodes") \ |
|
167 |
\ |
|
168 |
develop(bool, PrintCanonicalization, false, \ |
|
169 |
"Print graph node canonicalization") \ |
|
170 |
\ |
|
171 |
develop(bool, UseTableRanges, true, \ |
|
172 |
"Faster versions of lookup table using ranges") \ |
|
173 |
\ |
|
174 |
develop_pd(bool, RoundFPResults, \ |
|
175 |
"Indicates whether rounding is needed for floating point results")\ |
|
176 |
\ |
|
177 |
develop(intx, NestedInliningSizeRatio, 90, \ |
|
178 |
"Percentage of prev. allowed inline size in recursive inlining") \ |
|
31371
311143309e73
8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
29180
diff
changeset
|
179 |
range(0, 100) \ |
1 | 180 |
\ |
181 |
notproduct(bool, PrintIRWithLIR, false, \ |
|
182 |
"Print IR instructions with generated LIR") \ |
|
183 |
\ |
|
184 |
notproduct(bool, PrintLIRWithAssembly, false, \ |
|
185 |
"Show LIR instruction with generated assembly") \ |
|
186 |
\ |
|
187 |
develop(bool, CommentedAssembly, trueInDebug, \ |
|
188 |
"Show extra info in PrintNMethods output") \ |
|
189 |
\ |
|
190 |
develop(bool, LIRTracePeephole, false, \ |
|
191 |
"Trace peephole optimizer") \ |
|
192 |
\ |
|
193 |
develop(bool, LIRTraceExecution, false, \ |
|
194 |
"add LIR code which logs the execution of blocks") \ |
|
195 |
\ |
|
196 |
product_pd(bool, LIRFillDelaySlots, \ |
|
197 |
"fill delays on on SPARC with LIR") \ |
|
198 |
\ |
|
199 |
develop_pd(bool, CSEArrayLength, \ |
|
200 |
"Create separate nodes for length in array accesses") \ |
|
201 |
\ |
|
202 |
develop_pd(bool, TwoOperandLIRForm, \ |
|
203 |
"true if LIR requires src1 and dst to match in binary LIR ops") \ |
|
204 |
\ |
|
205 |
develop(intx, TraceLinearScanLevel, 0, \ |
|
206 |
"Debug levels for the linear scan allocator") \ |
|
33163
9e128b399e48
8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents:
31371
diff
changeset
|
207 |
range(0, 4) \ |
1 | 208 |
\ |
209 |
develop(bool, StressLinearScan, false, \ |
|
210 |
"scramble block order used by LinearScan (stress test)") \ |
|
211 |
\ |
|
212 |
product(bool, TimeLinearScan, false, \ |
|
213 |
"detailed timing of LinearScan phases") \ |
|
214 |
\ |
|
215 |
develop(bool, TimeEachLinearScan, false, \ |
|
216 |
"print detailed timing of each LinearScan run") \ |
|
217 |
\ |
|
218 |
develop(bool, CountLinearScan, false, \ |
|
219 |
"collect statistic counters during LinearScan") \ |
|
220 |
\ |
|
221 |
/* C1 variable */ \ |
|
222 |
\ |
|
223 |
develop(bool, C1Breakpoint, false, \ |
|
224 |
"Sets a breakpoint at entry of each compiled method") \ |
|
225 |
\ |
|
226 |
develop(bool, ImplicitDiv0Checks, true, \ |
|
227 |
"Use implicit division by zero checks") \ |
|
228 |
\ |
|
229 |
develop(bool, PinAllInstructions, false, \ |
|
230 |
"All instructions are pinned") \ |
|
231 |
\ |
|
232 |
develop(bool, UseFastNewInstance, true, \ |
|
233 |
"Use fast inlined instance allocation") \ |
|
234 |
\ |
|
235 |
develop(bool, UseFastNewTypeArray, true, \ |
|
236 |
"Use fast inlined type array allocation") \ |
|
237 |
\ |
|
238 |
develop(bool, UseFastNewObjectArray, true, \ |
|
239 |
"Use fast inlined object array allocation") \ |
|
240 |
\ |
|
241 |
develop(bool, UseFastLocking, true, \ |
|
242 |
"Use fast inlined locking code") \ |
|
243 |
\ |
|
244 |
develop(bool, UseSlowPath, false, \ |
|
245 |
"For debugging: test slow cases by always using them") \ |
|
246 |
\ |
|
247 |
develop(bool, GenerateArrayStoreCheck, true, \ |
|
248 |
"Generates code for array store checks") \ |
|
249 |
\ |
|
250 |
develop(bool, DeoptC1, true, \ |
|
251 |
"Use deoptimization in C1") \ |
|
252 |
\ |
|
253 |
develop(bool, PrintBailouts, false, \ |
|
254 |
"Print bailout and its reason") \ |
|
255 |
\ |
|
256 |
develop(bool, TracePatching, false, \ |
|
257 |
"Trace patching of field access on uninitialized classes") \ |
|
258 |
\ |
|
259 |
develop(bool, PatchALot, false, \ |
|
260 |
"Marks all fields as having unloaded classes") \ |
|
261 |
\ |
|
262 |
develop(bool, PrintNotLoaded, false, \ |
|
263 |
"Prints where classes are not loaded during code generation") \ |
|
264 |
\ |
|
265 |
develop(bool, PrintLIR, false, \ |
|
266 |
"print low-level IR") \ |
|
267 |
\ |
|
268 |
develop(bool, BailoutAfterHIR, false, \ |
|
269 |
"bailout of compilation after building of HIR") \ |
|
270 |
\ |
|
271 |
develop(bool, BailoutAfterLIR, false, \ |
|
272 |
"bailout of compilation after building of LIR") \ |
|
273 |
\ |
|
274 |
develop(bool, BailoutOnExceptionHandlers, false, \ |
|
275 |
"bailout of compilation for methods with exception handlers") \ |
|
276 |
\ |
|
277 |
develop(bool, InstallMethods, true, \ |
|
278 |
"Install methods at the end of successful compilations") \ |
|
279 |
\ |
|
10505
df3cc194efc5
7085279: C1 overflows code buffer with VerifyOops and CompressedOops
iveresov
parents:
8921
diff
changeset
|
280 |
develop(intx, NMethodSizeLimit, (64*K)*wordSize, \ |
1 | 281 |
"Maximum size of a compiled method.") \ |
33163
9e128b399e48
8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents:
31371
diff
changeset
|
282 |
range(0, max_jint) \ |
1 | 283 |
\ |
284 |
develop(bool, TraceFPUStack, false, \ |
|
285 |
"Trace emulation of the FPU stack (intel only)") \ |
|
286 |
\ |
|
287 |
develop(bool, TraceFPURegisterUsage, false, \ |
|
288 |
"Trace usage of FPU registers at start of blocks (intel only)") \ |
|
289 |
\ |
|
290 |
develop(bool, OptimizeUnsafes, true, \ |
|
291 |
"Optimize raw unsafe ops") \ |
|
292 |
\ |
|
293 |
develop(bool, PrintUnsafeOptimization, false, \ |
|
294 |
"Print optimization of raw unsafe ops") \ |
|
295 |
\ |
|
296 |
develop(intx, InstructionCountCutoff, 37000, \ |
|
297 |
"If GraphBuilder adds this many instructions, bails out") \ |
|
33163
9e128b399e48
8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents:
31371
diff
changeset
|
298 |
range(0, max_jint) \ |
1 | 299 |
\ |
300 |
develop(bool, ComputeExactFPURegisterUsage, true, \ |
|
301 |
"Compute additional live set for fpu registers to simplify fpu stack merge (Intel only)") \ |
|
302 |
\ |
|
6453 | 303 |
product(bool, C1ProfileCalls, true, \ |
1 | 304 |
"Profile calls when generating code for updating MDOs") \ |
305 |
\ |
|
6453 | 306 |
product(bool, C1ProfileVirtualCalls, true, \ |
1 | 307 |
"Profile virtual calls when generating code for updating MDOs") \ |
308 |
\ |
|
6453 | 309 |
product(bool, C1ProfileInlinedCalls, true, \ |
1 | 310 |
"Profile inlined calls when generating code for updating MDOs") \ |
311 |
\ |
|
6453 | 312 |
product(bool, C1ProfileBranches, true, \ |
1 | 313 |
"Profile branches when generating code for updating MDOs") \ |
314 |
\ |
|
6453 | 315 |
product(bool, C1ProfileCheckcasts, true, \ |
1 | 316 |
"Profile checkcasts when generating code for updating MDOs") \ |
317 |
\ |
|
6453 | 318 |
product(bool, C1OptimizeVirtualCallProfiling, true, \ |
319 |
"Use CHA and exact type results at call sites when updating MDOs")\ |
|
1 | 320 |
\ |
6453 | 321 |
product(bool, C1UpdateMethodData, trueInTiered, \ |
19710
2f8ca425504e
7199175: JSR 292: C1 needs patching when invokedynamic/invokehandle call site is not linked
roland
parents:
16611
diff
changeset
|
322 |
"Update MethodData*s in Tier1-generated code") \ |
1 | 323 |
\ |
324 |
develop(bool, PrintCFGToFile, false, \ |
|
325 |
"print control flow graph to a separate file during compilation") \ |
|
326 |
\ |
|
327 |
// Read default values for c1 globals |
|
328 |
||
31371
311143309e73
8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
29180
diff
changeset
|
329 |
C1_FLAGS(DECLARE_DEVELOPER_FLAG, \ |
311143309e73
8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
29180
diff
changeset
|
330 |
DECLARE_PD_DEVELOPER_FLAG, \ |
311143309e73
8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
29180
diff
changeset
|
331 |
DECLARE_PRODUCT_FLAG, \ |
311143309e73
8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
29180
diff
changeset
|
332 |
DECLARE_PD_PRODUCT_FLAG, \ |
311143309e73
8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
29180
diff
changeset
|
333 |
DECLARE_DIAGNOSTIC_FLAG, \ |
39117 | 334 |
DECLARE_PD_DIAGNOSTIC_FLAG, \ |
31371
311143309e73
8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
29180
diff
changeset
|
335 |
DECLARE_NOTPRODUCT_FLAG, \ |
311143309e73
8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
29180
diff
changeset
|
336 |
IGNORE_RANGE, \ |
38273
2634194d7555
8073500: Prevent certain commercial flags from being changed at runtime
gziemski
parents:
37268
diff
changeset
|
337 |
IGNORE_CONSTRAINT, \ |
2634194d7555
8073500: Prevent certain commercial flags from being changed at runtime
gziemski
parents:
37268
diff
changeset
|
338 |
IGNORE_WRITEABLE) |
7397 | 339 |
|
340 |
#endif // SHARE_VM_C1_C1_GLOBALS_HPP |