src/share/vm/c1/c1_globals.hpp

changeset 0
f90c822e73f8
child 1
2d8a650513c2
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/share/vm/c1/c1_globals.hpp	Wed Apr 27 01:25:04 2016 +0800
     1.3 @@ -0,0 +1,350 @@
     1.4 +/*
     1.5 + * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
     1.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.7 + *
     1.8 + * This code is free software; you can redistribute it and/or modify it
     1.9 + * under the terms of the GNU General Public License version 2 only, as
    1.10 + * published by the Free Software Foundation.
    1.11 + *
    1.12 + * This code is distributed in the hope that it will be useful, but WITHOUT
    1.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    1.14 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    1.15 + * version 2 for more details (a copy is included in the LICENSE file that
    1.16 + * accompanied this code).
    1.17 + *
    1.18 + * You should have received a copy of the GNU General Public License version
    1.19 + * 2 along with this work; if not, write to the Free Software Foundation,
    1.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1.21 + *
    1.22 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    1.23 + * or visit www.oracle.com if you need additional information or have any
    1.24 + * questions.
    1.25 + *
    1.26 + */
    1.27 +
    1.28 +#ifndef SHARE_VM_C1_C1_GLOBALS_HPP
    1.29 +#define SHARE_VM_C1_C1_GLOBALS_HPP
    1.30 +
    1.31 +#include "runtime/globals.hpp"
    1.32 +#ifdef TARGET_ARCH_x86
    1.33 +# include "c1_globals_x86.hpp"
    1.34 +#endif
    1.35 +#ifdef TARGET_ARCH_sparc
    1.36 +# include "c1_globals_sparc.hpp"
    1.37 +#endif
    1.38 +#ifdef TARGET_ARCH_arm
    1.39 +# include "c1_globals_arm.hpp"
    1.40 +#endif
    1.41 +#ifdef TARGET_ARCH_ppc
    1.42 +# include "c1_globals_ppc.hpp"
    1.43 +#endif
    1.44 +#ifdef TARGET_OS_FAMILY_linux
    1.45 +# include "c1_globals_linux.hpp"
    1.46 +#endif
    1.47 +#ifdef TARGET_OS_FAMILY_solaris
    1.48 +# include "c1_globals_solaris.hpp"
    1.49 +#endif
    1.50 +#ifdef TARGET_OS_FAMILY_windows
    1.51 +# include "c1_globals_windows.hpp"
    1.52 +#endif
    1.53 +#ifdef TARGET_OS_FAMILY_aix
    1.54 +# include "c1_globals_aix.hpp"
    1.55 +#endif
    1.56 +#ifdef TARGET_OS_FAMILY_bsd
    1.57 +# include "c1_globals_bsd.hpp"
    1.58 +#endif
    1.59 +
    1.60 +//
    1.61 +// Defines all global flags used by the client compiler.
    1.62 +//
    1.63 +#define C1_FLAGS(develop, develop_pd, product, product_pd, diagnostic, notproduct) \
    1.64 +                                                                            \
    1.65 +  /* Printing */                                                            \
    1.66 +  notproduct(bool, PrintC1Statistics, false,                                \
    1.67 +          "Print Compiler1 statistics" )                                    \
    1.68 +                                                                            \
    1.69 +  notproduct(bool, PrintInitialBlockList, false,                            \
    1.70 +          "Print block list of BlockListBuilder")                           \
    1.71 +                                                                            \
    1.72 +  notproduct(bool, PrintCFG, false,                                         \
    1.73 +          "Print control flow graph after each change")                     \
    1.74 +                                                                            \
    1.75 +  notproduct(bool, PrintCFG0, false,                                        \
    1.76 +          "Print control flow graph after construction")                    \
    1.77 +                                                                            \
    1.78 +  notproduct(bool, PrintCFG1, false,                                        \
    1.79 +          "Print control flow graph after optimizations")                   \
    1.80 +                                                                            \
    1.81 +  notproduct(bool, PrintCFG2, false,                                        \
    1.82 +          "Print control flow graph before code generation")                \
    1.83 +                                                                            \
    1.84 +  notproduct(bool, PrintIRDuringConstruction, false,                        \
    1.85 +          "Print IR as it's being constructed (helpful for debugging frontend)")\
    1.86 +                                                                            \
    1.87 +  notproduct(bool, PrintPhiFunctions, false,                                \
    1.88 +          "Print phi functions when they are created and simplified")       \
    1.89 +                                                                            \
    1.90 +  notproduct(bool, PrintIR, false,                                          \
    1.91 +          "Print full intermediate representation after each change")       \
    1.92 +                                                                            \
    1.93 +  notproduct(bool, PrintIR0, false,                                         \
    1.94 +          "Print full intermediate representation after construction")      \
    1.95 +                                                                            \
    1.96 +  notproduct(bool, PrintIR1, false,                                         \
    1.97 +          "Print full intermediate representation after optimizations")     \
    1.98 +                                                                            \
    1.99 +  notproduct(bool, PrintIR2, false,                                         \
   1.100 +          "Print full intermediate representation before code generation")  \
   1.101 +                                                                            \
   1.102 +  notproduct(bool, PrintSimpleStubs, false,                                 \
   1.103 +          "Print SimpleStubs")                                              \
   1.104 +                                                                            \
   1.105 +  /* C1 optimizations */                                                    \
   1.106 +                                                                            \
   1.107 +  develop(bool, UseC1Optimizations, true,                                   \
   1.108 +          "Turn on C1 optimizations")                                       \
   1.109 +                                                                            \
   1.110 +  develop(bool, SelectivePhiFunctions, true,                                \
   1.111 +          "create phi functions at loop headers only when necessary")       \
   1.112 +                                                                            \
   1.113 +  develop(bool, OptimizeIfOps, true,                                        \
   1.114 +          "Optimize multiple IfOps")                                        \
   1.115 +                                                                            \
   1.116 +  develop(bool, DoCEE, true,                                                \
   1.117 +          "Do Conditional Expression Elimination to simplify CFG")          \
   1.118 +                                                                            \
   1.119 +  develop(bool, PrintCEE, false,                                            \
   1.120 +          "Print Conditional Expression Elimination")                       \
   1.121 +                                                                            \
   1.122 +  develop(bool, UseLocalValueNumbering, true,                               \
   1.123 +          "Use Local Value Numbering (embedded in GraphBuilder)")           \
   1.124 +                                                                            \
   1.125 +  develop(bool, UseGlobalValueNumbering, true,                              \
   1.126 +          "Use Global Value Numbering (separate phase)")                    \
   1.127 +                                                                            \
   1.128 +  product(bool, UseLoopInvariantCodeMotion, true,                           \
   1.129 +          "Simple loop invariant code motion for short loops during GVN")   \
   1.130 +                                                                            \
   1.131 +  develop(bool, TracePredicateFailedTraps, false,                           \
   1.132 +          "trace runtime traps caused by predicate failure")                \
   1.133 +                                                                            \
   1.134 +  develop(bool, StressLoopInvariantCodeMotion, false,                       \
   1.135 +          "stress loop invariant code motion")                              \
   1.136 +                                                                            \
   1.137 +  develop(bool, TraceRangeCheckElimination, false,                          \
   1.138 +          "Trace Range Check Elimination")                                  \
   1.139 +                                                                            \
   1.140 +  develop(bool, AssertRangeCheckElimination, false,                         \
   1.141 +          "Assert Range Check Elimination")                                 \
   1.142 +                                                                            \
   1.143 +  develop(bool, StressRangeCheckElimination, false,                         \
   1.144 +          "stress Range Check Elimination")                                 \
   1.145 +                                                                            \
   1.146 +  develop(bool, PrintValueNumbering, false,                                 \
   1.147 +          "Print Value Numbering")                                          \
   1.148 +                                                                            \
   1.149 +  product(intx, ValueMapInitialSize, 11,                                    \
   1.150 +          "Initial size of a value map")                                    \
   1.151 +                                                                            \
   1.152 +  product(intx, ValueMapMaxLoopSize, 8,                                     \
   1.153 +          "maximum size of a loop optimized by global value numbering")     \
   1.154 +                                                                            \
   1.155 +  develop(bool, EliminateBlocks, true,                                      \
   1.156 +          "Eliminate unneccessary basic blocks")                            \
   1.157 +                                                                            \
   1.158 +  develop(bool, PrintBlockElimination, false,                               \
   1.159 +          "Print basic block elimination")                                  \
   1.160 +                                                                            \
   1.161 +  develop(bool, EliminateNullChecks, true,                                  \
   1.162 +          "Eliminate unneccessary null checks")                             \
   1.163 +                                                                            \
   1.164 +  develop(bool, PrintNullCheckElimination, false,                           \
   1.165 +          "Print null check elimination")                                   \
   1.166 +                                                                            \
   1.167 +  develop(bool, EliminateFieldAccess, true,                                 \
   1.168 +          "Optimize field loads and stores")                                \
   1.169 +                                                                            \
   1.170 +  develop(bool, InlineMethodsWithExceptionHandlers, true,                   \
   1.171 +          "Inline methods containing exception handlers "                   \
   1.172 +          "(NOTE: does not work with current backend)")                     \
   1.173 +                                                                            \
   1.174 +  product(bool, InlineSynchronizedMethods, true,                            \
   1.175 +          "Inline synchronized methods")                                    \
   1.176 +                                                                            \
   1.177 +  develop(bool, InlineNIOCheckIndex, true,                                  \
   1.178 +          "Intrinsify java.nio.Buffer.checkIndex")                          \
   1.179 +                                                                            \
   1.180 +  develop(bool, CanonicalizeNodes, true,                                    \
   1.181 +          "Canonicalize graph nodes")                                       \
   1.182 +                                                                            \
   1.183 +  develop(bool, PrintCanonicalization, false,                               \
   1.184 +          "Print graph node canonicalization")                              \
   1.185 +                                                                            \
   1.186 +  develop(bool, UseTableRanges, true,                                       \
   1.187 +          "Faster versions of lookup table using ranges")                   \
   1.188 +                                                                            \
   1.189 +  develop_pd(bool, RoundFPResults,                                          \
   1.190 +          "Indicates whether rounding is needed for floating point results")\
   1.191 +                                                                            \
   1.192 +  develop(intx, NestedInliningSizeRatio, 90,                                \
   1.193 +          "Percentage of prev. allowed inline size in recursive inlining")  \
   1.194 +                                                                            \
   1.195 +  notproduct(bool, PrintIRWithLIR, false,                                   \
   1.196 +          "Print IR instructions with generated LIR")                       \
   1.197 +                                                                            \
   1.198 +  notproduct(bool, PrintLIRWithAssembly, false,                             \
   1.199 +          "Show LIR instruction with generated assembly")                   \
   1.200 +                                                                            \
   1.201 +  develop(bool, CommentedAssembly, trueInDebug,                             \
   1.202 +          "Show extra info in PrintNMethods output")                        \
   1.203 +                                                                            \
   1.204 +  develop(bool, LIRTracePeephole, false,                                    \
   1.205 +          "Trace peephole optimizer")                                       \
   1.206 +                                                                            \
   1.207 +  develop(bool, LIRTraceExecution, false,                                   \
   1.208 +          "add LIR code which logs the execution of blocks")                \
   1.209 +                                                                            \
   1.210 +  product_pd(bool, LIRFillDelaySlots,                                       \
   1.211 +             "fill delays on on SPARC with LIR")                            \
   1.212 +                                                                            \
   1.213 +  develop_pd(bool, CSEArrayLength,                                          \
   1.214 +          "Create separate nodes for length in array accesses")             \
   1.215 +                                                                            \
   1.216 +  develop_pd(bool, TwoOperandLIRForm,                                       \
   1.217 +          "true if LIR requires src1 and dst to match in binary LIR ops")   \
   1.218 +                                                                            \
   1.219 +  develop(intx, TraceLinearScanLevel, 0,                                    \
   1.220 +          "Debug levels for the linear scan allocator")                     \
   1.221 +                                                                            \
   1.222 +  develop(bool, StressLinearScan, false,                                    \
   1.223 +          "scramble block order used by LinearScan (stress test)")          \
   1.224 +                                                                            \
   1.225 +  product(bool, TimeLinearScan, false,                                      \
   1.226 +          "detailed timing of LinearScan phases")                           \
   1.227 +                                                                            \
   1.228 +  develop(bool, TimeEachLinearScan, false,                                  \
   1.229 +          "print detailed timing of each LinearScan run")                   \
   1.230 +                                                                            \
   1.231 +  develop(bool, CountLinearScan, false,                                     \
   1.232 +          "collect statistic counters during LinearScan")                   \
   1.233 +                                                                            \
   1.234 +  /* C1 variable */                                                         \
   1.235 +                                                                            \
   1.236 +  develop(bool, C1Breakpoint, false,                                        \
   1.237 +          "Sets a breakpoint at entry of each compiled method")             \
   1.238 +                                                                            \
   1.239 +  develop(bool, ImplicitDiv0Checks, true,                                   \
   1.240 +          "Use implicit division by zero checks")                           \
   1.241 +                                                                            \
   1.242 +  develop(bool, PinAllInstructions, false,                                  \
   1.243 +          "All instructions are pinned")                                    \
   1.244 +                                                                            \
   1.245 +  develop(bool, UseFastNewInstance, true,                                   \
   1.246 +          "Use fast inlined instance allocation")                           \
   1.247 +                                                                            \
   1.248 +  develop(bool, UseFastNewTypeArray, true,                                  \
   1.249 +          "Use fast inlined type array allocation")                         \
   1.250 +                                                                            \
   1.251 +  develop(bool, UseFastNewObjectArray, true,                                \
   1.252 +          "Use fast inlined object array allocation")                       \
   1.253 +                                                                            \
   1.254 +  develop(bool, UseFastLocking, true,                                       \
   1.255 +          "Use fast inlined locking code")                                  \
   1.256 +                                                                            \
   1.257 +  develop(bool, UseSlowPath, false,                                         \
   1.258 +          "For debugging: test slow cases by always using them")            \
   1.259 +                                                                            \
   1.260 +  develop(bool, GenerateArrayStoreCheck, true,                              \
   1.261 +          "Generates code for array store checks")                          \
   1.262 +                                                                            \
   1.263 +  develop(bool, DeoptC1, true,                                              \
   1.264 +          "Use deoptimization in C1")                                       \
   1.265 +                                                                            \
   1.266 +  develop(bool, PrintBailouts, false,                                       \
   1.267 +          "Print bailout and its reason")                                   \
   1.268 +                                                                            \
   1.269 +  develop(bool, TracePatching, false,                                       \
   1.270 +         "Trace patching of field access on uninitialized classes")         \
   1.271 +                                                                            \
   1.272 +  develop(bool, PatchALot, false,                                           \
   1.273 +          "Marks all fields as having unloaded classes")                    \
   1.274 +                                                                            \
   1.275 +  develop(bool, PrintNotLoaded, false,                                      \
   1.276 +          "Prints where classes are not loaded during code generation")     \
   1.277 +                                                                            \
   1.278 +  develop(bool, PrintLIR, false,                                            \
   1.279 +          "print low-level IR")                                             \
   1.280 +                                                                            \
   1.281 +  develop(bool, BailoutAfterHIR, false,                                     \
   1.282 +          "bailout of compilation after building of HIR")                   \
   1.283 +                                                                            \
   1.284 +  develop(bool, BailoutAfterLIR, false,                                     \
   1.285 +          "bailout of compilation after building of LIR")                   \
   1.286 +                                                                            \
   1.287 +  develop(bool, BailoutOnExceptionHandlers, false,                          \
   1.288 +          "bailout of compilation for methods with exception handlers")     \
   1.289 +                                                                            \
   1.290 +  develop(bool, InstallMethods, true,                                       \
   1.291 +          "Install methods at the end of successful compilations")          \
   1.292 +                                                                            \
   1.293 +  product(intx, CompilationRepeat, 0,                                       \
   1.294 +          "Number of times to recompile method before returning result")    \
   1.295 +                                                                            \
   1.296 +  develop(intx, NMethodSizeLimit, (64*K)*wordSize,                          \
   1.297 +          "Maximum size of a compiled method.")                             \
   1.298 +                                                                            \
   1.299 +  develop(bool, TraceFPUStack, false,                                       \
   1.300 +          "Trace emulation of the FPU stack (intel only)")                  \
   1.301 +                                                                            \
   1.302 +  develop(bool, TraceFPURegisterUsage, false,                               \
   1.303 +          "Trace usage of FPU registers at start of blocks (intel only)")   \
   1.304 +                                                                            \
   1.305 +  develop(bool, OptimizeUnsafes, true,                                      \
   1.306 +          "Optimize raw unsafe ops")                                        \
   1.307 +                                                                            \
   1.308 +  develop(bool, PrintUnsafeOptimization, false,                             \
   1.309 +          "Print optimization of raw unsafe ops")                           \
   1.310 +                                                                            \
   1.311 +  develop(intx, InstructionCountCutoff, 37000,                              \
   1.312 +          "If GraphBuilder adds this many instructions, bails out")         \
   1.313 +                                                                            \
   1.314 +  product_pd(intx, SafepointPollOffset,                                     \
   1.315 +          "Offset added to polling address (Intel only)")                   \
   1.316 +                                                                            \
   1.317 +  develop(bool, ComputeExactFPURegisterUsage, true,                         \
   1.318 +          "Compute additional live set for fpu registers to simplify fpu stack merge (Intel only)") \
   1.319 +                                                                            \
   1.320 +  product(bool, C1ProfileCalls, true,                                       \
   1.321 +          "Profile calls when generating code for updating MDOs")           \
   1.322 +                                                                            \
   1.323 +  product(bool, C1ProfileVirtualCalls, true,                                \
   1.324 +          "Profile virtual calls when generating code for updating MDOs")   \
   1.325 +                                                                            \
   1.326 +  product(bool, C1ProfileInlinedCalls, true,                                \
   1.327 +          "Profile inlined calls when generating code for updating MDOs")   \
   1.328 +                                                                            \
   1.329 +  product(bool, C1ProfileBranches, true,                                    \
   1.330 +          "Profile branches when generating code for updating MDOs")        \
   1.331 +                                                                            \
   1.332 +  product(bool, C1ProfileCheckcasts, true,                                  \
   1.333 +          "Profile checkcasts when generating code for updating MDOs")      \
   1.334 +                                                                            \
   1.335 +  product(bool, C1OptimizeVirtualCallProfiling, true,                       \
   1.336 +          "Use CHA and exact type results at call sites when updating MDOs")\
   1.337 +                                                                            \
   1.338 +  product(bool, C1UpdateMethodData, trueInTiered,                           \
   1.339 +          "Update MethodData*s in Tier1-generated code")                    \
   1.340 +                                                                            \
   1.341 +  develop(bool, PrintCFGToFile, false,                                      \
   1.342 +          "print control flow graph to a separate file during compilation") \
   1.343 +                                                                            \
   1.344 +  diagnostic(bool, C1PatchInvokeDynamic, true,                              \
   1.345 +             "Patch invokedynamic appendix not known at compile time")      \
   1.346 +                                                                            \
   1.347 +
   1.348 +
   1.349 +// Read default values for c1 globals
   1.350 +
   1.351 +C1_FLAGS(DECLARE_DEVELOPER_FLAG, DECLARE_PD_DEVELOPER_FLAG, DECLARE_PRODUCT_FLAG, DECLARE_PD_PRODUCT_FLAG, DECLARE_DIAGNOSTIC_FLAG, DECLARE_NOTPRODUCT_FLAG)
   1.352 +
   1.353 +#endif // SHARE_VM_C1_C1_GLOBALS_HPP

mercurial