author | gziemski |
Tue, 10 May 2016 12:10:21 -0500 | |
changeset 38273 | 2634194d7555 |
parent 36313 | e7eff81d7f1d |
child 39117 | 59fa99a45873 |
permissions | -rw-r--r-- |
33160 | 1 |
/* |
38273
2634194d7555
8073500: Prevent certain commercial flags from being changed at runtime
gziemski
parents:
36313
diff
changeset
|
2 |
* Copyright (c) 2000, 2016, 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 |
||
25 |
#ifndef SHARE_VM_JVMCI_JVMCIGLOBALS_HPP |
|
26 |
#define SHARE_VM_JVMCI_JVMCIGLOBALS_HPP |
|
27 |
||
28 |
#include "runtime/globals.hpp" |
|
29 |
||
30 |
// |
|
31 |
// Defines all global flags used by the JVMCI compiler. Only flags that need |
|
32 |
// to be accessible to the JVMCI C++ code should be defined here. All other |
|
33 |
// JVMCI flags should be defined in JVMCIOptions.java. |
|
34 |
// |
|
38273
2634194d7555
8073500: Prevent certain commercial flags from being changed at runtime
gziemski
parents:
36313
diff
changeset
|
35 |
#define JVMCI_FLAGS(develop, \ |
2634194d7555
8073500: Prevent certain commercial flags from being changed at runtime
gziemski
parents:
36313
diff
changeset
|
36 |
develop_pd, \ |
2634194d7555
8073500: Prevent certain commercial flags from being changed at runtime
gziemski
parents:
36313
diff
changeset
|
37 |
product, \ |
2634194d7555
8073500: Prevent certain commercial flags from being changed at runtime
gziemski
parents:
36313
diff
changeset
|
38 |
product_pd, \ |
2634194d7555
8073500: Prevent certain commercial flags from being changed at runtime
gziemski
parents:
36313
diff
changeset
|
39 |
diagnostic, \ |
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 |
\ |
|
52 |
experimental(bool, BootstrapJVMCI, false, \ |
|
53 |
"Bootstrap JVMCI before running Java main method") \ |
|
54 |
\ |
|
55 |
experimental(bool, PrintBootstrap, true, \ |
|
56 |
"Print JVMCI bootstrap progress and summary") \ |
|
57 |
\ |
|
58 |
experimental(intx, JVMCIThreads, 1, \ |
|
59 |
"Force number of JVMCI compiler threads to use") \ |
|
60 |
range(1, max_jint) \ |
|
61 |
\ |
|
62 |
experimental(intx, JVMCIHostThreads, 1, \ |
|
63 |
"Force number of compiler threads for JVMCI host compiler") \ |
|
64 |
range(1, max_jint) \ |
|
65 |
\ |
|
66 |
experimental(bool, CodeInstallSafepointChecks, true, \ |
|
67 |
"Perform explicit safepoint checks while installing code") \ |
|
68 |
\ |
|
69 |
NOT_COMPILER2(product(intx, MaxVectorSize, 64, \ |
|
70 |
"Max vector size in bytes, " \ |
|
71 |
"actual size could be less depending on elements type")) \ |
|
72 |
\ |
|
73 |
NOT_COMPILER2(product(bool, ReduceInitialCardMarks, true, \ |
|
74 |
"Defer write barriers of young objects")) \ |
|
75 |
\ |
|
76 |
experimental(intx, JVMCITraceLevel, 0, \ |
|
77 |
"Trace level for JVMCI: " \ |
|
78 |
"1 means emit a message for each CompilerToVM call," \ |
|
79 |
"levels greater than 1 provide progressively greater detail") \ |
|
80 |
\ |
|
81 |
experimental(intx, JVMCICounterSize, 0, \ |
|
82 |
"Reserved size for benchmark counters") \ |
|
83 |
range(0, max_jint) \ |
|
84 |
\ |
|
85 |
experimental(bool, JVMCICountersExcludeCompiler, true, \ |
|
86 |
"Exclude JVMCI compiler threads from benchmark counters") \ |
|
87 |
\ |
|
88 |
develop(bool, JVMCIUseFastLocking, true, \ |
|
89 |
"Use fast inlined locking code") \ |
|
90 |
\ |
|
91 |
experimental(intx, JVMCINMethodSizeLimit, (80*K)*wordSize, \ |
|
92 |
"Maximum size of a compiled method.") \ |
|
93 |
\ |
|
94 |
develop(bool, TraceUncollectedSpeculations, false, \ |
|
36313
e7eff81d7f1d
8145333: -XX:+EnableJVMCI -XX:+UseJVMCICompiler -XX:-EnableJVMCI makes JVM crash
jcm
parents:
33160
diff
changeset
|
95 |
"Print message when a failed speculation was not collected") |
33160 | 96 |
|
97 |
||
98 |
// Read default values for JVMCI globals |
|
99 |
||
100 |
JVMCI_FLAGS(DECLARE_DEVELOPER_FLAG, \ |
|
101 |
DECLARE_PD_DEVELOPER_FLAG, \ |
|
102 |
DECLARE_PRODUCT_FLAG, \ |
|
103 |
DECLARE_PD_PRODUCT_FLAG, \ |
|
104 |
DECLARE_DIAGNOSTIC_FLAG, \ |
|
105 |
DECLARE_EXPERIMENTAL_FLAG, \ |
|
106 |
DECLARE_NOTPRODUCT_FLAG, \ |
|
107 |
IGNORE_RANGE, \ |
|
38273
2634194d7555
8073500: Prevent certain commercial flags from being changed at runtime
gziemski
parents:
36313
diff
changeset
|
108 |
IGNORE_CONSTRAINT, \ |
2634194d7555
8073500: Prevent certain commercial flags from being changed at runtime
gziemski
parents:
36313
diff
changeset
|
109 |
IGNORE_WRITEABLE) |
33160 | 110 |
|
36313
e7eff81d7f1d
8145333: -XX:+EnableJVMCI -XX:+UseJVMCICompiler -XX:-EnableJVMCI makes JVM crash
jcm
parents:
33160
diff
changeset
|
111 |
class JVMCIGlobals { |
e7eff81d7f1d
8145333: -XX:+EnableJVMCI -XX:+UseJVMCICompiler -XX:-EnableJVMCI makes JVM crash
jcm
parents:
33160
diff
changeset
|
112 |
public: |
e7eff81d7f1d
8145333: -XX:+EnableJVMCI -XX:+UseJVMCICompiler -XX:-EnableJVMCI makes JVM crash
jcm
parents:
33160
diff
changeset
|
113 |
// Return true if jvmci flags are consistent. |
e7eff81d7f1d
8145333: -XX:+EnableJVMCI -XX:+UseJVMCICompiler -XX:-EnableJVMCI makes JVM crash
jcm
parents:
33160
diff
changeset
|
114 |
static bool check_jvmci_flags_are_consistent(); |
e7eff81d7f1d
8145333: -XX:+EnableJVMCI -XX:+UseJVMCICompiler -XX:-EnableJVMCI makes JVM crash
jcm
parents:
33160
diff
changeset
|
115 |
// Print jvmci arguments inconsistency error message. |
e7eff81d7f1d
8145333: -XX:+EnableJVMCI -XX:+UseJVMCICompiler -XX:-EnableJVMCI makes JVM crash
jcm
parents:
33160
diff
changeset
|
116 |
static void print_jvmci_args_inconsistency_error_message(); |
e7eff81d7f1d
8145333: -XX:+EnableJVMCI -XX:+UseJVMCICompiler -XX:-EnableJVMCI makes JVM crash
jcm
parents:
33160
diff
changeset
|
117 |
}; |
33160 | 118 |
#endif // SHARE_VM_JVMCI_JVMCIGLOBALS_HPP |