author | herrick |
Wed, 27 Mar 2019 08:27:58 -0400 | |
branch | JDK-8200758-branch |
changeset 57288 | 0be43184f52a |
parent 53244 | 9807daeb47c4 |
child 54669 | ad45b3802d4e |
permissions | -rw-r--r-- |
33160 | 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 | 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
|
20 |
* or visit www.oracle.com if you need additional information or have any |
|
21 |
* questions. |
|
22 |
* |
|
23 |
*/ |
|
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 | 27 |
|
28 |
#include "runtime/globals.hpp" |
|
29 |
||
30 |
// |
|
31 |
// 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
|
32 |
// to be accessible to the JVMCI C++ code should be defined here. |
33160 | 33 |
// |
38273
2634194d7555
8073500: Prevent certain commercial flags from being changed at runtime
gziemski
parents:
36313
diff
changeset
|
34 |
#define JVMCI_FLAGS(develop, \ |
2634194d7555
8073500: Prevent certain commercial flags from being changed at runtime
gziemski
parents:
36313
diff
changeset
|
35 |
develop_pd, \ |
2634194d7555
8073500: Prevent certain commercial flags from being changed at runtime
gziemski
parents:
36313
diff
changeset
|
36 |
product, \ |
2634194d7555
8073500: Prevent certain commercial flags from being changed at runtime
gziemski
parents:
36313
diff
changeset
|
37 |
product_pd, \ |
2634194d7555
8073500: Prevent certain commercial flags from being changed at runtime
gziemski
parents:
36313
diff
changeset
|
38 |
diagnostic, \ |
39117 | 39 |
diagnostic_pd, \ |
38273
2634194d7555
8073500: Prevent certain commercial flags from being changed at runtime
gziemski
parents:
36313
diff
changeset
|
40 |
experimental, \ |
2634194d7555
8073500: Prevent certain commercial flags from being changed at runtime
gziemski
parents:
36313
diff
changeset
|
41 |
notproduct, \ |
2634194d7555
8073500: Prevent certain commercial flags from being changed at runtime
gziemski
parents:
36313
diff
changeset
|
42 |
range, \ |
2634194d7555
8073500: Prevent certain commercial flags from being changed at runtime
gziemski
parents:
36313
diff
changeset
|
43 |
constraint, \ |
2634194d7555
8073500: Prevent certain commercial flags from being changed at runtime
gziemski
parents:
36313
diff
changeset
|
44 |
writeable) \ |
33160 | 45 |
\ |
46 |
experimental(bool, EnableJVMCI, false, \ |
|
47 |
"Enable JVMCI") \ |
|
48 |
\ |
|
49 |
experimental(bool, UseJVMCICompiler, false, \ |
|
50 |
"Use JVMCI as the default compiler") \ |
|
51 |
\ |
|
41687
6b97c4598667
8167194: [JVMCI] no reliable mechanism for querying JVMCI system properties
dnsimon
parents:
40869
diff
changeset
|
52 |
experimental(bool, JVMCIPrintProperties, false, \ |
42026
b909beeb863f
8168295: [JVMCI] -XX:+JVMCIPrintProperties should exit after printing
dnsimon
parents:
41687
diff
changeset
|
53 |
"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
|
54 |
\ |
33160 | 55 |
experimental(bool, BootstrapJVMCI, false, \ |
56 |
"Bootstrap JVMCI before running Java main method") \ |
|
57 |
\ |
|
49191
13378aa8527e
8195632: [Graal] Introduce EagerJVMCI flag to force eager JVMCI initialization
kvn
parents:
47216
diff
changeset
|
58 |
experimental(bool, EagerJVMCI, false, \ |
13378aa8527e
8195632: [Graal] Introduce EagerJVMCI flag to force eager JVMCI initialization
kvn
parents:
47216
diff
changeset
|
59 |
"Force eager JVMCI initialization") \ |
13378aa8527e
8195632: [Graal] Introduce EagerJVMCI flag to force eager JVMCI initialization
kvn
parents:
47216
diff
changeset
|
60 |
\ |
33160 | 61 |
experimental(bool, PrintBootstrap, true, \ |
62 |
"Print JVMCI bootstrap progress and summary") \ |
|
63 |
\ |
|
64 |
experimental(intx, JVMCIThreads, 1, \ |
|
65 |
"Force number of JVMCI compiler threads to use") \ |
|
66 |
range(1, max_jint) \ |
|
67 |
\ |
|
68 |
experimental(intx, JVMCIHostThreads, 1, \ |
|
69 |
"Force number of compiler threads for JVMCI host compiler") \ |
|
70 |
range(1, max_jint) \ |
|
71 |
\ |
|
72 |
NOT_COMPILER2(product(intx, MaxVectorSize, 64, \ |
|
73 |
"Max vector size in bytes, " \ |
|
74 |
"actual size could be less depending on elements type")) \ |
|
75 |
\ |
|
76 |
NOT_COMPILER2(product(bool, ReduceInitialCardMarks, true, \ |
|
77 |
"Defer write barriers of young objects")) \ |
|
78 |
\ |
|
79 |
experimental(intx, JVMCITraceLevel, 0, \ |
|
80 |
"Trace level for JVMCI: " \ |
|
81 |
"1 means emit a message for each CompilerToVM call," \ |
|
82 |
"levels greater than 1 provide progressively greater detail") \ |
|
83 |
\ |
|
84 |
experimental(intx, JVMCICounterSize, 0, \ |
|
85 |
"Reserved size for benchmark counters") \ |
|
86 |
range(0, max_jint) \ |
|
87 |
\ |
|
88 |
experimental(bool, JVMCICountersExcludeCompiler, true, \ |
|
89 |
"Exclude JVMCI compiler threads from benchmark counters") \ |
|
90 |
\ |
|
91 |
develop(bool, JVMCIUseFastLocking, true, \ |
|
92 |
"Use fast inlined locking code") \ |
|
93 |
\ |
|
94 |
experimental(intx, JVMCINMethodSizeLimit, (80*K)*wordSize, \ |
|
95 |
"Maximum size of a compiled method.") \ |
|
96 |
\ |
|
40869
2f53be0a45ee
8163864: [JVMCI] move MethodProfileWidth to jvmci_globals.hpp
dnsimon
parents:
40081
diff
changeset
|
97 |
experimental(intx, MethodProfileWidth, 0, \ |
2f53be0a45ee
8163864: [JVMCI] move MethodProfileWidth to jvmci_globals.hpp
dnsimon
parents:
40081
diff
changeset
|
98 |
"Number of methods to record in call profile") \ |
2f53be0a45ee
8163864: [JVMCI] move MethodProfileWidth to jvmci_globals.hpp
dnsimon
parents:
40081
diff
changeset
|
99 |
\ |
33160 | 100 |
develop(bool, TraceUncollectedSpeculations, false, \ |
52609
83b1d9797b20
8191339: [JVMCI] BigInteger compiler intrinsics on Graal
phedlin
parents:
50589
diff
changeset
|
101 |
"Print message when a failed speculation was not collected") \ |
83b1d9797b20
8191339: [JVMCI] BigInteger compiler intrinsics on Graal
phedlin
parents:
50589
diff
changeset
|
102 |
\ |
83b1d9797b20
8191339: [JVMCI] BigInteger compiler intrinsics on Graal
phedlin
parents:
50589
diff
changeset
|
103 |
NOT_COMPILER2(diagnostic(bool, UseMultiplyToLenIntrinsic, false, \ |
83b1d9797b20
8191339: [JVMCI] BigInteger compiler intrinsics on Graal
phedlin
parents:
50589
diff
changeset
|
104 |
"Enables intrinsification of BigInteger.multiplyToLen()")) \ |
83b1d9797b20
8191339: [JVMCI] BigInteger compiler intrinsics on Graal
phedlin
parents:
50589
diff
changeset
|
105 |
\ |
83b1d9797b20
8191339: [JVMCI] BigInteger compiler intrinsics on Graal
phedlin
parents:
50589
diff
changeset
|
106 |
NOT_COMPILER2(diagnostic(bool, UseSquareToLenIntrinsic, false, \ |
83b1d9797b20
8191339: [JVMCI] BigInteger compiler intrinsics on Graal
phedlin
parents:
50589
diff
changeset
|
107 |
"Enables intrinsification of BigInteger.squareToLen()")) \ |
83b1d9797b20
8191339: [JVMCI] BigInteger compiler intrinsics on Graal
phedlin
parents:
50589
diff
changeset
|
108 |
\ |
83b1d9797b20
8191339: [JVMCI] BigInteger compiler intrinsics on Graal
phedlin
parents:
50589
diff
changeset
|
109 |
NOT_COMPILER2(diagnostic(bool, UseMulAddIntrinsic, false, \ |
83b1d9797b20
8191339: [JVMCI] BigInteger compiler intrinsics on Graal
phedlin
parents:
50589
diff
changeset
|
110 |
"Enables intrinsification of BigInteger.mulAdd()")) \ |
83b1d9797b20
8191339: [JVMCI] BigInteger compiler intrinsics on Graal
phedlin
parents:
50589
diff
changeset
|
111 |
\ |
83b1d9797b20
8191339: [JVMCI] BigInteger compiler intrinsics on Graal
phedlin
parents:
50589
diff
changeset
|
112 |
NOT_COMPILER2(diagnostic(bool, UseMontgomeryMultiplyIntrinsic, false, \ |
83b1d9797b20
8191339: [JVMCI] BigInteger compiler intrinsics on Graal
phedlin
parents:
50589
diff
changeset
|
113 |
"Enables intrinsification of BigInteger.montgomeryMultiply()")) \ |
83b1d9797b20
8191339: [JVMCI] BigInteger compiler intrinsics on Graal
phedlin
parents:
50589
diff
changeset
|
114 |
\ |
83b1d9797b20
8191339: [JVMCI] BigInteger compiler intrinsics on Graal
phedlin
parents:
50589
diff
changeset
|
115 |
NOT_COMPILER2(diagnostic(bool, UseMontgomerySquareIntrinsic, false, \ |
83b1d9797b20
8191339: [JVMCI] BigInteger compiler intrinsics on Graal
phedlin
parents:
50589
diff
changeset
|
116 |
"Enables intrinsification of BigInteger.montgomerySquare()")) |
33160 | 117 |
|
118 |
||
119 |
// Read default values for JVMCI globals |
|
120 |
||
121 |
JVMCI_FLAGS(DECLARE_DEVELOPER_FLAG, \ |
|
122 |
DECLARE_PD_DEVELOPER_FLAG, \ |
|
123 |
DECLARE_PRODUCT_FLAG, \ |
|
124 |
DECLARE_PD_PRODUCT_FLAG, \ |
|
125 |
DECLARE_DIAGNOSTIC_FLAG, \ |
|
39117 | 126 |
DECLARE_PD_DIAGNOSTIC_FLAG, \ |
33160 | 127 |
DECLARE_EXPERIMENTAL_FLAG, \ |
128 |
DECLARE_NOTPRODUCT_FLAG, \ |
|
129 |
IGNORE_RANGE, \ |
|
38273
2634194d7555
8073500: Prevent certain commercial flags from being changed at runtime
gziemski
parents:
36313
diff
changeset
|
130 |
IGNORE_CONSTRAINT, \ |
2634194d7555
8073500: Prevent certain commercial flags from being changed at runtime
gziemski
parents:
36313
diff
changeset
|
131 |
IGNORE_WRITEABLE) |
33160 | 132 |
|
36313
e7eff81d7f1d
8145333: -XX:+EnableJVMCI -XX:+UseJVMCICompiler -XX:-EnableJVMCI makes JVM crash
jcm
parents:
33160
diff
changeset
|
133 |
class JVMCIGlobals { |
e7eff81d7f1d
8145333: -XX:+EnableJVMCI -XX:+UseJVMCICompiler -XX:-EnableJVMCI makes JVM crash
jcm
parents:
33160
diff
changeset
|
134 |
public: |
40081
50be9fe0e9c2
8161265: [JVMCI] EnableJVMCI should only be required when its not implied by other flags
dnsimon
parents:
39117
diff
changeset
|
135 |
// Return true if jvmci flags are consistent. If not consistent, |
50be9fe0e9c2
8161265: [JVMCI] EnableJVMCI should only be required when its not implied by other flags
dnsimon
parents:
39117
diff
changeset
|
136 |
// 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
|
137 |
// returning false. |
36313
e7eff81d7f1d
8145333: -XX:+EnableJVMCI -XX:+UseJVMCICompiler -XX:-EnableJVMCI makes JVM crash
jcm
parents:
33160
diff
changeset
|
138 |
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
|
139 |
|
e5d741569070
8184349: There should be some verification that EnableJVMCI is disabled if a GC not supporting JVMCI is selected
kvn
parents:
49191
diff
changeset
|
140 |
// 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
|
141 |
static void check_jvmci_supported_gc(); |
36313
e7eff81d7f1d
8145333: -XX:+EnableJVMCI -XX:+UseJVMCICompiler -XX:-EnableJVMCI makes JVM crash
jcm
parents:
33160
diff
changeset
|
142 |
}; |
53244
9807daeb47c4
8216167: Update include guards to reflect correct directories
coleenp
parents:
52609
diff
changeset
|
143 |
#endif // SHARE_JVMCI_JVMCI_GLOBALS_HPP |