Mercurial > hg > truffle
annotate src/share/vm/c1/c1_globals.hpp @ 5274:e72dd6533eb9
documented importance of nmethod::_graal_compiled_method wrt code unloading and GC
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Mon, 23 Apr 2012 15:42:30 +0200 |
parents | 723df37192d6 |
children | c38f13903fdf |
rev | line source |
---|---|
0 | 1 /* |
2426
1d1603768966
7010070: Update all 2010 Oracle-changed OpenJDK files to have the proper copyright dates - second pass
trims
parents:
2192
diff
changeset
|
2 * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. |
0 | 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 * | |
1552
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1397
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1397
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1397
diff
changeset
|
21 * questions. |
0 | 22 * |
23 */ | |
24 | |
1972 | 25 #ifndef SHARE_VM_C1_C1_GLOBALS_HPP |
26 #define SHARE_VM_C1_C1_GLOBALS_HPP | |
27 | |
28 #include "runtime/globals.hpp" | |
29 #ifdef TARGET_ARCH_x86 | |
30 # include "c1_globals_x86.hpp" | |
31 #endif | |
32 #ifdef TARGET_ARCH_sparc | |
33 # include "c1_globals_sparc.hpp" | |
34 #endif | |
2192
b92c45f2bc75
7016023: Enable building ARM and PPC from src/closed repository
bobv
parents:
1972
diff
changeset
|
35 #ifdef TARGET_ARCH_arm |
b92c45f2bc75
7016023: Enable building ARM and PPC from src/closed repository
bobv
parents:
1972
diff
changeset
|
36 # include "c1_globals_arm.hpp" |
b92c45f2bc75
7016023: Enable building ARM and PPC from src/closed repository
bobv
parents:
1972
diff
changeset
|
37 #endif |
b92c45f2bc75
7016023: Enable building ARM and PPC from src/closed repository
bobv
parents:
1972
diff
changeset
|
38 #ifdef TARGET_ARCH_ppc |
b92c45f2bc75
7016023: Enable building ARM and PPC from src/closed repository
bobv
parents:
1972
diff
changeset
|
39 # include "c1_globals_ppc.hpp" |
b92c45f2bc75
7016023: Enable building ARM and PPC from src/closed repository
bobv
parents:
1972
diff
changeset
|
40 #endif |
1972 | 41 #ifdef TARGET_OS_FAMILY_linux |
42 # include "c1_globals_linux.hpp" | |
43 #endif | |
44 #ifdef TARGET_OS_FAMILY_solaris | |
45 # include "c1_globals_solaris.hpp" | |
46 #endif | |
47 #ifdef TARGET_OS_FAMILY_windows | |
48 # include "c1_globals_windows.hpp" | |
49 #endif | |
3960 | 50 #ifdef TARGET_OS_FAMILY_bsd |
51 # include "c1_globals_bsd.hpp" | |
52 #endif | |
1972 | 53 |
0 | 54 // |
55 // Defines all global flags used by the client compiler. | |
56 // | |
57 #define C1_FLAGS(develop, develop_pd, product, product_pd, notproduct) \ | |
58 \ | |
3543
344264424174
Enable debugging of compiler code from Java IDEs. Moved binary to "graal" subdirectory. New flag for starting Graal is just "-graal".
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2901
diff
changeset
|
59 product(bool, DebugGraal, true, \ |
344264424174
Enable debugging of compiler code from Java IDEs. Moved binary to "graal" subdirectory. New flag for starting Graal is just "-graal".
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2901
diff
changeset
|
60 "Enable JVMTI for the compiler thread") \ |
3544 | 61 product(bool, BootstrapGraal, true, \ |
3543
344264424174
Enable debugging of compiler code from Java IDEs. Moved binary to "graal" subdirectory. New flag for starting Graal is just "-graal".
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2901
diff
changeset
|
62 "Bootstrap graal before running Java main method") \ |
344264424174
Enable debugging of compiler code from Java IDEs. Moved binary to "graal" subdirectory. New flag for starting Graal is just "-graal".
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2901
diff
changeset
|
63 product(intx, TraceGraal, 0, \ |
344264424174
Enable debugging of compiler code from Java IDEs. Moved binary to "graal" subdirectory. New flag for starting Graal is just "-graal".
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2901
diff
changeset
|
64 "Trace level for graal") \ |
1936
8d88c9ac9247
Correct deopt handler entry. New flag -XX:+TraceSignals. More detailed deopt printing.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1930
diff
changeset
|
65 product(bool, TraceSignals, false, \ |
8d88c9ac9247
Correct deopt handler entry. New flag -XX:+TraceSignals. More detailed deopt printing.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1930
diff
changeset
|
66 "Trace signals and implicit exception handling") \ |
0 | 67 /* Printing */ \ |
68 notproduct(bool, PrintC1Statistics, false, \ | |
69 "Print Compiler1 statistics" ) \ | |
70 \ | |
71 notproduct(bool, PrintInitialBlockList, false, \ | |
72 "Print block list of BlockListBuilder") \ | |
73 \ | |
74 notproduct(bool, PrintCFG, false, \ | |
75 "Print control flow graph after each change") \ | |
76 \ | |
77 notproduct(bool, PrintCFG0, false, \ | |
78 "Print control flow graph after construction") \ | |
79 \ | |
80 notproduct(bool, PrintCFG1, false, \ | |
81 "Print control flow graph after optimizations") \ | |
82 \ | |
83 notproduct(bool, PrintCFG2, false, \ | |
84 "Print control flow graph before code generation") \ | |
85 \ | |
86 notproduct(bool, PrintIRDuringConstruction, false, \ | |
87 "Print IR as it's being constructed (helpful for debugging frontend)")\ | |
88 \ | |
1783 | 89 notproduct(bool, PrintPhiFunctions, false, \ |
0 | 90 "Print phi functions when they are created and simplified") \ |
91 \ | |
92 notproduct(bool, PrintIR, false, \ | |
93 "Print full intermediate representation after each change") \ | |
94 \ | |
95 notproduct(bool, PrintIR0, false, \ | |
96 "Print full intermediate representation after construction") \ | |
97 \ | |
98 notproduct(bool, PrintIR1, false, \ | |
99 "Print full intermediate representation after optimizations") \ | |
100 \ | |
101 notproduct(bool, PrintIR2, false, \ | |
102 "Print full intermediate representation before code generation") \ | |
103 \ | |
104 notproduct(bool, PrintSimpleStubs, false, \ | |
105 "Print SimpleStubs") \ | |
106 \ | |
107 /* C1 optimizations */ \ | |
108 \ | |
109 develop(bool, UseC1Optimizations, true, \ | |
110 "Turn on C1 optimizations") \ | |
111 \ | |
112 develop(bool, SelectivePhiFunctions, true, \ | |
113 "create phi functions at loop headers only when necessary") \ | |
114 \ | |
1899 | 115 develop(bool, OptimizeIfOps, true, \ |
116 "Optimize multiple IfOps") \ | |
117 \ | |
0 | 118 develop(bool, DoCEE, true, \ |
119 "Do Conditional Expression Elimination to simplify CFG") \ | |
120 \ | |
121 develop(bool, PrintCEE, false, \ | |
122 "Print Conditional Expression Elimination") \ | |
123 \ | |
124 develop(bool, UseLocalValueNumbering, true, \ | |
125 "Use Local Value Numbering (embedded in GraphBuilder)") \ | |
126 \ | |
127 develop(bool, UseGlobalValueNumbering, true, \ | |
128 "Use Global Value Numbering (separate phase)") \ | |
129 \ | |
130 develop(bool, PrintValueNumbering, false, \ | |
131 "Print Value Numbering") \ | |
132 \ | |
133 product(intx, ValueMapInitialSize, 11, \ | |
134 "Initial size of a value map") \ | |
135 \ | |
136 product(intx, ValueMapMaxLoopSize, 8, \ | |
137 "maximum size of a loop optimized by global value numbering") \ | |
138 \ | |
139 develop(bool, EliminateBlocks, true, \ | |
140 "Eliminate unneccessary basic blocks") \ | |
141 \ | |
142 develop(bool, PrintBlockElimination, false, \ | |
143 "Print basic block elimination") \ | |
144 \ | |
145 develop(bool, EliminateNullChecks, true, \ | |
146 "Eliminate unneccessary null checks") \ | |
147 \ | |
148 develop(bool, PrintNullCheckElimination, false, \ | |
149 "Print null check elimination") \ | |
150 \ | |
151 develop(bool, EliminateFieldAccess, true, \ | |
152 "Optimize field loads and stores") \ | |
153 \ | |
154 develop(bool, InlineMethodsWithExceptionHandlers, true, \ | |
155 "Inline methods containing exception handlers " \ | |
156 "(NOTE: does not work with current backend)") \ | |
157 \ | |
158 develop(bool, InlineSynchronizedMethods, true, \ | |
159 "Inline synchronized methods") \ | |
160 \ | |
161 develop(bool, InlineNIOCheckIndex, true, \ | |
162 "Intrinsify java.nio.Buffer.checkIndex") \ | |
163 \ | |
164 develop(bool, CanonicalizeNodes, true, \ | |
165 "Canonicalize graph nodes") \ | |
166 \ | |
167 develop(bool, CanonicalizeExperimental, false, \ | |
168 "Canonicalize graph nodes, experimental code") \ | |
169 \ | |
170 develop(bool, PrintCanonicalization, false, \ | |
171 "Print graph node canonicalization") \ | |
172 \ | |
173 develop(bool, UseTableRanges, true, \ | |
174 "Faster versions of lookup table using ranges") \ | |
175 \ | |
176 develop(bool, UseFastExceptionHandling, true, \ | |
177 "Faster handling of exceptions") \ | |
178 \ | |
179 develop_pd(bool, RoundFPResults, \ | |
180 "Indicates whether rounding is needed for floating point results")\ | |
181 \ | |
182 develop(intx, NestedInliningSizeRatio, 90, \ | |
183 "Percentage of prev. allowed inline size in recursive inlining") \ | |
184 \ | |
185 notproduct(bool, PrintIRWithLIR, false, \ | |
186 "Print IR instructions with generated LIR") \ | |
187 \ | |
188 notproduct(bool, PrintLIRWithAssembly, false, \ | |
189 "Show LIR instruction with generated assembly") \ | |
190 \ | |
191 develop(bool, CommentedAssembly, trueInDebug, \ | |
192 "Show extra info in PrintNMethods output") \ | |
193 \ | |
194 develop(bool, LIRTracePeephole, false, \ | |
195 "Trace peephole optimizer") \ | |
196 \ | |
197 develop(bool, LIRTraceExecution, false, \ | |
198 "add LIR code which logs the execution of blocks") \ | |
199 \ | |
200 product_pd(bool, LIRFillDelaySlots, \ | |
201 "fill delays on on SPARC with LIR") \ | |
202 \ | |
203 develop_pd(bool, CSEArrayLength, \ | |
204 "Create separate nodes for length in array accesses") \ | |
205 \ | |
206 develop_pd(bool, TwoOperandLIRForm, \ | |
207 "true if LIR requires src1 and dst to match in binary LIR ops") \ | |
208 \ | |
209 develop(intx, TraceLinearScanLevel, 0, \ | |
210 "Debug levels for the linear scan allocator") \ | |
211 \ | |
212 develop(bool, StressLinearScan, false, \ | |
213 "scramble block order used by LinearScan (stress test)") \ | |
214 \ | |
215 product(bool, TimeLinearScan, false, \ | |
216 "detailed timing of LinearScan phases") \ | |
217 \ | |
218 develop(bool, TimeEachLinearScan, false, \ | |
219 "print detailed timing of each LinearScan run") \ | |
220 \ | |
221 develop(bool, CountLinearScan, false, \ | |
222 "collect statistic counters during LinearScan") \ | |
223 \ | |
224 /* C1 variable */ \ | |
225 \ | |
226 develop(bool, C1Breakpoint, false, \ | |
227 "Sets a breakpoint at entry of each compiled method") \ | |
228 \ | |
229 develop(bool, ImplicitDiv0Checks, true, \ | |
230 "Use implicit division by zero checks") \ | |
231 \ | |
232 develop(bool, PinAllInstructions, false, \ | |
233 "All instructions are pinned") \ | |
234 \ | |
235 develop(bool, ValueStackPinStackAll, true, \ | |
236 "Pinning in ValueStack pin everything") \ | |
237 \ | |
238 develop(bool, UseFastNewInstance, true, \ | |
239 "Use fast inlined instance allocation") \ | |
240 \ | |
241 develop(bool, UseFastNewTypeArray, true, \ | |
242 "Use fast inlined type array allocation") \ | |
243 \ | |
244 develop(bool, UseFastNewObjectArray, true, \ | |
245 "Use fast inlined object array allocation") \ | |
246 \ | |
4140
716a2c5c0656
Further reduce diff to HotSpot.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
4137
diff
changeset
|
247 develop(bool, UseFastLocking, true, \ |
0 | 248 "Use fast inlined locking code") \ |
249 \ | |
250 develop(bool, UseSlowPath, false, \ | |
251 "For debugging: test slow cases by always using them") \ | |
252 \ | |
253 develop(bool, GenerateArrayStoreCheck, true, \ | |
254 "Generates code for array store checks") \ | |
255 \ | |
256 develop(bool, DeoptC1, true, \ | |
257 "Use deoptimization in C1") \ | |
258 \ | |
259 develop(bool, PrintBailouts, false, \ | |
260 "Print bailout and its reason") \ | |
261 \ | |
262 develop(bool, TracePatching, false, \ | |
263 "Trace patching of field access on uninitialized classes") \ | |
264 \ | |
265 develop(bool, PatchALot, false, \ | |
266 "Marks all fields as having unloaded classes") \ | |
267 \ | |
268 develop(bool, PrintNotLoaded, false, \ | |
269 "Prints where classes are not loaded during code generation") \ | |
270 \ | |
271 notproduct(bool, VerifyOopMaps, false, \ | |
272 "Adds oopmap verification code to the generated code") \ | |
273 \ | |
274 develop(bool, PrintLIR, false, \ | |
275 "print low-level IR") \ | |
276 \ | |
277 develop(bool, BailoutAfterHIR, false, \ | |
278 "bailout of compilation after building of HIR") \ | |
279 \ | |
280 develop(bool, BailoutAfterLIR, false, \ | |
281 "bailout of compilation after building of LIR") \ | |
282 \ | |
283 develop(bool, BailoutOnExceptionHandlers, false, \ | |
284 "bailout of compilation for methods with exception handlers") \ | |
285 \ | |
286 develop(bool, InstallMethods, true, \ | |
287 "Install methods at the end of successful compilations") \ | |
288 \ | |
289 product(intx, CompilationRepeat, 0, \ | |
290 "Number of times to recompile method before returning result") \ | |
291 \ | |
3896
b346f13112d8
7085279: C1 overflows code buffer with VerifyOops and CompressedOops
iveresov
parents:
2426
diff
changeset
|
292 develop(intx, NMethodSizeLimit, (64*K)*wordSize, \ |
0 | 293 "Maximum size of a compiled method.") \ |
294 \ | |
295 develop(bool, TraceFPUStack, false, \ | |
296 "Trace emulation of the FPU stack (intel only)") \ | |
297 \ | |
298 develop(bool, TraceFPURegisterUsage, false, \ | |
299 "Trace usage of FPU registers at start of blocks (intel only)") \ | |
300 \ | |
301 develop(bool, OptimizeUnsafes, true, \ | |
302 "Optimize raw unsafe ops") \ | |
303 \ | |
304 develop(bool, PrintUnsafeOptimization, false, \ | |
305 "Print optimization of raw unsafe ops") \ | |
306 \ | |
307 develop(intx, InstructionCountCutoff, 37000, \ | |
308 "If GraphBuilder adds this many instructions, bails out") \ | |
309 \ | |
310 product_pd(intx, SafepointPollOffset, \ | |
311 "Offset added to polling address (Intel only)") \ | |
312 \ | |
313 develop(bool, ComputeExactFPURegisterUsage, true, \ | |
314 "Compute additional live set for fpu registers to simplify fpu stack merge (Intel only)") \ | |
315 \ | |
1783 | 316 product(bool, C1ProfileCalls, true, \ |
0 | 317 "Profile calls when generating code for updating MDOs") \ |
318 \ | |
1783 | 319 product(bool, C1ProfileVirtualCalls, true, \ |
0 | 320 "Profile virtual calls when generating code for updating MDOs") \ |
321 \ | |
1783 | 322 product(bool, C1ProfileInlinedCalls, true, \ |
0 | 323 "Profile inlined calls when generating code for updating MDOs") \ |
324 \ | |
1783 | 325 product(bool, C1ProfileBranches, true, \ |
0 | 326 "Profile branches when generating code for updating MDOs") \ |
327 \ | |
1783 | 328 product(bool, C1ProfileCheckcasts, true, \ |
0 | 329 "Profile checkcasts when generating code for updating MDOs") \ |
330 \ | |
1783 | 331 product(bool, C1OptimizeVirtualCallProfiling, true, \ |
332 "Use CHA and exact type results at call sites when updating MDOs")\ | |
0 | 333 \ |
1783 | 334 product(bool, C1UpdateMethodData, trueInTiered, \ |
335 "Update methodDataOops in Tier1-generated code") \ | |
0 | 336 \ |
337 develop(bool, PrintCFGToFile, false, \ | |
338 "print control flow graph to a separate file during compilation") \ | |
339 \ | |
340 | |
341 | |
342 // Read default values for c1 globals | |
343 | |
344 C1_FLAGS(DECLARE_DEVELOPER_FLAG, DECLARE_PD_DEVELOPER_FLAG, DECLARE_PRODUCT_FLAG, DECLARE_PD_PRODUCT_FLAG, DECLARE_NOTPRODUCT_FLAG) | |
1972 | 345 |
346 #endif // SHARE_VM_C1_C1_GLOBALS_HPP |