hotspot/src/share/vm/c1/c1_globals.hpp
changeset 1 489c9b5090e2
child 1374 4c24294029a9
equal deleted inserted replaced
0:fd16c54261b3 1:489c9b5090e2
       
     1 /*
       
     2  * Copyright 2000-2007 Sun Microsystems, Inc.  All Rights Reserved.
       
     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  *
       
    19  * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
       
    20  * CA 95054 USA or visit www.sun.com if you need additional information or
       
    21  * have any questions.
       
    22  *
       
    23  */
       
    24 
       
    25 //
       
    26 // Defines all global flags used by the client compiler.
       
    27 //
       
    28 #ifndef TIERED
       
    29   #define NOT_TIERED(x) x
       
    30 #else
       
    31   #define NOT_TIERED(x)
       
    32 #endif
       
    33 
       
    34 #define C1_FLAGS(develop, develop_pd, product, product_pd, notproduct)      \
       
    35                                                                             \
       
    36   /* Printing */                                                            \
       
    37   notproduct(bool, PrintC1Statistics, false,                                \
       
    38           "Print Compiler1 statistics" )                                    \
       
    39                                                                             \
       
    40   notproduct(bool, PrintInitialBlockList, false,                            \
       
    41           "Print block list of BlockListBuilder")                           \
       
    42                                                                             \
       
    43   notproduct(bool, PrintCFG, false,                                         \
       
    44           "Print control flow graph after each change")                     \
       
    45                                                                             \
       
    46   notproduct(bool, PrintCFG0, false,                                        \
       
    47           "Print control flow graph after construction")                    \
       
    48                                                                             \
       
    49   notproduct(bool, PrintCFG1, false,                                        \
       
    50           "Print control flow graph after optimizations")                   \
       
    51                                                                             \
       
    52   notproduct(bool, PrintCFG2, false,                                        \
       
    53           "Print control flow graph before code generation")                \
       
    54                                                                             \
       
    55   notproduct(bool, PrintIRDuringConstruction, false,                        \
       
    56           "Print IR as it's being constructed (helpful for debugging frontend)")\
       
    57                                                                             \
       
    58   notproduct(bool, PrintPhiFunctions, false,                                   \
       
    59           "Print phi functions when they are created and simplified")       \
       
    60                                                                             \
       
    61   notproduct(bool, PrintIR, false,                                          \
       
    62           "Print full intermediate representation after each change")       \
       
    63                                                                             \
       
    64   notproduct(bool, PrintIR0, false,                                         \
       
    65           "Print full intermediate representation after construction")      \
       
    66                                                                             \
       
    67   notproduct(bool, PrintIR1, false,                                         \
       
    68           "Print full intermediate representation after optimizations")     \
       
    69                                                                             \
       
    70   notproduct(bool, PrintIR2, false,                                         \
       
    71           "Print full intermediate representation before code generation")  \
       
    72                                                                             \
       
    73   notproduct(bool, PrintSimpleStubs, false,                                 \
       
    74           "Print SimpleStubs")                                              \
       
    75                                                                             \
       
    76   /* C1 optimizations */                                                    \
       
    77                                                                             \
       
    78   develop(bool, UseC1Optimizations, true,                                   \
       
    79           "Turn on C1 optimizations")                                       \
       
    80                                                                             \
       
    81   develop(bool, SelectivePhiFunctions, true,                                \
       
    82           "create phi functions at loop headers only when necessary")       \
       
    83                                                                             \
       
    84   develop(bool, DoCEE, true,                                                \
       
    85           "Do Conditional Expression Elimination to simplify CFG")          \
       
    86                                                                             \
       
    87   develop(bool, PrintCEE, false,                                            \
       
    88           "Print Conditional Expression Elimination")                       \
       
    89                                                                             \
       
    90   develop(bool, UseLocalValueNumbering, true,                               \
       
    91           "Use Local Value Numbering (embedded in GraphBuilder)")           \
       
    92                                                                             \
       
    93   develop(bool, UseGlobalValueNumbering, true,                              \
       
    94           "Use Global Value Numbering (separate phase)")                    \
       
    95                                                                             \
       
    96   develop(bool, PrintValueNumbering, false,                                 \
       
    97           "Print Value Numbering")                                          \
       
    98                                                                             \
       
    99   product(intx, ValueMapInitialSize, 11,                                    \
       
   100           "Initial size of a value map")                                    \
       
   101                                                                             \
       
   102   product(intx, ValueMapMaxLoopSize, 8,                                     \
       
   103           "maximum size of a loop optimized by global value numbering")     \
       
   104                                                                             \
       
   105   develop(bool, EliminateBlocks, true,                                      \
       
   106           "Eliminate unneccessary basic blocks")                            \
       
   107                                                                             \
       
   108   develop(bool, PrintBlockElimination, false,                               \
       
   109           "Print basic block elimination")                                  \
       
   110                                                                             \
       
   111   develop(bool, EliminateNullChecks, true,                                  \
       
   112           "Eliminate unneccessary null checks")                             \
       
   113                                                                             \
       
   114   develop(bool, PrintNullCheckElimination, false,                           \
       
   115           "Print null check elimination")                                   \
       
   116                                                                             \
       
   117   develop(bool, EliminateFieldAccess, true,                                 \
       
   118           "Optimize field loads and stores")                                \
       
   119                                                                             \
       
   120   develop(bool, InlineMethodsWithExceptionHandlers, true,                   \
       
   121           "Inline methods containing exception handlers "                   \
       
   122           "(NOTE: does not work with current backend)")                     \
       
   123                                                                             \
       
   124   develop(bool, InlineSynchronizedMethods, true,                            \
       
   125           "Inline synchronized methods")                                    \
       
   126                                                                             \
       
   127   develop(bool, InlineNIOCheckIndex, true,                                  \
       
   128           "Intrinsify java.nio.Buffer.checkIndex")                          \
       
   129                                                                             \
       
   130   develop(bool, CanonicalizeNodes, true,                                    \
       
   131           "Canonicalize graph nodes")                                       \
       
   132                                                                             \
       
   133   develop(bool, CanonicalizeExperimental, false,                            \
       
   134           "Canonicalize graph nodes, experimental code")                    \
       
   135                                                                             \
       
   136   develop(bool, PrintCanonicalization, false,                               \
       
   137           "Print graph node canonicalization")                              \
       
   138                                                                             \
       
   139   develop(bool, UseTableRanges, true,                                       \
       
   140           "Faster versions of lookup table using ranges")                   \
       
   141                                                                             \
       
   142   develop(bool, UseFastExceptionHandling, true,                             \
       
   143           "Faster handling of exceptions")                                  \
       
   144                                                                             \
       
   145   develop_pd(bool, RoundFPResults,                                          \
       
   146           "Indicates whether rounding is needed for floating point results")\
       
   147                                                                             \
       
   148   develop(intx, NestedInliningSizeRatio, 90,                                \
       
   149           "Percentage of prev. allowed inline size in recursive inlining")  \
       
   150                                                                             \
       
   151   notproduct(bool, PrintIRWithLIR, false,                                   \
       
   152           "Print IR instructions with generated LIR")                       \
       
   153                                                                             \
       
   154   notproduct(bool, PrintLIRWithAssembly, false,                             \
       
   155           "Show LIR instruction with generated assembly")                   \
       
   156                                                                             \
       
   157   develop(bool, CommentedAssembly, trueInDebug,                             \
       
   158           "Show extra info in PrintNMethods output")                        \
       
   159                                                                             \
       
   160   develop(bool, LIRTracePeephole, false,                                    \
       
   161           "Trace peephole optimizer")                                       \
       
   162                                                                             \
       
   163   develop(bool, LIRTraceExecution, false,                                   \
       
   164           "add LIR code which logs the execution of blocks")                \
       
   165                                                                             \
       
   166   product_pd(bool, LIRFillDelaySlots,                                       \
       
   167              "fill delays on on SPARC with LIR")                            \
       
   168                                                                             \
       
   169   develop_pd(bool, CSEArrayLength,                                          \
       
   170           "Create separate nodes for length in array accesses")             \
       
   171                                                                             \
       
   172   develop_pd(bool, TwoOperandLIRForm,                                       \
       
   173           "true if LIR requires src1 and dst to match in binary LIR ops")   \
       
   174                                                                             \
       
   175   develop(intx, TraceLinearScanLevel, 0,                                    \
       
   176           "Debug levels for the linear scan allocator")                     \
       
   177                                                                             \
       
   178   develop(bool, StressLinearScan, false,                                    \
       
   179           "scramble block order used by LinearScan (stress test)")          \
       
   180                                                                             \
       
   181   product(bool, TimeLinearScan, false,                                      \
       
   182           "detailed timing of LinearScan phases")                           \
       
   183                                                                             \
       
   184   develop(bool, TimeEachLinearScan, false,                                  \
       
   185           "print detailed timing of each LinearScan run")                   \
       
   186                                                                             \
       
   187   develop(bool, CountLinearScan, false,                                     \
       
   188           "collect statistic counters during LinearScan")                   \
       
   189                                                                             \
       
   190   /* C1 variable */                                                         \
       
   191                                                                             \
       
   192   develop(bool, C1Breakpoint, false,                                        \
       
   193           "Sets a breakpoint at entry of each compiled method")             \
       
   194                                                                             \
       
   195   develop(bool, ImplicitDiv0Checks, true,                                   \
       
   196           "Use implicit division by zero checks")                           \
       
   197                                                                             \
       
   198   develop(bool, PinAllInstructions, false,                                  \
       
   199           "All instructions are pinned")                                    \
       
   200                                                                             \
       
   201   develop(bool, ValueStackPinStackAll, true,                                \
       
   202           "Pinning in ValueStack pin everything")                           \
       
   203                                                                             \
       
   204   develop(bool, UseFastNewInstance, true,                                   \
       
   205           "Use fast inlined instance allocation")                           \
       
   206                                                                             \
       
   207   develop(bool, UseFastNewTypeArray, true,                                  \
       
   208           "Use fast inlined type array allocation")                         \
       
   209                                                                             \
       
   210   develop(bool, UseFastNewObjectArray, true,                                \
       
   211           "Use fast inlined object array allocation")                       \
       
   212                                                                             \
       
   213   develop(bool, UseFastLocking, true,                                       \
       
   214           "Use fast inlined locking code")                                  \
       
   215                                                                             \
       
   216   product(bool, FastTLABRefill, true,                                       \
       
   217           "Use fast TLAB refill code")                                      \
       
   218                                                                             \
       
   219   develop(bool, UseSlowPath, false,                                         \
       
   220           "For debugging: test slow cases by always using them")            \
       
   221                                                                             \
       
   222   develop(bool, GenerateArrayStoreCheck, true,                              \
       
   223           "Generates code for array store checks")                          \
       
   224                                                                             \
       
   225   develop(bool, DeoptC1, true,                                              \
       
   226           "Use deoptimization in C1")                                       \
       
   227                                                                             \
       
   228   develop(bool, DeoptOnAsyncException, true,                                \
       
   229           "Deoptimize upon Thread.stop(); improves precision of IR")        \
       
   230                                                                             \
       
   231   develop(bool, PrintBailouts, false,                                       \
       
   232           "Print bailout and its reason")                                   \
       
   233                                                                             \
       
   234   develop(bool, TracePatching, false,                                       \
       
   235          "Trace patching of field access on uninitialized classes")         \
       
   236                                                                             \
       
   237   develop(bool, PatchALot, false,                                           \
       
   238           "Marks all fields as having unloaded classes")                    \
       
   239                                                                             \
       
   240   develop(bool, PrintNotLoaded, false,                                      \
       
   241           "Prints where classes are not loaded during code generation")     \
       
   242                                                                             \
       
   243   notproduct(bool, VerifyOopMaps, false,                                    \
       
   244           "Adds oopmap verification code to the generated code")            \
       
   245                                                                             \
       
   246   develop(bool, PrintLIR, false,                                            \
       
   247           "print low-level IR")                                             \
       
   248                                                                             \
       
   249   develop(bool, BailoutAfterHIR, false,                                     \
       
   250           "bailout of compilation after building of HIR")                   \
       
   251                                                                             \
       
   252   develop(bool, BailoutAfterLIR, false,                                     \
       
   253           "bailout of compilation after building of LIR")                   \
       
   254                                                                             \
       
   255   develop(bool, BailoutOnExceptionHandlers, false,                          \
       
   256           "bailout of compilation for methods with exception handlers")     \
       
   257                                                                             \
       
   258   develop(bool, AlwaysEmitDebugInfo, false,                                 \
       
   259           "always emit debug info")                                         \
       
   260                                                                             \
       
   261   develop(bool, InstallMethods, true,                                       \
       
   262           "Install methods at the end of successful compilations")          \
       
   263                                                                             \
       
   264   product(intx, CompilationRepeat, 0,                                       \
       
   265           "Number of times to recompile method before returning result")    \
       
   266                                                                             \
       
   267   develop(intx, NMethodSizeLimit, (32*K)*wordSize,                          \
       
   268           "Maximum size of a compiled method.")                             \
       
   269                                                                             \
       
   270   develop(bool, TraceFPUStack, false,                                       \
       
   271           "Trace emulation of the FPU stack (intel only)")                  \
       
   272                                                                             \
       
   273   develop(bool, TraceFPURegisterUsage, false,                               \
       
   274           "Trace usage of FPU registers at start of blocks (intel only)")   \
       
   275                                                                             \
       
   276   develop(bool, OptimizeUnsafes, true,                                      \
       
   277           "Optimize raw unsafe ops")                                        \
       
   278                                                                             \
       
   279   develop(bool, PrintUnsafeOptimization, false,                             \
       
   280           "Print optimization of raw unsafe ops")                           \
       
   281                                                                             \
       
   282   develop(intx, InstructionCountCutoff, 37000,                              \
       
   283           "If GraphBuilder adds this many instructions, bails out")         \
       
   284                                                                             \
       
   285   product_pd(intx, SafepointPollOffset,                                     \
       
   286           "Offset added to polling address (Intel only)")                   \
       
   287                                                                             \
       
   288   product(bool, UseNewFeature1, false,                                      \
       
   289           "Enable new feature for testing.  This is a dummy flag.")         \
       
   290                                                                             \
       
   291   product(bool, UseNewFeature2, false,                                      \
       
   292           "Enable new feature for testing.  This is a dummy flag.")         \
       
   293                                                                             \
       
   294   product(bool, UseNewFeature3, false,                                      \
       
   295           "Enable new feature for testing.  This is a dummy flag.")         \
       
   296                                                                             \
       
   297   product(bool, UseNewFeature4, false,                                      \
       
   298           "Enable new feature for testing.  This is a dummy flag.")         \
       
   299                                                                             \
       
   300   develop(bool, ComputeExactFPURegisterUsage, true,                         \
       
   301           "Compute additional live set for fpu registers to simplify fpu stack merge (Intel only)") \
       
   302                                                                             \
       
   303   product(bool, Tier1ProfileCalls, true,                                    \
       
   304           "Profile calls when generating code for updating MDOs")           \
       
   305                                                                             \
       
   306   product(bool, Tier1ProfileVirtualCalls, true,                             \
       
   307           "Profile virtual calls when generating code for updating MDOs")   \
       
   308                                                                             \
       
   309   product(bool, Tier1ProfileInlinedCalls, true,                             \
       
   310           "Profile inlined calls when generating code for updating MDOs")   \
       
   311                                                                             \
       
   312   product(bool, Tier1ProfileBranches, true,                                 \
       
   313           "Profile branches when generating code for updating MDOs")        \
       
   314                                                                             \
       
   315   product(bool, Tier1ProfileCheckcasts, true,                               \
       
   316           "Profile checkcasts when generating code for updating MDOs")      \
       
   317                                                                             \
       
   318   product(bool, Tier1OptimizeVirtualCallProfiling, true,                    \
       
   319           "Use CHA and exact type results at call sites when updating MDOs") \
       
   320                                                                             \
       
   321   develop(bool, Tier1CountOnly, false,                                      \
       
   322           "Don't schedule tier 2 compiles. Enter VM only")                  \
       
   323                                                                             \
       
   324   develop(bool, PrintCFGToFile, false,                                      \
       
   325           "print control flow graph to a separate file during compilation") \
       
   326                                                                             \
       
   327 
       
   328 
       
   329 // Read default values for c1 globals
       
   330 // #include "incls/_c1_globals_pd.hpp.incl"
       
   331 
       
   332 C1_FLAGS(DECLARE_DEVELOPER_FLAG, DECLARE_PD_DEVELOPER_FLAG, DECLARE_PRODUCT_FLAG, DECLARE_PD_PRODUCT_FLAG, DECLARE_NOTPRODUCT_FLAG)