src/hotspot/share/jvmci/jvmci_globals.hpp
author bobv
Mon, 28 Oct 2019 16:06:08 +0000
changeset 58821 5ec8aeda451e
parent 54982 b18c8301b8c2
child 59023 f0dca628176c
permissions -rw-r--r--
8232118: Add JVM option to enable JVMCI compilers in product mode Reviewed-by: kvn, dholmes
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
/*
53244
9807daeb47c4 8216167: Update include guards to reflect correct directories
coleenp
parents: 52609
diff changeset
     2
 * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
33160
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
53244
9807daeb47c4 8216167: Update include guards to reflect correct directories
coleenp
parents: 52609
diff changeset
    25
#ifndef SHARE_JVMCI_JVMCI_GLOBALS_HPP
9807daeb47c4 8216167: Update include guards to reflect correct directories
coleenp
parents: 52609
diff changeset
    26
#define SHARE_JVMCI_JVMCI_GLOBALS_HPP
33160
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    27
58821
5ec8aeda451e 8232118: Add JVM option to enable JVMCI compilers in product mode
bobv
parents: 54982
diff changeset
    28
#include "runtime/flags/jvmFlag.hpp"
5ec8aeda451e 8232118: Add JVM option to enable JVMCI compilers in product mode
bobv
parents: 54982
diff changeset
    29
54982
b18c8301b8c2 8224201: Simplify JVM flag macro expansions
stefank
parents: 54732
diff changeset
    30
class fileStream;
33160
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    31
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    32
//
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    33
// Defines all global flags used by the JVMCI compiler. Only flags that need
40081
50be9fe0e9c2 8161265: [JVMCI] EnableJVMCI should only be required when its not implied by other flags
dnsimon
parents: 39117
diff changeset
    34
// to be accessible to the JVMCI C++ code should be defined here.
33160
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    35
//
38273
2634194d7555 8073500: Prevent certain commercial flags from being changed at runtime
gziemski
parents: 36313
diff changeset
    36
#define JVMCI_FLAGS(develop, \
2634194d7555 8073500: Prevent certain commercial flags from being changed at runtime
gziemski
parents: 36313
diff changeset
    37
                    develop_pd, \
2634194d7555 8073500: Prevent certain commercial flags from being changed at runtime
gziemski
parents: 36313
diff changeset
    38
                    product, \
2634194d7555 8073500: Prevent certain commercial flags from being changed at runtime
gziemski
parents: 36313
diff changeset
    39
                    product_pd, \
2634194d7555 8073500: Prevent certain commercial flags from being changed at runtime
gziemski
parents: 36313
diff changeset
    40
                    diagnostic, \
39117
59fa99a45873 8150900: Implement diagnostic_pd
csahu
parents: 38273
diff changeset
    41
                    diagnostic_pd, \
38273
2634194d7555 8073500: Prevent certain commercial flags from being changed at runtime
gziemski
parents: 36313
diff changeset
    42
                    experimental, \
2634194d7555 8073500: Prevent certain commercial flags from being changed at runtime
gziemski
parents: 36313
diff changeset
    43
                    notproduct, \
2634194d7555 8073500: Prevent certain commercial flags from being changed at runtime
gziemski
parents: 36313
diff changeset
    44
                    range, \
2634194d7555 8073500: Prevent certain commercial flags from being changed at runtime
gziemski
parents: 36313
diff changeset
    45
                    constraint, \
2634194d7555 8073500: Prevent certain commercial flags from being changed at runtime
gziemski
parents: 36313
diff changeset
    46
                    writeable) \
33160
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, EnableJVMCI, false,                                    \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    49
          "Enable JVMCI")                                                   \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    50
                                                                            \
58821
5ec8aeda451e 8232118: Add JVM option to enable JVMCI compilers in product mode
bobv
parents: 54982
diff changeset
    51
  experimental(bool, EnableJVMCIProduct, false,                             \
5ec8aeda451e 8232118: Add JVM option to enable JVMCI compilers in product mode
bobv
parents: 54982
diff changeset
    52
          "Allow JVMCI to be used in product mode")                         \
5ec8aeda451e 8232118: Add JVM option to enable JVMCI compilers in product mode
bobv
parents: 54982
diff changeset
    53
                                                                            \
33160
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    54
  experimental(bool, UseJVMCICompiler, false,                               \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    55
          "Use JVMCI as the default compiler")                              \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    56
                                                                            \
41687
6b97c4598667 8167194: [JVMCI] no reliable mechanism for querying JVMCI system properties
dnsimon
parents: 40869
diff changeset
    57
  experimental(bool, JVMCIPrintProperties, false,                           \
42026
b909beeb863f 8168295: [JVMCI] -XX:+JVMCIPrintProperties should exit after printing
dnsimon
parents: 41687
diff changeset
    58
          "Prints properties used by the JVMCI compiler and exits")         \
41687
6b97c4598667 8167194: [JVMCI] no reliable mechanism for querying JVMCI system properties
dnsimon
parents: 40869
diff changeset
    59
                                                                            \
33160
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    60
  experimental(bool, BootstrapJVMCI, false,                                 \
54732
2d012a75d35c 8223332: Update JVMCI
kvn
parents: 54669
diff changeset
    61
          "Bootstrap JVMCI before running Java main method. This "          \
2d012a75d35c 8223332: Update JVMCI
kvn
parents: 54669
diff changeset
    62
          "initializes the compile queue with a small set of methods "      \
2d012a75d35c 8223332: Update JVMCI
kvn
parents: 54669
diff changeset
    63
          "and processes the queue until it is empty. Combining this with " \
2d012a75d35c 8223332: Update JVMCI
kvn
parents: 54669
diff changeset
    64
          "-XX:-TieredCompilation makes JVMCI compile more of itself.")     \
33160
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    65
                                                                            \
49191
13378aa8527e 8195632: [Graal] Introduce EagerJVMCI flag to force eager JVMCI initialization
kvn
parents: 47216
diff changeset
    66
  experimental(bool, EagerJVMCI, false,                                     \
13378aa8527e 8195632: [Graal] Introduce EagerJVMCI flag to force eager JVMCI initialization
kvn
parents: 47216
diff changeset
    67
          "Force eager JVMCI initialization")                               \
13378aa8527e 8195632: [Graal] Introduce EagerJVMCI flag to force eager JVMCI initialization
kvn
parents: 47216
diff changeset
    68
                                                                            \
33160
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    69
  experimental(bool, PrintBootstrap, true,                                  \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    70
          "Print JVMCI bootstrap progress and summary")                     \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    71
                                                                            \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    72
  experimental(intx, JVMCIThreads, 1,                                       \
54669
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53244
diff changeset
    73
          "Force number of JVMCI compiler threads to use. Ignored if "      \
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53244
diff changeset
    74
          "UseJVMCICompiler is false.")                                     \
33160
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    75
          range(1, max_jint)                                                \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    76
                                                                            \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    77
  experimental(intx, JVMCIHostThreads, 1,                                   \
54669
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53244
diff changeset
    78
          "Force number of C1 compiler threads. Ignored if "                \
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53244
diff changeset
    79
          "UseJVMCICompiler is false.")                                     \
33160
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    80
          range(1, max_jint)                                                \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    81
                                                                            \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    82
  NOT_COMPILER2(product(intx, MaxVectorSize, 64,                            \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    83
          "Max vector size in bytes, "                                      \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    84
          "actual size could be less depending on elements type"))          \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    85
                                                                            \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    86
  NOT_COMPILER2(product(bool, ReduceInitialCardMarks, true,                 \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    87
          "Defer write barriers of young objects"))                         \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    88
                                                                            \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    89
  experimental(intx, JVMCITraceLevel, 0,                                    \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    90
          "Trace level for JVMCI: "                                         \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    91
          "1 means emit a message for each CompilerToVM call,"              \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    92
          "levels greater than 1 provide progressively greater detail")     \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    93
                                                                            \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    94
  experimental(intx, JVMCICounterSize, 0,                                   \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    95
          "Reserved size for benchmark counters")                           \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    96
          range(0, max_jint)                                                \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    97
                                                                            \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    98
  experimental(bool, JVMCICountersExcludeCompiler, true,                    \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    99
          "Exclude JVMCI compiler threads from benchmark counters")         \
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
  develop(bool, JVMCIUseFastLocking, true,                                  \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
   102
          "Use fast inlined locking code")                                  \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
   103
                                                                            \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
   104
  experimental(intx, JVMCINMethodSizeLimit, (80*K)*wordSize,                \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
   105
          "Maximum size of a compiled method.")                             \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
   106
                                                                            \
40869
2f53be0a45ee 8163864: [JVMCI] move MethodProfileWidth to jvmci_globals.hpp
dnsimon
parents: 40081
diff changeset
   107
  experimental(intx, MethodProfileWidth, 0,                                 \
2f53be0a45ee 8163864: [JVMCI] move MethodProfileWidth to jvmci_globals.hpp
dnsimon
parents: 40081
diff changeset
   108
          "Number of methods to record in call profile")                    \
2f53be0a45ee 8163864: [JVMCI] move MethodProfileWidth to jvmci_globals.hpp
dnsimon
parents: 40081
diff changeset
   109
                                                                            \
54669
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53244
diff changeset
   110
  experimental(ccstr, JVMCILibPath, NULL,                                   \
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53244
diff changeset
   111
          "LD path for loading the JVMCI shared library")                   \
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53244
diff changeset
   112
                                                                            \
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53244
diff changeset
   113
  experimental(ccstr, JVMCILibDumpJNIConfig, NULL,                          \
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53244
diff changeset
   114
          "Dumps to the given file a description of the classes, fields "   \
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53244
diff changeset
   115
          "and methods the JVMCI shared library must provide")              \
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53244
diff changeset
   116
                                                                            \
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53244
diff changeset
   117
  experimental(bool, UseJVMCINativeLibrary, false,                          \
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53244
diff changeset
   118
          "Execute JVMCI Java code from a shared library "                  \
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53244
diff changeset
   119
          "instead of loading it from class files and executing it "        \
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53244
diff changeset
   120
          "on the HotSpot heap")                                            \
52609
83b1d9797b20 8191339: [JVMCI] BigInteger compiler intrinsics on Graal
phedlin
parents: 50589
diff changeset
   121
                                                                            \
83b1d9797b20 8191339: [JVMCI] BigInteger compiler intrinsics on Graal
phedlin
parents: 50589
diff changeset
   122
  NOT_COMPILER2(diagnostic(bool, UseMultiplyToLenIntrinsic, false,          \
83b1d9797b20 8191339: [JVMCI] BigInteger compiler intrinsics on Graal
phedlin
parents: 50589
diff changeset
   123
          "Enables intrinsification of BigInteger.multiplyToLen()"))        \
83b1d9797b20 8191339: [JVMCI] BigInteger compiler intrinsics on Graal
phedlin
parents: 50589
diff changeset
   124
                                                                            \
83b1d9797b20 8191339: [JVMCI] BigInteger compiler intrinsics on Graal
phedlin
parents: 50589
diff changeset
   125
  NOT_COMPILER2(diagnostic(bool, UseSquareToLenIntrinsic, false,            \
83b1d9797b20 8191339: [JVMCI] BigInteger compiler intrinsics on Graal
phedlin
parents: 50589
diff changeset
   126
          "Enables intrinsification of BigInteger.squareToLen()"))          \
83b1d9797b20 8191339: [JVMCI] BigInteger compiler intrinsics on Graal
phedlin
parents: 50589
diff changeset
   127
                                                                            \
83b1d9797b20 8191339: [JVMCI] BigInteger compiler intrinsics on Graal
phedlin
parents: 50589
diff changeset
   128
  NOT_COMPILER2(diagnostic(bool, UseMulAddIntrinsic, false,                 \
83b1d9797b20 8191339: [JVMCI] BigInteger compiler intrinsics on Graal
phedlin
parents: 50589
diff changeset
   129
          "Enables intrinsification of BigInteger.mulAdd()"))               \
83b1d9797b20 8191339: [JVMCI] BigInteger compiler intrinsics on Graal
phedlin
parents: 50589
diff changeset
   130
                                                                            \
83b1d9797b20 8191339: [JVMCI] BigInteger compiler intrinsics on Graal
phedlin
parents: 50589
diff changeset
   131
  NOT_COMPILER2(diagnostic(bool, UseMontgomeryMultiplyIntrinsic, false,     \
83b1d9797b20 8191339: [JVMCI] BigInteger compiler intrinsics on Graal
phedlin
parents: 50589
diff changeset
   132
          "Enables intrinsification of BigInteger.montgomeryMultiply()"))   \
83b1d9797b20 8191339: [JVMCI] BigInteger compiler intrinsics on Graal
phedlin
parents: 50589
diff changeset
   133
                                                                            \
83b1d9797b20 8191339: [JVMCI] BigInteger compiler intrinsics on Graal
phedlin
parents: 50589
diff changeset
   134
  NOT_COMPILER2(diagnostic(bool, UseMontgomerySquareIntrinsic, false,       \
83b1d9797b20 8191339: [JVMCI] BigInteger compiler intrinsics on Graal
phedlin
parents: 50589
diff changeset
   135
          "Enables intrinsification of BigInteger.montgomerySquare()"))
33160
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
   136
54669
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53244
diff changeset
   137
// The base name for the shared library containing the JVMCI based compiler
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53244
diff changeset
   138
#define JVMCI_SHARED_LIBRARY_NAME "jvmcicompiler"
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53244
diff changeset
   139
36313
e7eff81d7f1d 8145333: -XX:+EnableJVMCI -XX:+UseJVMCICompiler -XX:-EnableJVMCI makes JVM crash
jcm
parents: 33160
diff changeset
   140
class JVMCIGlobals {
54669
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53244
diff changeset
   141
 private:
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53244
diff changeset
   142
  static fileStream* _jni_config_file;
36313
e7eff81d7f1d 8145333: -XX:+EnableJVMCI -XX:+UseJVMCICompiler -XX:-EnableJVMCI makes JVM crash
jcm
parents: 33160
diff changeset
   143
 public:
54669
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53244
diff changeset
   144
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53244
diff changeset
   145
  // Returns true if jvmci flags are consistent. If not consistent,
40081
50be9fe0e9c2 8161265: [JVMCI] EnableJVMCI should only be required when its not implied by other flags
dnsimon
parents: 39117
diff changeset
   146
  // an error message describing the inconsistency is printed before
50be9fe0e9c2 8161265: [JVMCI] EnableJVMCI should only be required when its not implied by other flags
dnsimon
parents: 39117
diff changeset
   147
  // returning false.
36313
e7eff81d7f1d 8145333: -XX:+EnableJVMCI -XX:+UseJVMCICompiler -XX:-EnableJVMCI makes JVM crash
jcm
parents: 33160
diff changeset
   148
  static bool check_jvmci_flags_are_consistent();
50589
e5d741569070 8184349: There should be some verification that EnableJVMCI is disabled if a GC not supporting JVMCI is selected
kvn
parents: 49191
diff changeset
   149
58821
5ec8aeda451e 8232118: Add JVM option to enable JVMCI compilers in product mode
bobv
parents: 54982
diff changeset
   150
  // Convert JVMCI experimental flags to product
5ec8aeda451e 8232118: Add JVM option to enable JVMCI compilers in product mode
bobv
parents: 54982
diff changeset
   151
  static bool enable_jvmci_product_mode(JVMFlag::Flags);
5ec8aeda451e 8232118: Add JVM option to enable JVMCI compilers in product mode
bobv
parents: 54982
diff changeset
   152
50589
e5d741569070 8184349: There should be some verification that EnableJVMCI is disabled if a GC not supporting JVMCI is selected
kvn
parents: 49191
diff changeset
   153
  // Check and exit VM with error if selected GC is not supported by JVMCI.
e5d741569070 8184349: There should be some verification that EnableJVMCI is disabled if a GC not supporting JVMCI is selected
kvn
parents: 49191
diff changeset
   154
  static void check_jvmci_supported_gc();
54669
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53244
diff changeset
   155
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53244
diff changeset
   156
  static fileStream* get_jni_config_file() { return _jni_config_file; }
36313
e7eff81d7f1d 8145333: -XX:+EnableJVMCI -XX:+UseJVMCICompiler -XX:-EnableJVMCI makes JVM crash
jcm
parents: 33160
diff changeset
   157
};
53244
9807daeb47c4 8216167: Update include guards to reflect correct directories
coleenp
parents: 52609
diff changeset
   158
#endif // SHARE_JVMCI_JVMCI_GLOBALS_HPP