hotspot/src/share/vm/jvmci/jvmci_globals.hpp
author mgerdin
Tue, 19 Jan 2016 12:07:32 +0100
changeset 35900 d64cf9290fc4
parent 33160 c59f1676d27e
child 36313 e7eff81d7f1d
permissions -rw-r--r--
8148481: Devirtualize Klass::vtable Summary: Move remainder of vtable related methods to Klass Reviewed-by: cjplummer, coleenp
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
33160
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
     1
/*
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
     2
 * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
     4
 *
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
     7
 * published by the Free Software Foundation.
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
     8
 *
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    13
 * accompanied this code).
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    14
 *
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    18
 *
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    21
 * questions.
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    22
 *
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    23
 */
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    24
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    25
#ifndef SHARE_VM_JVMCI_JVMCIGLOBALS_HPP
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    26
#define SHARE_VM_JVMCI_JVMCIGLOBALS_HPP
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    27
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    28
#include "runtime/globals.hpp"
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    29
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    30
//
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    31
// Defines all global flags used by the JVMCI compiler. Only flags that need
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    32
// to be accessible to the JVMCI C++ code should be defined here. All other
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    33
// JVMCI flags should be defined in JVMCIOptions.java.
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    34
//
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    35
#define JVMCI_FLAGS(develop, develop_pd, product, product_pd, diagnostic, experimental, notproduct, range, constraint) \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    36
                                                                            \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    37
  experimental(bool, EnableJVMCI, false,                                    \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    38
          "Enable JVMCI")                                                   \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    39
                                                                            \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    40
  experimental(bool, UseJVMCICompiler, false,                               \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    41
          "Use JVMCI as the default compiler")                              \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    42
          constraint(EnableJVMCIMustBeEnabledConstraintFunc,AtParse)        \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    43
                                                                            \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    44
  experimental(bool, BootstrapJVMCI, false,                                 \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    45
          "Bootstrap JVMCI before running Java main method")                \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    46
          constraint(EnableJVMCIMustBeEnabledConstraintFunc,AtParse)        \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    47
                                                                            \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    48
  experimental(bool, PrintBootstrap, true,                                  \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    49
          "Print JVMCI bootstrap progress and summary")                     \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    50
          constraint(EnableJVMCIMustBeEnabledConstraintFunc,AtParse)        \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    51
                                                                            \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    52
  experimental(intx, JVMCIThreads, 1,                                       \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    53
          "Force number of JVMCI compiler threads to use")                  \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    54
          range(1, max_jint)                                                \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    55
          constraint(EnableJVMCIMustBeEnabledConstraintFunc,AtParse)        \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    56
                                                                            \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    57
  experimental(intx, JVMCIHostThreads, 1,                                   \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    58
          "Force number of compiler threads for JVMCI host compiler")       \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    59
          range(1, max_jint)                                                \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    60
          constraint(EnableJVMCIMustBeEnabledConstraintFunc,AtParse)        \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    61
                                                                            \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    62
  experimental(bool, CodeInstallSafepointChecks, true,                      \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    63
          "Perform explicit safepoint checks while installing code")        \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    64
          constraint(EnableJVMCIMustBeEnabledConstraintFunc,AtParse)        \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    65
                                                                            \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    66
  NOT_COMPILER2(product(intx, MaxVectorSize, 64,                            \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    67
          "Max vector size in bytes, "                                      \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    68
          "actual size could be less depending on elements type"))          \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    69
                                                                            \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    70
  NOT_COMPILER2(product(bool, ReduceInitialCardMarks, true,                 \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    71
          "Defer write barriers of young objects"))                         \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    72
                                                                            \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    73
  experimental(intx, JVMCITraceLevel, 0,                                    \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    74
          "Trace level for JVMCI: "                                         \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    75
          "1 means emit a message for each CompilerToVM call,"              \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    76
          "levels greater than 1 provide progressively greater detail")     \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    77
          constraint(EnableJVMCIMustBeEnabledConstraintFunc,AtParse)        \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    78
                                                                            \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    79
  experimental(intx, JVMCICounterSize, 0,                                   \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    80
          "Reserved size for benchmark counters")                           \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    81
          range(0, max_jint)                                                \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    82
          constraint(EnableJVMCIMustBeEnabledConstraintFunc,AtParse)        \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    83
                                                                            \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    84
  experimental(bool, JVMCICountersExcludeCompiler, true,                    \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    85
          "Exclude JVMCI compiler threads from benchmark counters")         \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    86
          constraint(EnableJVMCIMustBeEnabledConstraintFunc,AtParse)        \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    87
                                                                            \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    88
  develop(bool, JVMCIUseFastLocking, true,                                  \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    89
          "Use fast inlined locking code")                                  \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    90
          constraint(EnableJVMCIMustBeEnabledConstraintFunc,AtParse)        \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    91
                                                                            \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    92
  experimental(intx, JVMCINMethodSizeLimit, (80*K)*wordSize,                \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    93
          "Maximum size of a compiled method.")                             \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    94
          constraint(EnableJVMCIMustBeEnabledConstraintFunc,AtParse)        \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    95
                                                                            \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    96
  develop(bool, TraceUncollectedSpeculations, false,                        \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    97
          "Print message when a failed speculation was not collected")      \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    98
          constraint(EnableJVMCIMustBeEnabledConstraintFunc,AtParse)        \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    99
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
   100
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
   101
// Read default values for JVMCI globals
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
   102
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
   103
JVMCI_FLAGS(DECLARE_DEVELOPER_FLAG, \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
   104
            DECLARE_PD_DEVELOPER_FLAG, \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
   105
            DECLARE_PRODUCT_FLAG, \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
   106
            DECLARE_PD_PRODUCT_FLAG, \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
   107
            DECLARE_DIAGNOSTIC_FLAG, \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
   108
            DECLARE_EXPERIMENTAL_FLAG, \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
   109
            DECLARE_NOTPRODUCT_FLAG, \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
   110
            IGNORE_RANGE, \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
   111
            IGNORE_CONSTRAINT)
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
   112
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
   113
#endif // SHARE_VM_JVMCI_JVMCIGLOBALS_HPP