Mercurial > hg > graal-jvmci-8
annotate src/share/vm/jvmci/jvmci_globals.cpp @ 24234:ea6f94ab283b default tip
Added tag jvmci-0.36 for changeset 8128b98d4736
author | Gilles Duboscq <gilles.m.duboscq@oracle.com> |
---|---|
date | Mon, 18 Sep 2017 18:49:45 +0200 |
parents | 67afd64bc794 |
children |
rev | line source |
---|---|
7125
1baf7f1e3f23
decoupled C++ Graal runtime from C1
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
1 /* |
1baf7f1e3f23
decoupled C++ Graal runtime from C1
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
2 * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. |
1baf7f1e3f23
decoupled C++ Graal runtime from C1
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
1baf7f1e3f23
decoupled C++ Graal runtime from C1
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
4 * |
1baf7f1e3f23
decoupled C++ Graal runtime from C1
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
5 * This code is free software; you can redistribute it and/or modify it |
1baf7f1e3f23
decoupled C++ Graal runtime from C1
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
6 * under the terms of the GNU General Public License version 2 only, as |
1baf7f1e3f23
decoupled C++ Graal runtime from C1
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
7 * published by the Free Software Foundation. |
1baf7f1e3f23
decoupled C++ Graal runtime from C1
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
8 * |
1baf7f1e3f23
decoupled C++ Graal runtime from C1
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
1baf7f1e3f23
decoupled C++ Graal runtime from C1
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
1baf7f1e3f23
decoupled C++ Graal runtime from C1
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
1baf7f1e3f23
decoupled C++ Graal runtime from C1
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
1baf7f1e3f23
decoupled C++ Graal runtime from C1
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
13 * accompanied this code). |
1baf7f1e3f23
decoupled C++ Graal runtime from C1
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
14 * |
1baf7f1e3f23
decoupled C++ Graal runtime from C1
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
15 * You should have received a copy of the GNU General Public License version |
1baf7f1e3f23
decoupled C++ Graal runtime from C1
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
1baf7f1e3f23
decoupled C++ Graal runtime from C1
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
1baf7f1e3f23
decoupled C++ Graal runtime from C1
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
18 * |
1baf7f1e3f23
decoupled C++ Graal runtime from C1
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
1baf7f1e3f23
decoupled C++ Graal runtime from C1
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
1baf7f1e3f23
decoupled C++ Graal runtime from C1
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
21 * questions. |
1baf7f1e3f23
decoupled C++ Graal runtime from C1
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
22 * |
1baf7f1e3f23
decoupled C++ Graal runtime from C1
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
23 */ |
1baf7f1e3f23
decoupled C++ Graal runtime from C1
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
24 |
1baf7f1e3f23
decoupled C++ Graal runtime from C1
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
25 #include "precompiled.hpp" |
22495
740feb10d15a
rename jvmciGlobals to be consistent with c1_globals and c2_globals
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
21559
diff
changeset
|
26 #include "jvmci/jvmci_globals.hpp" |
23760
655fd63024d0
move jvmci flag handling to JVMCIGlobals
David Leopoldseder <david.d.leopoldseder@oracle.com>
parents:
22495
diff
changeset
|
27 #include "utilities/defaultStream.hpp" |
655fd63024d0
move jvmci flag handling to JVMCIGlobals
David Leopoldseder <david.d.leopoldseder@oracle.com>
parents:
22495
diff
changeset
|
28 #include "runtime/globals_extension.hpp" |
24143
15ab3e226b0d
set +UseJVMCICompiler ergonomically if jvmci.class.path.append is defined or there is at least one jar file in jre/lib/jvmci apart from the JVMCI API jars
Doug Simon <doug.simon@oracle.com>
parents:
23783
diff
changeset
|
29 #include "runtime/arguments.hpp" |
15ab3e226b0d
set +UseJVMCICompiler ergonomically if jvmci.class.path.append is defined or there is at least one jar file in jre/lib/jvmci apart from the JVMCI API jars
Doug Simon <doug.simon@oracle.com>
parents:
23783
diff
changeset
|
30 #ifdef TARGET_OS_FAMILY_linux |
15ab3e226b0d
set +UseJVMCICompiler ergonomically if jvmci.class.path.append is defined or there is at least one jar file in jre/lib/jvmci apart from the JVMCI API jars
Doug Simon <doug.simon@oracle.com>
parents:
23783
diff
changeset
|
31 # include "os_linux.inline.hpp" |
15ab3e226b0d
set +UseJVMCICompiler ergonomically if jvmci.class.path.append is defined or there is at least one jar file in jre/lib/jvmci apart from the JVMCI API jars
Doug Simon <doug.simon@oracle.com>
parents:
23783
diff
changeset
|
32 #endif |
15ab3e226b0d
set +UseJVMCICompiler ergonomically if jvmci.class.path.append is defined or there is at least one jar file in jre/lib/jvmci apart from the JVMCI API jars
Doug Simon <doug.simon@oracle.com>
parents:
23783
diff
changeset
|
33 #ifdef TARGET_OS_FAMILY_solaris |
15ab3e226b0d
set +UseJVMCICompiler ergonomically if jvmci.class.path.append is defined or there is at least one jar file in jre/lib/jvmci apart from the JVMCI API jars
Doug Simon <doug.simon@oracle.com>
parents:
23783
diff
changeset
|
34 # include "os_solaris.inline.hpp" |
15ab3e226b0d
set +UseJVMCICompiler ergonomically if jvmci.class.path.append is defined or there is at least one jar file in jre/lib/jvmci apart from the JVMCI API jars
Doug Simon <doug.simon@oracle.com>
parents:
23783
diff
changeset
|
35 #endif |
15ab3e226b0d
set +UseJVMCICompiler ergonomically if jvmci.class.path.append is defined or there is at least one jar file in jre/lib/jvmci apart from the JVMCI API jars
Doug Simon <doug.simon@oracle.com>
parents:
23783
diff
changeset
|
36 #ifdef TARGET_OS_FAMILY_windows |
15ab3e226b0d
set +UseJVMCICompiler ergonomically if jvmci.class.path.append is defined or there is at least one jar file in jre/lib/jvmci apart from the JVMCI API jars
Doug Simon <doug.simon@oracle.com>
parents:
23783
diff
changeset
|
37 # include "os_windows.inline.hpp" |
15ab3e226b0d
set +UseJVMCICompiler ergonomically if jvmci.class.path.append is defined or there is at least one jar file in jre/lib/jvmci apart from the JVMCI API jars
Doug Simon <doug.simon@oracle.com>
parents:
23783
diff
changeset
|
38 #endif |
15ab3e226b0d
set +UseJVMCICompiler ergonomically if jvmci.class.path.append is defined or there is at least one jar file in jre/lib/jvmci apart from the JVMCI API jars
Doug Simon <doug.simon@oracle.com>
parents:
23783
diff
changeset
|
39 #ifdef TARGET_OS_FAMILY_aix |
15ab3e226b0d
set +UseJVMCICompiler ergonomically if jvmci.class.path.append is defined or there is at least one jar file in jre/lib/jvmci apart from the JVMCI API jars
Doug Simon <doug.simon@oracle.com>
parents:
23783
diff
changeset
|
40 # include "os_aix.inline.hpp" |
15ab3e226b0d
set +UseJVMCICompiler ergonomically if jvmci.class.path.append is defined or there is at least one jar file in jre/lib/jvmci apart from the JVMCI API jars
Doug Simon <doug.simon@oracle.com>
parents:
23783
diff
changeset
|
41 #endif |
15ab3e226b0d
set +UseJVMCICompiler ergonomically if jvmci.class.path.append is defined or there is at least one jar file in jre/lib/jvmci apart from the JVMCI API jars
Doug Simon <doug.simon@oracle.com>
parents:
23783
diff
changeset
|
42 #ifdef TARGET_OS_FAMILY_bsd |
15ab3e226b0d
set +UseJVMCICompiler ergonomically if jvmci.class.path.append is defined or there is at least one jar file in jre/lib/jvmci apart from the JVMCI API jars
Doug Simon <doug.simon@oracle.com>
parents:
23783
diff
changeset
|
43 # include "os_bsd.inline.hpp" |
15ab3e226b0d
set +UseJVMCICompiler ergonomically if jvmci.class.path.append is defined or there is at least one jar file in jre/lib/jvmci apart from the JVMCI API jars
Doug Simon <doug.simon@oracle.com>
parents:
23783
diff
changeset
|
44 #endif |
7125
1baf7f1e3f23
decoupled C++ Graal runtime from C1
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
45 |
21559
be896a1983c0
recast all Graal native code as JVMCI code (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
7125
diff
changeset
|
46 JVMCI_FLAGS(MATERIALIZE_DEVELOPER_FLAG, MATERIALIZE_PD_DEVELOPER_FLAG, MATERIALIZE_PRODUCT_FLAG, MATERIALIZE_PD_PRODUCT_FLAG, MATERIALIZE_NOTPRODUCT_FLAG) |
23760
655fd63024d0
move jvmci flag handling to JVMCIGlobals
David Leopoldseder <david.d.leopoldseder@oracle.com>
parents:
22495
diff
changeset
|
47 |
24147
67afd64bc794
set jvmci.Compiler from <java.home>/jre/lib/jvmci/compiler-name before using its existence to change the default for UseJVMCICompiler
Doug Simon <doug.simon@oracle.com>
parents:
24145
diff
changeset
|
48 // Gets the value of the jvmci.Compiler system property, initializing it |
67afd64bc794
set jvmci.Compiler from <java.home>/jre/lib/jvmci/compiler-name before using its existence to change the default for UseJVMCICompiler
Doug Simon <doug.simon@oracle.com>
parents:
24145
diff
changeset
|
49 // from <java.home>/lib/jvmci/compiler-name if the property is not |
67afd64bc794
set jvmci.Compiler from <java.home>/jre/lib/jvmci/compiler-name before using its existence to change the default for UseJVMCICompiler
Doug Simon <doug.simon@oracle.com>
parents:
24145
diff
changeset
|
50 // already defined and the compiler-name file exists. |
67afd64bc794
set jvmci.Compiler from <java.home>/jre/lib/jvmci/compiler-name before using its existence to change the default for UseJVMCICompiler
Doug Simon <doug.simon@oracle.com>
parents:
24145
diff
changeset
|
51 static const char* get_jvmci_compiler_name(bool* error) { |
67afd64bc794
set jvmci.Compiler from <java.home>/jre/lib/jvmci/compiler-name before using its existence to change the default for UseJVMCICompiler
Doug Simon <doug.simon@oracle.com>
parents:
24145
diff
changeset
|
52 *error = false; |
67afd64bc794
set jvmci.Compiler from <java.home>/jre/lib/jvmci/compiler-name before using its existence to change the default for UseJVMCICompiler
Doug Simon <doug.simon@oracle.com>
parents:
24145
diff
changeset
|
53 const char* compiler_name = Arguments::get_property("jvmci.Compiler"); |
67afd64bc794
set jvmci.Compiler from <java.home>/jre/lib/jvmci/compiler-name before using its existence to change the default for UseJVMCICompiler
Doug Simon <doug.simon@oracle.com>
parents:
24145
diff
changeset
|
54 if (compiler_name == NULL) { |
67afd64bc794
set jvmci.Compiler from <java.home>/jre/lib/jvmci/compiler-name before using its existence to change the default for UseJVMCICompiler
Doug Simon <doug.simon@oracle.com>
parents:
24145
diff
changeset
|
55 char filename[JVM_MAXPATHLEN]; |
67afd64bc794
set jvmci.Compiler from <java.home>/jre/lib/jvmci/compiler-name before using its existence to change the default for UseJVMCICompiler
Doug Simon <doug.simon@oracle.com>
parents:
24145
diff
changeset
|
56 const char* fileSep = os::file_separator(); |
67afd64bc794
set jvmci.Compiler from <java.home>/jre/lib/jvmci/compiler-name before using its existence to change the default for UseJVMCICompiler
Doug Simon <doug.simon@oracle.com>
parents:
24145
diff
changeset
|
57 jio_snprintf(filename, sizeof(filename), "%s%slib%sjvmci%scompiler-name", Arguments::get_java_home(), fileSep, fileSep, fileSep); |
67afd64bc794
set jvmci.Compiler from <java.home>/jre/lib/jvmci/compiler-name before using its existence to change the default for UseJVMCICompiler
Doug Simon <doug.simon@oracle.com>
parents:
24145
diff
changeset
|
58 struct stat statbuf; |
67afd64bc794
set jvmci.Compiler from <java.home>/jre/lib/jvmci/compiler-name before using its existence to change the default for UseJVMCICompiler
Doug Simon <doug.simon@oracle.com>
parents:
24145
diff
changeset
|
59 if (os::stat(filename, &statbuf) == 0) { |
67afd64bc794
set jvmci.Compiler from <java.home>/jre/lib/jvmci/compiler-name before using its existence to change the default for UseJVMCICompiler
Doug Simon <doug.simon@oracle.com>
parents:
24145
diff
changeset
|
60 char line[256]; |
67afd64bc794
set jvmci.Compiler from <java.home>/jre/lib/jvmci/compiler-name before using its existence to change the default for UseJVMCICompiler
Doug Simon <doug.simon@oracle.com>
parents:
24145
diff
changeset
|
61 if ((size_t) statbuf.st_size > sizeof(line)) { |
67afd64bc794
set jvmci.Compiler from <java.home>/jre/lib/jvmci/compiler-name before using its existence to change the default for UseJVMCICompiler
Doug Simon <doug.simon@oracle.com>
parents:
24145
diff
changeset
|
62 jio_fprintf(defaultStream::error_stream(), "Size of %s is greater than %d\n", filename, sizeof(line)); |
67afd64bc794
set jvmci.Compiler from <java.home>/jre/lib/jvmci/compiler-name before using its existence to change the default for UseJVMCICompiler
Doug Simon <doug.simon@oracle.com>
parents:
24145
diff
changeset
|
63 *error = true; |
67afd64bc794
set jvmci.Compiler from <java.home>/jre/lib/jvmci/compiler-name before using its existence to change the default for UseJVMCICompiler
Doug Simon <doug.simon@oracle.com>
parents:
24145
diff
changeset
|
64 return NULL; |
67afd64bc794
set jvmci.Compiler from <java.home>/jre/lib/jvmci/compiler-name before using its existence to change the default for UseJVMCICompiler
Doug Simon <doug.simon@oracle.com>
parents:
24145
diff
changeset
|
65 } |
67afd64bc794
set jvmci.Compiler from <java.home>/jre/lib/jvmci/compiler-name before using its existence to change the default for UseJVMCICompiler
Doug Simon <doug.simon@oracle.com>
parents:
24145
diff
changeset
|
66 |
67afd64bc794
set jvmci.Compiler from <java.home>/jre/lib/jvmci/compiler-name before using its existence to change the default for UseJVMCICompiler
Doug Simon <doug.simon@oracle.com>
parents:
24145
diff
changeset
|
67 FILE* stream = fopen(filename, "r"); |
67afd64bc794
set jvmci.Compiler from <java.home>/jre/lib/jvmci/compiler-name before using its existence to change the default for UseJVMCICompiler
Doug Simon <doug.simon@oracle.com>
parents:
24145
diff
changeset
|
68 if (stream != NULL) { |
67afd64bc794
set jvmci.Compiler from <java.home>/jre/lib/jvmci/compiler-name before using its existence to change the default for UseJVMCICompiler
Doug Simon <doug.simon@oracle.com>
parents:
24145
diff
changeset
|
69 char line[256]; |
67afd64bc794
set jvmci.Compiler from <java.home>/jre/lib/jvmci/compiler-name before using its existence to change the default for UseJVMCICompiler
Doug Simon <doug.simon@oracle.com>
parents:
24145
diff
changeset
|
70 if (fgets(line, sizeof(line), stream) != NULL) { |
67afd64bc794
set jvmci.Compiler from <java.home>/jre/lib/jvmci/compiler-name before using its existence to change the default for UseJVMCICompiler
Doug Simon <doug.simon@oracle.com>
parents:
24145
diff
changeset
|
71 // Strip newline from end of the line |
67afd64bc794
set jvmci.Compiler from <java.home>/jre/lib/jvmci/compiler-name before using its existence to change the default for UseJVMCICompiler
Doug Simon <doug.simon@oracle.com>
parents:
24145
diff
changeset
|
72 char* p = line + strlen(line) - 1; |
67afd64bc794
set jvmci.Compiler from <java.home>/jre/lib/jvmci/compiler-name before using its existence to change the default for UseJVMCICompiler
Doug Simon <doug.simon@oracle.com>
parents:
24145
diff
changeset
|
73 while (p >= line && (*p == '\r' || *p == '\n')) { |
67afd64bc794
set jvmci.Compiler from <java.home>/jre/lib/jvmci/compiler-name before using its existence to change the default for UseJVMCICompiler
Doug Simon <doug.simon@oracle.com>
parents:
24145
diff
changeset
|
74 *p-- = 0; |
67afd64bc794
set jvmci.Compiler from <java.home>/jre/lib/jvmci/compiler-name before using its existence to change the default for UseJVMCICompiler
Doug Simon <doug.simon@oracle.com>
parents:
24145
diff
changeset
|
75 } |
67afd64bc794
set jvmci.Compiler from <java.home>/jre/lib/jvmci/compiler-name before using its existence to change the default for UseJVMCICompiler
Doug Simon <doug.simon@oracle.com>
parents:
24145
diff
changeset
|
76 SystemProperty* last_prop = NULL; |
67afd64bc794
set jvmci.Compiler from <java.home>/jre/lib/jvmci/compiler-name before using its existence to change the default for UseJVMCICompiler
Doug Simon <doug.simon@oracle.com>
parents:
24145
diff
changeset
|
77 for (SystemProperty* p = Arguments::system_properties(); p != NULL; p = p->next()) { |
67afd64bc794
set jvmci.Compiler from <java.home>/jre/lib/jvmci/compiler-name before using its existence to change the default for UseJVMCICompiler
Doug Simon <doug.simon@oracle.com>
parents:
24145
diff
changeset
|
78 last_prop = p; |
67afd64bc794
set jvmci.Compiler from <java.home>/jre/lib/jvmci/compiler-name before using its existence to change the default for UseJVMCICompiler
Doug Simon <doug.simon@oracle.com>
parents:
24145
diff
changeset
|
79 } |
67afd64bc794
set jvmci.Compiler from <java.home>/jre/lib/jvmci/compiler-name before using its existence to change the default for UseJVMCICompiler
Doug Simon <doug.simon@oracle.com>
parents:
24145
diff
changeset
|
80 guarantee(last_prop != NULL, "Cannot set jvmci.Compiler property before system properties have been created"); |
67afd64bc794
set jvmci.Compiler from <java.home>/jre/lib/jvmci/compiler-name before using its existence to change the default for UseJVMCICompiler
Doug Simon <doug.simon@oracle.com>
parents:
24145
diff
changeset
|
81 SystemProperty* new_p = new SystemProperty("jvmci.Compiler", line, true); |
67afd64bc794
set jvmci.Compiler from <java.home>/jre/lib/jvmci/compiler-name before using its existence to change the default for UseJVMCICompiler
Doug Simon <doug.simon@oracle.com>
parents:
24145
diff
changeset
|
82 last_prop->set_next(new_p); |
67afd64bc794
set jvmci.Compiler from <java.home>/jre/lib/jvmci/compiler-name before using its existence to change the default for UseJVMCICompiler
Doug Simon <doug.simon@oracle.com>
parents:
24145
diff
changeset
|
83 compiler_name = new_p->value(); |
67afd64bc794
set jvmci.Compiler from <java.home>/jre/lib/jvmci/compiler-name before using its existence to change the default for UseJVMCICompiler
Doug Simon <doug.simon@oracle.com>
parents:
24145
diff
changeset
|
84 } else { |
67afd64bc794
set jvmci.Compiler from <java.home>/jre/lib/jvmci/compiler-name before using its existence to change the default for UseJVMCICompiler
Doug Simon <doug.simon@oracle.com>
parents:
24145
diff
changeset
|
85 jio_fprintf(defaultStream::error_stream(), |
67afd64bc794
set jvmci.Compiler from <java.home>/jre/lib/jvmci/compiler-name before using its existence to change the default for UseJVMCICompiler
Doug Simon <doug.simon@oracle.com>
parents:
24145
diff
changeset
|
86 "Failed to read from %s (errno = %d)\n", filename, errno); |
67afd64bc794
set jvmci.Compiler from <java.home>/jre/lib/jvmci/compiler-name before using its existence to change the default for UseJVMCICompiler
Doug Simon <doug.simon@oracle.com>
parents:
24145
diff
changeset
|
87 fclose(stream); |
67afd64bc794
set jvmci.Compiler from <java.home>/jre/lib/jvmci/compiler-name before using its existence to change the default for UseJVMCICompiler
Doug Simon <doug.simon@oracle.com>
parents:
24145
diff
changeset
|
88 *error = true; |
67afd64bc794
set jvmci.Compiler from <java.home>/jre/lib/jvmci/compiler-name before using its existence to change the default for UseJVMCICompiler
Doug Simon <doug.simon@oracle.com>
parents:
24145
diff
changeset
|
89 return NULL; |
67afd64bc794
set jvmci.Compiler from <java.home>/jre/lib/jvmci/compiler-name before using its existence to change the default for UseJVMCICompiler
Doug Simon <doug.simon@oracle.com>
parents:
24145
diff
changeset
|
90 } |
67afd64bc794
set jvmci.Compiler from <java.home>/jre/lib/jvmci/compiler-name before using its existence to change the default for UseJVMCICompiler
Doug Simon <doug.simon@oracle.com>
parents:
24145
diff
changeset
|
91 fclose(stream); |
67afd64bc794
set jvmci.Compiler from <java.home>/jre/lib/jvmci/compiler-name before using its existence to change the default for UseJVMCICompiler
Doug Simon <doug.simon@oracle.com>
parents:
24145
diff
changeset
|
92 } else { |
67afd64bc794
set jvmci.Compiler from <java.home>/jre/lib/jvmci/compiler-name before using its existence to change the default for UseJVMCICompiler
Doug Simon <doug.simon@oracle.com>
parents:
24145
diff
changeset
|
93 jio_fprintf(defaultStream::error_stream(), |
67afd64bc794
set jvmci.Compiler from <java.home>/jre/lib/jvmci/compiler-name before using its existence to change the default for UseJVMCICompiler
Doug Simon <doug.simon@oracle.com>
parents:
24145
diff
changeset
|
94 "Failed to open %s (errno = %d)\n", filename, errno); |
67afd64bc794
set jvmci.Compiler from <java.home>/jre/lib/jvmci/compiler-name before using its existence to change the default for UseJVMCICompiler
Doug Simon <doug.simon@oracle.com>
parents:
24145
diff
changeset
|
95 *error = true; |
67afd64bc794
set jvmci.Compiler from <java.home>/jre/lib/jvmci/compiler-name before using its existence to change the default for UseJVMCICompiler
Doug Simon <doug.simon@oracle.com>
parents:
24145
diff
changeset
|
96 return NULL; |
67afd64bc794
set jvmci.Compiler from <java.home>/jre/lib/jvmci/compiler-name before using its existence to change the default for UseJVMCICompiler
Doug Simon <doug.simon@oracle.com>
parents:
24145
diff
changeset
|
97 } |
67afd64bc794
set jvmci.Compiler from <java.home>/jre/lib/jvmci/compiler-name before using its existence to change the default for UseJVMCICompiler
Doug Simon <doug.simon@oracle.com>
parents:
24145
diff
changeset
|
98 } |
67afd64bc794
set jvmci.Compiler from <java.home>/jre/lib/jvmci/compiler-name before using its existence to change the default for UseJVMCICompiler
Doug Simon <doug.simon@oracle.com>
parents:
24145
diff
changeset
|
99 } |
67afd64bc794
set jvmci.Compiler from <java.home>/jre/lib/jvmci/compiler-name before using its existence to change the default for UseJVMCICompiler
Doug Simon <doug.simon@oracle.com>
parents:
24145
diff
changeset
|
100 return compiler_name; |
67afd64bc794
set jvmci.Compiler from <java.home>/jre/lib/jvmci/compiler-name before using its existence to change the default for UseJVMCICompiler
Doug Simon <doug.simon@oracle.com>
parents:
24145
diff
changeset
|
101 } |
67afd64bc794
set jvmci.Compiler from <java.home>/jre/lib/jvmci/compiler-name before using its existence to change the default for UseJVMCICompiler
Doug Simon <doug.simon@oracle.com>
parents:
24145
diff
changeset
|
102 |
23760
655fd63024d0
move jvmci flag handling to JVMCIGlobals
David Leopoldseder <david.d.leopoldseder@oracle.com>
parents:
22495
diff
changeset
|
103 bool JVMCIGlobals::check_jvmci_flags_are_consistent() { |
23775
d66c74920c43
move MethodProfileWidth to jvmci_globals.hpp (JDK-8163864)
Doug Simon <doug.simon@oracle.com>
parents:
23763
diff
changeset
|
104 #ifndef PRODUCT |
d66c74920c43
move MethodProfileWidth to jvmci_globals.hpp (JDK-8163864)
Doug Simon <doug.simon@oracle.com>
parents:
23763
diff
changeset
|
105 #define APPLY_JVMCI_FLAGS(params3, params4) \ |
d66c74920c43
move MethodProfileWidth to jvmci_globals.hpp (JDK-8163864)
Doug Simon <doug.simon@oracle.com>
parents:
23763
diff
changeset
|
106 JVMCI_FLAGS(params4, params3, params4, params3, params4) |
d66c74920c43
move MethodProfileWidth to jvmci_globals.hpp (JDK-8163864)
Doug Simon <doug.simon@oracle.com>
parents:
23763
diff
changeset
|
107 #define JVMCI_DECLARE_CHECK4(type, name, value, doc) bool name##checked = false; |
d66c74920c43
move MethodProfileWidth to jvmci_globals.hpp (JDK-8163864)
Doug Simon <doug.simon@oracle.com>
parents:
23763
diff
changeset
|
108 #define JVMCI_DECLARE_CHECK3(type, name, doc) bool name##checked = false; |
d66c74920c43
move MethodProfileWidth to jvmci_globals.hpp (JDK-8163864)
Doug Simon <doug.simon@oracle.com>
parents:
23763
diff
changeset
|
109 #define JVMCI_FLAG_CHECKED(name) name##checked = true; |
d66c74920c43
move MethodProfileWidth to jvmci_globals.hpp (JDK-8163864)
Doug Simon <doug.simon@oracle.com>
parents:
23763
diff
changeset
|
110 APPLY_JVMCI_FLAGS(JVMCI_DECLARE_CHECK3, JVMCI_DECLARE_CHECK4) |
d66c74920c43
move MethodProfileWidth to jvmci_globals.hpp (JDK-8163864)
Doug Simon <doug.simon@oracle.com>
parents:
23763
diff
changeset
|
111 #else |
d66c74920c43
move MethodProfileWidth to jvmci_globals.hpp (JDK-8163864)
Doug Simon <doug.simon@oracle.com>
parents:
23763
diff
changeset
|
112 #define JVMCI_FLAG_CHECKED(name) |
d66c74920c43
move MethodProfileWidth to jvmci_globals.hpp (JDK-8163864)
Doug Simon <doug.simon@oracle.com>
parents:
23763
diff
changeset
|
113 #endif |
d66c74920c43
move MethodProfileWidth to jvmci_globals.hpp (JDK-8163864)
Doug Simon <doug.simon@oracle.com>
parents:
23763
diff
changeset
|
114 |
d66c74920c43
move MethodProfileWidth to jvmci_globals.hpp (JDK-8163864)
Doug Simon <doug.simon@oracle.com>
parents:
23763
diff
changeset
|
115 // Checks that a given flag is not set if a given guard flag is false. |
d66c74920c43
move MethodProfileWidth to jvmci_globals.hpp (JDK-8163864)
Doug Simon <doug.simon@oracle.com>
parents:
23763
diff
changeset
|
116 #define CHECK_NOT_SET(FLAG, GUARD) \ |
d66c74920c43
move MethodProfileWidth to jvmci_globals.hpp (JDK-8163864)
Doug Simon <doug.simon@oracle.com>
parents:
23763
diff
changeset
|
117 JVMCI_FLAG_CHECKED(FLAG) \ |
d66c74920c43
move MethodProfileWidth to jvmci_globals.hpp (JDK-8163864)
Doug Simon <doug.simon@oracle.com>
parents:
23763
diff
changeset
|
118 if (!GUARD && !FLAG_IS_DEFAULT(FLAG)) { \ |
d66c74920c43
move MethodProfileWidth to jvmci_globals.hpp (JDK-8163864)
Doug Simon <doug.simon@oracle.com>
parents:
23763
diff
changeset
|
119 jio_fprintf(defaultStream::error_stream(), \ |
d66c74920c43
move MethodProfileWidth to jvmci_globals.hpp (JDK-8163864)
Doug Simon <doug.simon@oracle.com>
parents:
23763
diff
changeset
|
120 "Improperly specified VM option '%s': '%s' must be enabled\n", #FLAG, #GUARD); \ |
d66c74920c43
move MethodProfileWidth to jvmci_globals.hpp (JDK-8163864)
Doug Simon <doug.simon@oracle.com>
parents:
23763
diff
changeset
|
121 return false; \ |
d66c74920c43
move MethodProfileWidth to jvmci_globals.hpp (JDK-8163864)
Doug Simon <doug.simon@oracle.com>
parents:
23763
diff
changeset
|
122 } |
d66c74920c43
move MethodProfileWidth to jvmci_globals.hpp (JDK-8163864)
Doug Simon <doug.simon@oracle.com>
parents:
23763
diff
changeset
|
123 |
24147
67afd64bc794
set jvmci.Compiler from <java.home>/jre/lib/jvmci/compiler-name before using its existence to change the default for UseJVMCICompiler
Doug Simon <doug.simon@oracle.com>
parents:
24145
diff
changeset
|
124 bool error; |
67afd64bc794
set jvmci.Compiler from <java.home>/jre/lib/jvmci/compiler-name before using its existence to change the default for UseJVMCICompiler
Doug Simon <doug.simon@oracle.com>
parents:
24145
diff
changeset
|
125 const char* compiler_name = get_jvmci_compiler_name(&error); |
67afd64bc794
set jvmci.Compiler from <java.home>/jre/lib/jvmci/compiler-name before using its existence to change the default for UseJVMCICompiler
Doug Simon <doug.simon@oracle.com>
parents:
24145
diff
changeset
|
126 if (error) { |
67afd64bc794
set jvmci.Compiler from <java.home>/jre/lib/jvmci/compiler-name before using its existence to change the default for UseJVMCICompiler
Doug Simon <doug.simon@oracle.com>
parents:
24145
diff
changeset
|
127 return false; |
67afd64bc794
set jvmci.Compiler from <java.home>/jre/lib/jvmci/compiler-name before using its existence to change the default for UseJVMCICompiler
Doug Simon <doug.simon@oracle.com>
parents:
24145
diff
changeset
|
128 } |
24145
2f2299c68571
change default of UseJVMCICompiler based on jvmci.Compiler property (which can now be set from <java.home>/jre/lib/jvmci/compiler-name)
Doug Simon <doug.simon@oracle.com>
parents:
24144
diff
changeset
|
129 |
24147
67afd64bc794
set jvmci.Compiler from <java.home>/jre/lib/jvmci/compiler-name before using its existence to change the default for UseJVMCICompiler
Doug Simon <doug.simon@oracle.com>
parents:
24145
diff
changeset
|
130 if (FLAG_IS_DEFAULT(UseJVMCICompiler) && !UseJVMCICompiler) { |
67afd64bc794
set jvmci.Compiler from <java.home>/jre/lib/jvmci/compiler-name before using its existence to change the default for UseJVMCICompiler
Doug Simon <doug.simon@oracle.com>
parents:
24145
diff
changeset
|
131 if (compiler_name != NULL) { |
67afd64bc794
set jvmci.Compiler from <java.home>/jre/lib/jvmci/compiler-name before using its existence to change the default for UseJVMCICompiler
Doug Simon <doug.simon@oracle.com>
parents:
24145
diff
changeset
|
132 // If a JVMCI compiler has been explicitly specified, then |
67afd64bc794
set jvmci.Compiler from <java.home>/jre/lib/jvmci/compiler-name before using its existence to change the default for UseJVMCICompiler
Doug Simon <doug.simon@oracle.com>
parents:
24145
diff
changeset
|
133 // we enable the JVMCI compiler by default. |
67afd64bc794
set jvmci.Compiler from <java.home>/jre/lib/jvmci/compiler-name before using its existence to change the default for UseJVMCICompiler
Doug Simon <doug.simon@oracle.com>
parents:
24145
diff
changeset
|
134 FLAG_SET_DEFAULT(UseJVMCICompiler, true); |
24145
2f2299c68571
change default of UseJVMCICompiler based on jvmci.Compiler property (which can now be set from <java.home>/jre/lib/jvmci/compiler-name)
Doug Simon <doug.simon@oracle.com>
parents:
24144
diff
changeset
|
135 } |
2f2299c68571
change default of UseJVMCICompiler based on jvmci.Compiler property (which can now be set from <java.home>/jre/lib/jvmci/compiler-name)
Doug Simon <doug.simon@oracle.com>
parents:
24144
diff
changeset
|
136 } |
2f2299c68571
change default of UseJVMCICompiler based on jvmci.Compiler property (which can now be set from <java.home>/jre/lib/jvmci/compiler-name)
Doug Simon <doug.simon@oracle.com>
parents:
24144
diff
changeset
|
137 |
23775
d66c74920c43
move MethodProfileWidth to jvmci_globals.hpp (JDK-8163864)
Doug Simon <doug.simon@oracle.com>
parents:
23763
diff
changeset
|
138 JVMCI_FLAG_CHECKED(UseJVMCICompiler) |
d66c74920c43
move MethodProfileWidth to jvmci_globals.hpp (JDK-8163864)
Doug Simon <doug.simon@oracle.com>
parents:
23763
diff
changeset
|
139 JVMCI_FLAG_CHECKED(EnableJVMCI) |
d66c74920c43
move MethodProfileWidth to jvmci_globals.hpp (JDK-8163864)
Doug Simon <doug.simon@oracle.com>
parents:
23763
diff
changeset
|
140 |
d66c74920c43
move MethodProfileWidth to jvmci_globals.hpp (JDK-8163864)
Doug Simon <doug.simon@oracle.com>
parents:
23763
diff
changeset
|
141 CHECK_NOT_SET(BootstrapJVMCI, UseJVMCICompiler) |
d66c74920c43
move MethodProfileWidth to jvmci_globals.hpp (JDK-8163864)
Doug Simon <doug.simon@oracle.com>
parents:
23763
diff
changeset
|
142 CHECK_NOT_SET(PrintBootstrap, UseJVMCICompiler) |
d66c74920c43
move MethodProfileWidth to jvmci_globals.hpp (JDK-8163864)
Doug Simon <doug.simon@oracle.com>
parents:
23763
diff
changeset
|
143 CHECK_NOT_SET(JVMCIThreads, UseJVMCICompiler) |
d66c74920c43
move MethodProfileWidth to jvmci_globals.hpp (JDK-8163864)
Doug Simon <doug.simon@oracle.com>
parents:
23763
diff
changeset
|
144 CHECK_NOT_SET(JVMCIHostThreads, UseJVMCICompiler) |
d66c74920c43
move MethodProfileWidth to jvmci_globals.hpp (JDK-8163864)
Doug Simon <doug.simon@oracle.com>
parents:
23763
diff
changeset
|
145 |
d66c74920c43
move MethodProfileWidth to jvmci_globals.hpp (JDK-8163864)
Doug Simon <doug.simon@oracle.com>
parents:
23763
diff
changeset
|
146 if (UseJVMCICompiler) { |
d66c74920c43
move MethodProfileWidth to jvmci_globals.hpp (JDK-8163864)
Doug Simon <doug.simon@oracle.com>
parents:
23763
diff
changeset
|
147 if (!FLAG_IS_DEFAULT(EnableJVMCI) && !EnableJVMCI) { |
d66c74920c43
move MethodProfileWidth to jvmci_globals.hpp (JDK-8163864)
Doug Simon <doug.simon@oracle.com>
parents:
23763
diff
changeset
|
148 jio_fprintf(defaultStream::error_stream(), |
d66c74920c43
move MethodProfileWidth to jvmci_globals.hpp (JDK-8163864)
Doug Simon <doug.simon@oracle.com>
parents:
23763
diff
changeset
|
149 "Improperly specified VM option UseJVMCICompiler: EnableJVMCI cannot be disabled\n"); |
d66c74920c43
move MethodProfileWidth to jvmci_globals.hpp (JDK-8163864)
Doug Simon <doug.simon@oracle.com>
parents:
23763
diff
changeset
|
150 return false; |
23760
655fd63024d0
move jvmci flag handling to JVMCIGlobals
David Leopoldseder <david.d.leopoldseder@oracle.com>
parents:
22495
diff
changeset
|
151 } |
23775
d66c74920c43
move MethodProfileWidth to jvmci_globals.hpp (JDK-8163864)
Doug Simon <doug.simon@oracle.com>
parents:
23763
diff
changeset
|
152 FLAG_SET_DEFAULT(EnableJVMCI, true); |
d66c74920c43
move MethodProfileWidth to jvmci_globals.hpp (JDK-8163864)
Doug Simon <doug.simon@oracle.com>
parents:
23763
diff
changeset
|
153 } |
d66c74920c43
move MethodProfileWidth to jvmci_globals.hpp (JDK-8163864)
Doug Simon <doug.simon@oracle.com>
parents:
23763
diff
changeset
|
154 CHECK_NOT_SET(UseJVMCIClassLoader, EnableJVMCI) |
d66c74920c43
move MethodProfileWidth to jvmci_globals.hpp (JDK-8163864)
Doug Simon <doug.simon@oracle.com>
parents:
23763
diff
changeset
|
155 CHECK_NOT_SET(CodeInstallSafepointChecks, EnableJVMCI) |
d66c74920c43
move MethodProfileWidth to jvmci_globals.hpp (JDK-8163864)
Doug Simon <doug.simon@oracle.com>
parents:
23763
diff
changeset
|
156 CHECK_NOT_SET(JVMCITraceLevel, EnableJVMCI) |
d66c74920c43
move MethodProfileWidth to jvmci_globals.hpp (JDK-8163864)
Doug Simon <doug.simon@oracle.com>
parents:
23763
diff
changeset
|
157 CHECK_NOT_SET(JVMCICounterSize, EnableJVMCI) |
d66c74920c43
move MethodProfileWidth to jvmci_globals.hpp (JDK-8163864)
Doug Simon <doug.simon@oracle.com>
parents:
23763
diff
changeset
|
158 CHECK_NOT_SET(JVMCICountersExcludeCompiler, EnableJVMCI) |
d66c74920c43
move MethodProfileWidth to jvmci_globals.hpp (JDK-8163864)
Doug Simon <doug.simon@oracle.com>
parents:
23763
diff
changeset
|
159 CHECK_NOT_SET(JVMCIUseFastLocking, EnableJVMCI) |
d66c74920c43
move MethodProfileWidth to jvmci_globals.hpp (JDK-8163864)
Doug Simon <doug.simon@oracle.com>
parents:
23763
diff
changeset
|
160 CHECK_NOT_SET(JVMCINMethodSizeLimit, EnableJVMCI) |
d66c74920c43
move MethodProfileWidth to jvmci_globals.hpp (JDK-8163864)
Doug Simon <doug.simon@oracle.com>
parents:
23763
diff
changeset
|
161 CHECK_NOT_SET(MethodProfileWidth, EnableJVMCI) |
23783
1523f2f7832f
renamed JVMCIPrintSystemProperties to JVMCIPrintProperties
Doug Simon <doug.simon@oracle.com>
parents:
23779
diff
changeset
|
162 CHECK_NOT_SET(JVMCIPrintProperties, EnableJVMCI) |
23775
d66c74920c43
move MethodProfileWidth to jvmci_globals.hpp (JDK-8163864)
Doug Simon <doug.simon@oracle.com>
parents:
23763
diff
changeset
|
163 CHECK_NOT_SET(TraceUncollectedSpeculations, EnableJVMCI) |
d66c74920c43
move MethodProfileWidth to jvmci_globals.hpp (JDK-8163864)
Doug Simon <doug.simon@oracle.com>
parents:
23763
diff
changeset
|
164 |
d66c74920c43
move MethodProfileWidth to jvmci_globals.hpp (JDK-8163864)
Doug Simon <doug.simon@oracle.com>
parents:
23763
diff
changeset
|
165 #ifndef PRODUCT |
d66c74920c43
move MethodProfileWidth to jvmci_globals.hpp (JDK-8163864)
Doug Simon <doug.simon@oracle.com>
parents:
23763
diff
changeset
|
166 #define JVMCI_CHECK4(type, name, value, doc) assert(name##checked, #name " flag not checked"); |
d66c74920c43
move MethodProfileWidth to jvmci_globals.hpp (JDK-8163864)
Doug Simon <doug.simon@oracle.com>
parents:
23763
diff
changeset
|
167 #define JVMCI_CHECK3(type, name, doc) assert(name##checked, #name " flag not checked"); |
d66c74920c43
move MethodProfileWidth to jvmci_globals.hpp (JDK-8163864)
Doug Simon <doug.simon@oracle.com>
parents:
23763
diff
changeset
|
168 // Ensures that all JVMCI flags are checked by this method. |
d66c74920c43
move MethodProfileWidth to jvmci_globals.hpp (JDK-8163864)
Doug Simon <doug.simon@oracle.com>
parents:
23763
diff
changeset
|
169 APPLY_JVMCI_FLAGS(JVMCI_CHECK3, JVMCI_CHECK4) |
d66c74920c43
move MethodProfileWidth to jvmci_globals.hpp (JDK-8163864)
Doug Simon <doug.simon@oracle.com>
parents:
23763
diff
changeset
|
170 #undef APPLY_JVMCI_FLAGS |
d66c74920c43
move MethodProfileWidth to jvmci_globals.hpp (JDK-8163864)
Doug Simon <doug.simon@oracle.com>
parents:
23763
diff
changeset
|
171 #undef JVMCI_DECLARE_CHECK3 |
d66c74920c43
move MethodProfileWidth to jvmci_globals.hpp (JDK-8163864)
Doug Simon <doug.simon@oracle.com>
parents:
23763
diff
changeset
|
172 #undef JVMCI_DECLARE_CHECK4 |
23760
655fd63024d0
move jvmci flag handling to JVMCIGlobals
David Leopoldseder <david.d.leopoldseder@oracle.com>
parents:
22495
diff
changeset
|
173 #undef JVMCI_CHECK3 |
655fd63024d0
move jvmci flag handling to JVMCIGlobals
David Leopoldseder <david.d.leopoldseder@oracle.com>
parents:
22495
diff
changeset
|
174 #undef JVMCI_CHECK4 |
23775
d66c74920c43
move MethodProfileWidth to jvmci_globals.hpp (JDK-8163864)
Doug Simon <doug.simon@oracle.com>
parents:
23763
diff
changeset
|
175 #undef JVMCI_FLAG_CHECKED |
23760
655fd63024d0
move jvmci flag handling to JVMCIGlobals
David Leopoldseder <david.d.leopoldseder@oracle.com>
parents:
22495
diff
changeset
|
176 #endif |
23775
d66c74920c43
move MethodProfileWidth to jvmci_globals.hpp (JDK-8163864)
Doug Simon <doug.simon@oracle.com>
parents:
23763
diff
changeset
|
177 #undef CHECK_NOT_SET |
23760
655fd63024d0
move jvmci flag handling to JVMCIGlobals
David Leopoldseder <david.d.leopoldseder@oracle.com>
parents:
22495
diff
changeset
|
178 if (UseJVMCICompiler) { |
655fd63024d0
move jvmci flag handling to JVMCIGlobals
David Leopoldseder <david.d.leopoldseder@oracle.com>
parents:
22495
diff
changeset
|
179 if(JVMCIThreads < 1) { |
655fd63024d0
move jvmci flag handling to JVMCIGlobals
David Leopoldseder <david.d.leopoldseder@oracle.com>
parents:
22495
diff
changeset
|
180 // Check the minimum number of JVMCI compiler threads |
23761
1fece5f8307c
jvmci_globals: add missing argument
David Leopoldseder <david.d.leopoldseder@oracle.com>
parents:
23760
diff
changeset
|
181 jio_fprintf(defaultStream::error_stream(), "JVMCIThreads of " INTX_FORMAT " is invalid; must be at least 1\n", JVMCIThreads); |
23775
d66c74920c43
move MethodProfileWidth to jvmci_globals.hpp (JDK-8163864)
Doug Simon <doug.simon@oracle.com>
parents:
23763
diff
changeset
|
182 return false; |
23760
655fd63024d0
move jvmci flag handling to JVMCIGlobals
David Leopoldseder <david.d.leopoldseder@oracle.com>
parents:
22495
diff
changeset
|
183 } |
655fd63024d0
move jvmci flag handling to JVMCIGlobals
David Leopoldseder <david.d.leopoldseder@oracle.com>
parents:
22495
diff
changeset
|
184 } |
23775
d66c74920c43
move MethodProfileWidth to jvmci_globals.hpp (JDK-8163864)
Doug Simon <doug.simon@oracle.com>
parents:
23763
diff
changeset
|
185 return true; |
23760
655fd63024d0
move jvmci flag handling to JVMCIGlobals
David Leopoldseder <david.d.leopoldseder@oracle.com>
parents:
22495
diff
changeset
|
186 } |
655fd63024d0
move jvmci flag handling to JVMCIGlobals
David Leopoldseder <david.d.leopoldseder@oracle.com>
parents:
22495
diff
changeset
|
187 |
655fd63024d0
move jvmci flag handling to JVMCIGlobals
David Leopoldseder <david.d.leopoldseder@oracle.com>
parents:
22495
diff
changeset
|
188 void JVMCIGlobals::set_jvmci_specific_flags() { |
655fd63024d0
move jvmci flag handling to JVMCIGlobals
David Leopoldseder <david.d.leopoldseder@oracle.com>
parents:
22495
diff
changeset
|
189 if (UseJVMCICompiler) { |
655fd63024d0
move jvmci flag handling to JVMCIGlobals
David Leopoldseder <david.d.leopoldseder@oracle.com>
parents:
22495
diff
changeset
|
190 if (FLAG_IS_DEFAULT(TypeProfileWidth)) { |
655fd63024d0
move jvmci flag handling to JVMCIGlobals
David Leopoldseder <david.d.leopoldseder@oracle.com>
parents:
22495
diff
changeset
|
191 FLAG_SET_DEFAULT(TypeProfileWidth, 8); |
655fd63024d0
move jvmci flag handling to JVMCIGlobals
David Leopoldseder <david.d.leopoldseder@oracle.com>
parents:
22495
diff
changeset
|
192 } |
23763
bf2d00fc162b
jvmci_globals: comment flag
David Leopoldseder <david.d.leopoldseder@oracle.com>
parents:
23761
diff
changeset
|
193 // Adjust the on stack replacement percentage to avoid early |
bf2d00fc162b
jvmci_globals: comment flag
David Leopoldseder <david.d.leopoldseder@oracle.com>
parents:
23761
diff
changeset
|
194 // OSR compilations while JVMCI itself is warming up |
23760
655fd63024d0
move jvmci flag handling to JVMCIGlobals
David Leopoldseder <david.d.leopoldseder@oracle.com>
parents:
22495
diff
changeset
|
195 if (FLAG_IS_DEFAULT(OnStackReplacePercentage)) { |
655fd63024d0
move jvmci flag handling to JVMCIGlobals
David Leopoldseder <david.d.leopoldseder@oracle.com>
parents:
22495
diff
changeset
|
196 FLAG_SET_DEFAULT(OnStackReplacePercentage, 933); |
655fd63024d0
move jvmci flag handling to JVMCIGlobals
David Leopoldseder <david.d.leopoldseder@oracle.com>
parents:
22495
diff
changeset
|
197 } |
655fd63024d0
move jvmci flag handling to JVMCIGlobals
David Leopoldseder <david.d.leopoldseder@oracle.com>
parents:
22495
diff
changeset
|
198 if (FLAG_IS_DEFAULT(ReservedCodeCacheSize)) { |
655fd63024d0
move jvmci flag handling to JVMCIGlobals
David Leopoldseder <david.d.leopoldseder@oracle.com>
parents:
22495
diff
changeset
|
199 FLAG_SET_DEFAULT(ReservedCodeCacheSize, 64*M); |
655fd63024d0
move jvmci flag handling to JVMCIGlobals
David Leopoldseder <david.d.leopoldseder@oracle.com>
parents:
22495
diff
changeset
|
200 } |
655fd63024d0
move jvmci flag handling to JVMCIGlobals
David Leopoldseder <david.d.leopoldseder@oracle.com>
parents:
22495
diff
changeset
|
201 if (FLAG_IS_DEFAULT(InitialCodeCacheSize)) { |
655fd63024d0
move jvmci flag handling to JVMCIGlobals
David Leopoldseder <david.d.leopoldseder@oracle.com>
parents:
22495
diff
changeset
|
202 FLAG_SET_DEFAULT(InitialCodeCacheSize, 16*M); |
655fd63024d0
move jvmci flag handling to JVMCIGlobals
David Leopoldseder <david.d.leopoldseder@oracle.com>
parents:
22495
diff
changeset
|
203 } |
655fd63024d0
move jvmci flag handling to JVMCIGlobals
David Leopoldseder <david.d.leopoldseder@oracle.com>
parents:
22495
diff
changeset
|
204 if (FLAG_IS_DEFAULT(MetaspaceSize)) { |
655fd63024d0
move jvmci flag handling to JVMCIGlobals
David Leopoldseder <david.d.leopoldseder@oracle.com>
parents:
22495
diff
changeset
|
205 FLAG_SET_DEFAULT(MetaspaceSize, 12*M); |
655fd63024d0
move jvmci flag handling to JVMCIGlobals
David Leopoldseder <david.d.leopoldseder@oracle.com>
parents:
22495
diff
changeset
|
206 } |
655fd63024d0
move jvmci flag handling to JVMCIGlobals
David Leopoldseder <david.d.leopoldseder@oracle.com>
parents:
22495
diff
changeset
|
207 if (FLAG_IS_DEFAULT(NewSizeThreadIncrease)) { |
655fd63024d0
move jvmci flag handling to JVMCIGlobals
David Leopoldseder <david.d.leopoldseder@oracle.com>
parents:
22495
diff
changeset
|
208 FLAG_SET_DEFAULT(NewSizeThreadIncrease, 4*K); |
655fd63024d0
move jvmci flag handling to JVMCIGlobals
David Leopoldseder <david.d.leopoldseder@oracle.com>
parents:
22495
diff
changeset
|
209 } |
655fd63024d0
move jvmci flag handling to JVMCIGlobals
David Leopoldseder <david.d.leopoldseder@oracle.com>
parents:
22495
diff
changeset
|
210 } |
655fd63024d0
move jvmci flag handling to JVMCIGlobals
David Leopoldseder <david.d.leopoldseder@oracle.com>
parents:
22495
diff
changeset
|
211 if (!ScavengeRootsInCode) { |
655fd63024d0
move jvmci flag handling to JVMCIGlobals
David Leopoldseder <david.d.leopoldseder@oracle.com>
parents:
22495
diff
changeset
|
212 warning("forcing ScavengeRootsInCode non-zero because JVMCI is enabled"); |
655fd63024d0
move jvmci flag handling to JVMCIGlobals
David Leopoldseder <david.d.leopoldseder@oracle.com>
parents:
22495
diff
changeset
|
213 ScavengeRootsInCode = 1; |
655fd63024d0
move jvmci flag handling to JVMCIGlobals
David Leopoldseder <david.d.leopoldseder@oracle.com>
parents:
22495
diff
changeset
|
214 } |
655fd63024d0
move jvmci flag handling to JVMCIGlobals
David Leopoldseder <david.d.leopoldseder@oracle.com>
parents:
22495
diff
changeset
|
215 } |