Mercurial > hg > graal-jvmci-8
annotate src/share/vm/runtime/globals_extension.hpp @ 8854:754c24457b20
7112912: Message "Error occurred during initialization of VM" on boxes with lots of RAM
Summary: Ergonomics now also takes available virtual memory into account when deciding for a heap size. The helper method to determine the maximum allocatable memory block now uses the appropriate OS specific calls to retrieve available virtual memory for the java process. In 32 bit environments this method now also searches for the maximum actually reservable amount of memory. Merge previously separate implementations for Linux/BSD/Solaris into a single method.
Reviewed-by: jmasa, tamao
author | tschatzl |
---|---|
date | Wed, 27 Mar 2013 19:21:18 +0100 |
parents | db9981fd3124 |
children | 5fc51c1ecdeb f98f5d48f511 |
rev | line source |
---|---|
0 | 1 /* |
6633
a5dd6e3ef9f3
6677625: Move platform specific flags from globals.hpp to globals_<arch>.hpp
twisti
parents:
4107
diff
changeset
|
2 * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. |
0 | 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 * | |
1552
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1080
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1080
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1080
diff
changeset
|
21 * questions. |
0 | 22 * |
23 */ | |
24 | |
1972 | 25 #ifndef SHARE_VM_RUNTIME_GLOBALS_EXTENSION_HPP |
26 #define SHARE_VM_RUNTIME_GLOBALS_EXTENSION_HPP | |
27 | |
28 #include "runtime/globals.hpp" | |
8001
db9981fd3124
8005915: Unify SERIALGC and INCLUDE_ALTERNATE_GCS
jprovino
parents:
6854
diff
changeset
|
29 #include "utilities/macros.hpp" |
1972 | 30 #include "utilities/top.hpp" |
31 | |
0 | 32 // Construct enum of Flag_<cmdline-arg> constants. |
33 | |
34 // Parens left off in the following for the enum decl below. | |
35 #define FLAG_MEMBER(flag) Flag_##flag | |
36 | |
37 #define RUNTIME_PRODUCT_FLAG_MEMBER(type, name, value, doc) FLAG_MEMBER(name), | |
38 #define RUNTIME_PD_PRODUCT_FLAG_MEMBER(type, name, doc) FLAG_MEMBER(name), | |
39 #define RUNTIME_DIAGNOSTIC_FLAG_MEMBER(type, name, value, doc) FLAG_MEMBER(name), | |
350
d28aa69f0959
6618726: Introduce -XX:+UnlockExperimentalVMOptions flag
ysr
parents:
342
diff
changeset
|
40 #define RUNTIME_EXPERIMENTAL_FLAG_MEMBER(type, name, value, doc) FLAG_MEMBER(name), |
0 | 41 #define RUNTIME_MANAGEABLE_FLAG_MEMBER(type, name, value, doc) FLAG_MEMBER(name), |
42 #define RUNTIME_PRODUCT_RW_FLAG_MEMBER(type, name, value, doc) FLAG_MEMBER(name), | |
43 #ifdef PRODUCT | |
44 #define RUNTIME_DEVELOP_FLAG_MEMBER(type, name, value, doc) /* flag is constant */ | |
45 #define RUNTIME_PD_DEVELOP_FLAG_MEMBER(type, name, doc) /* flag is constant */ | |
46 #define RUNTIME_NOTPRODUCT_FLAG_MEMBER(type, name, value, doc) | |
47 #else | |
48 #define RUNTIME_DEVELOP_FLAG_MEMBER(type, name, value, doc) FLAG_MEMBER(name), | |
49 #define RUNTIME_PD_DEVELOP_FLAG_MEMBER(type, name, doc) FLAG_MEMBER(name), | |
50 #define RUNTIME_NOTPRODUCT_FLAG_MEMBER(type, name, value, doc) FLAG_MEMBER(name), | |
51 #endif | |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
13
diff
changeset
|
52 #ifdef _LP64 |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
13
diff
changeset
|
53 #define RUNTIME_LP64_PRODUCT_FLAG_MEMBER(type, name, value, doc) FLAG_MEMBER(name), |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
13
diff
changeset
|
54 #else |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
13
diff
changeset
|
55 #define RUNTIME_LP64_PRODUCT_FLAG_MEMBER(type, name, value, doc) /* flag is constant */ |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
13
diff
changeset
|
56 #endif // _LP64 |
0 | 57 |
58 #define C1_PRODUCT_FLAG_MEMBER(type, name, value, doc) FLAG_MEMBER(name), | |
59 #define C1_PD_PRODUCT_FLAG_MEMBER(type, name, doc) FLAG_MEMBER(name), | |
60 #ifdef PRODUCT | |
61 #define C1_DEVELOP_FLAG_MEMBER(type, name, value, doc) /* flag is constant */ | |
62 #define C1_PD_DEVELOP_FLAG_MEMBER(type, name, doc) /* flag is constant */ | |
63 #define C1_NOTPRODUCT_FLAG_MEMBER(type, name, value, doc) | |
64 #else | |
65 #define C1_DEVELOP_FLAG_MEMBER(type, name, value, doc) FLAG_MEMBER(name), | |
66 #define C1_PD_DEVELOP_FLAG_MEMBER(type, name, doc) FLAG_MEMBER(name), | |
67 #define C1_NOTPRODUCT_FLAG_MEMBER(type, name, value, doc) FLAG_MEMBER(name), | |
68 #endif | |
69 | |
70 #define C2_PRODUCT_FLAG_MEMBER(type, name, value, doc) FLAG_MEMBER(name), | |
71 #define C2_PD_PRODUCT_FLAG_MEMBER(type, name, doc) FLAG_MEMBER(name), | |
72 #define C2_DIAGNOSTIC_FLAG_MEMBER(type, name, value, doc) FLAG_MEMBER(name), | |
1080
7c57aead6d3e
6892658: C2 should optimize some stringbuilder patterns
never
parents:
1064
diff
changeset
|
73 #define C2_EXPERIMENTAL_FLAG_MEMBER(type, name, value, doc) FLAG_MEMBER(name), |
0 | 74 #ifdef PRODUCT |
75 #define C2_DEVELOP_FLAG_MEMBER(type, name, value, doc) /* flag is constant */ | |
76 #define C2_PD_DEVELOP_FLAG_MEMBER(type, name, doc) /* flag is constant */ | |
77 #define C2_NOTPRODUCT_FLAG_MEMBER(type, name, value, doc) | |
78 #else | |
79 #define C2_DEVELOP_FLAG_MEMBER(type, name, value, doc) FLAG_MEMBER(name), | |
80 #define C2_PD_DEVELOP_FLAG_MEMBER(type, name, doc) FLAG_MEMBER(name), | |
81 #define C2_NOTPRODUCT_FLAG_MEMBER(type, name, value, doc) FLAG_MEMBER(name), | |
82 #endif | |
83 | |
6633
a5dd6e3ef9f3
6677625: Move platform specific flags from globals.hpp to globals_<arch>.hpp
twisti
parents:
4107
diff
changeset
|
84 #define ARCH_PRODUCT_FLAG_MEMBER(type, name, value, doc) FLAG_MEMBER(name), |
a5dd6e3ef9f3
6677625: Move platform specific flags from globals.hpp to globals_<arch>.hpp
twisti
parents:
4107
diff
changeset
|
85 #define ARCH_DIAGNOSTIC_FLAG_MEMBER(type, name, value, doc) FLAG_MEMBER(name), |
a5dd6e3ef9f3
6677625: Move platform specific flags from globals.hpp to globals_<arch>.hpp
twisti
parents:
4107
diff
changeset
|
86 #define ARCH_EXPERIMENTAL_FLAG_MEMBER(type, name, value, doc) FLAG_MEMBER(name), |
a5dd6e3ef9f3
6677625: Move platform specific flags from globals.hpp to globals_<arch>.hpp
twisti
parents:
4107
diff
changeset
|
87 #ifdef PRODUCT |
a5dd6e3ef9f3
6677625: Move platform specific flags from globals.hpp to globals_<arch>.hpp
twisti
parents:
4107
diff
changeset
|
88 #define ARCH_DEVELOP_FLAG_MEMBER(type, name, value, doc) /* flag is constant */ |
a5dd6e3ef9f3
6677625: Move platform specific flags from globals.hpp to globals_<arch>.hpp
twisti
parents:
4107
diff
changeset
|
89 #define ARCH_NOTPRODUCT_FLAG_MEMBER(type, name, value, doc) |
a5dd6e3ef9f3
6677625: Move platform specific flags from globals.hpp to globals_<arch>.hpp
twisti
parents:
4107
diff
changeset
|
90 #else |
a5dd6e3ef9f3
6677625: Move platform specific flags from globals.hpp to globals_<arch>.hpp
twisti
parents:
4107
diff
changeset
|
91 #define ARCH_DEVELOP_FLAG_MEMBER(type, name, value, doc) FLAG_MEMBER(name), |
a5dd6e3ef9f3
6677625: Move platform specific flags from globals.hpp to globals_<arch>.hpp
twisti
parents:
4107
diff
changeset
|
92 #define ARCH_NOTPRODUCT_FLAG_MEMBER(type, name, value, doc) FLAG_MEMBER(name), |
a5dd6e3ef9f3
6677625: Move platform specific flags from globals.hpp to globals_<arch>.hpp
twisti
parents:
4107
diff
changeset
|
93 #endif |
a5dd6e3ef9f3
6677625: Move platform specific flags from globals.hpp to globals_<arch>.hpp
twisti
parents:
4107
diff
changeset
|
94 |
0 | 95 typedef enum { |
4088
358eca91be48
7116730: Revert 7116481: Commercial features in Hotspot must be gated by a switch
phh
parents:
4087
diff
changeset
|
96 RUNTIME_FLAGS(RUNTIME_DEVELOP_FLAG_MEMBER, RUNTIME_PD_DEVELOP_FLAG_MEMBER, RUNTIME_PRODUCT_FLAG_MEMBER, RUNTIME_PD_PRODUCT_FLAG_MEMBER, RUNTIME_DIAGNOSTIC_FLAG_MEMBER, RUNTIME_EXPERIMENTAL_FLAG_MEMBER, RUNTIME_NOTPRODUCT_FLAG_MEMBER, RUNTIME_MANAGEABLE_FLAG_MEMBER, RUNTIME_PRODUCT_RW_FLAG_MEMBER, RUNTIME_LP64_PRODUCT_FLAG_MEMBER) |
342
37f87013dfd8
6711316: Open source the Garbage-First garbage collector
ysr
parents:
113
diff
changeset
|
97 RUNTIME_OS_FLAGS(RUNTIME_DEVELOP_FLAG_MEMBER, RUNTIME_PD_DEVELOP_FLAG_MEMBER, RUNTIME_PRODUCT_FLAG_MEMBER, RUNTIME_PD_PRODUCT_FLAG_MEMBER, RUNTIME_DIAGNOSTIC_FLAG_MEMBER, RUNTIME_NOTPRODUCT_FLAG_MEMBER) |
8001
db9981fd3124
8005915: Unify SERIALGC and INCLUDE_ALTERNATE_GCS
jprovino
parents:
6854
diff
changeset
|
98 #if INCLUDE_ALL_GCS |
350
d28aa69f0959
6618726: Introduce -XX:+UnlockExperimentalVMOptions flag
ysr
parents:
342
diff
changeset
|
99 G1_FLAGS(RUNTIME_DEVELOP_FLAG_MEMBER, RUNTIME_PD_DEVELOP_FLAG_MEMBER, RUNTIME_PRODUCT_FLAG_MEMBER, RUNTIME_PD_PRODUCT_FLAG_MEMBER, RUNTIME_DIAGNOSTIC_FLAG_MEMBER, RUNTIME_EXPERIMENTAL_FLAG_MEMBER, RUNTIME_NOTPRODUCT_FLAG_MEMBER, RUNTIME_MANAGEABLE_FLAG_MEMBER, RUNTIME_PRODUCT_RW_FLAG_MEMBER) |
8001
db9981fd3124
8005915: Unify SERIALGC and INCLUDE_ALTERNATE_GCS
jprovino
parents:
6854
diff
changeset
|
100 #endif // INCLUDE_ALL_GCS |
0 | 101 #ifdef COMPILER1 |
342
37f87013dfd8
6711316: Open source the Garbage-First garbage collector
ysr
parents:
113
diff
changeset
|
102 C1_FLAGS(C1_DEVELOP_FLAG_MEMBER, C1_PD_DEVELOP_FLAG_MEMBER, C1_PRODUCT_FLAG_MEMBER, C1_PD_PRODUCT_FLAG_MEMBER, C1_NOTPRODUCT_FLAG_MEMBER) |
0 | 103 #endif |
104 #ifdef COMPILER2 | |
1080
7c57aead6d3e
6892658: C2 should optimize some stringbuilder patterns
never
parents:
1064
diff
changeset
|
105 C2_FLAGS(C2_DEVELOP_FLAG_MEMBER, C2_PD_DEVELOP_FLAG_MEMBER, C2_PRODUCT_FLAG_MEMBER, C2_PD_PRODUCT_FLAG_MEMBER, C2_DIAGNOSTIC_FLAG_MEMBER, C2_EXPERIMENTAL_FLAG_MEMBER, C2_NOTPRODUCT_FLAG_MEMBER) |
0 | 106 #endif |
6633
a5dd6e3ef9f3
6677625: Move platform specific flags from globals.hpp to globals_<arch>.hpp
twisti
parents:
4107
diff
changeset
|
107 ARCH_FLAGS(ARCH_DEVELOP_FLAG_MEMBER, ARCH_PRODUCT_FLAG_MEMBER, ARCH_DIAGNOSTIC_FLAG_MEMBER, ARCH_EXPERIMENTAL_FLAG_MEMBER, ARCH_NOTPRODUCT_FLAG_MEMBER) |
4107
cd00eaeebef6
7117389: Add a framework for vendor-specific command line switch extensions to Hotspot
phh
parents:
4088
diff
changeset
|
108 COMMANDLINEFLAG_EXT |
0 | 109 NUM_CommandLineFlag |
110 } CommandLineFlag; | |
111 | |
112 // Construct enum of Flag_<cmdline-arg>_<type> constants. | |
113 | |
114 #define FLAG_MEMBER_WITH_TYPE(flag,type) Flag_##flag##_##type | |
115 | |
116 #define RUNTIME_PRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) FLAG_MEMBER_WITH_TYPE(name,type), | |
117 #define RUNTIME_PD_PRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, doc) FLAG_MEMBER_WITH_TYPE(name,type), | |
118 #define RUNTIME_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) FLAG_MEMBER_WITH_TYPE(name,type), | |
350
d28aa69f0959
6618726: Introduce -XX:+UnlockExperimentalVMOptions flag
ysr
parents:
342
diff
changeset
|
119 #define RUNTIME_EXPERIMENTAL_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) FLAG_MEMBER_WITH_TYPE(name,type), |
0 | 120 #define RUNTIME_MANAGEABLE_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) FLAG_MEMBER_WITH_TYPE(name,type), |
121 #define RUNTIME_PRODUCT_RW_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) FLAG_MEMBER_WITH_TYPE(name,type), | |
122 #ifdef PRODUCT | |
123 #define RUNTIME_DEVELOP_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) /* flag is constant */ | |
124 #define RUNTIME_PD_DEVELOP_FLAG_MEMBER_WITH_TYPE(type, name, doc) /* flag is constant */ | |
125 #define RUNTIME_NOTPRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) | |
126 #else | |
127 #define RUNTIME_DEVELOP_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) FLAG_MEMBER_WITH_TYPE(name,type), | |
128 #define RUNTIME_PD_DEVELOP_FLAG_MEMBER_WITH_TYPE(type, name, doc) FLAG_MEMBER_WITH_TYPE(name,type), | |
129 #define RUNTIME_NOTPRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) FLAG_MEMBER_WITH_TYPE(name,type), | |
130 #endif | |
131 | |
132 #define C1_PRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) FLAG_MEMBER_WITH_TYPE(name,type), | |
133 #define C1_PD_PRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, doc) FLAG_MEMBER_WITH_TYPE(name,type), | |
134 #ifdef PRODUCT | |
135 #define C1_DEVELOP_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) /* flag is constant */ | |
136 #define C1_PD_DEVELOP_FLAG_MEMBER_WITH_TYPE(type, name, doc) /* flag is constant */ | |
137 #define C1_NOTPRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) | |
138 #else | |
139 #define C1_DEVELOP_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) FLAG_MEMBER_WITH_TYPE(name,type), | |
140 #define C1_PD_DEVELOP_FLAG_MEMBER_WITH_TYPE(type, name, doc) FLAG_MEMBER_WITH_TYPE(name,type), | |
141 #define C1_NOTPRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) FLAG_MEMBER_WITH_TYPE(name,type), | |
142 #endif | |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
13
diff
changeset
|
143 #ifdef _LP64 |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
13
diff
changeset
|
144 #define RUNTIME_LP64_PRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) FLAG_MEMBER_WITH_TYPE(name,type), |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
13
diff
changeset
|
145 #else |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
13
diff
changeset
|
146 #define RUNTIME_LP64_PRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) /* flag is constant */ |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
13
diff
changeset
|
147 #endif // _LP64 |
0 | 148 |
149 #define C2_PRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) FLAG_MEMBER_WITH_TYPE(name,type), | |
150 #define C2_PD_PRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, doc) FLAG_MEMBER_WITH_TYPE(name,type), | |
151 #define C2_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) FLAG_MEMBER_WITH_TYPE(name,type), | |
1080
7c57aead6d3e
6892658: C2 should optimize some stringbuilder patterns
never
parents:
1064
diff
changeset
|
152 #define C2_EXPERIMENTAL_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) FLAG_MEMBER_WITH_TYPE(name,type), |
0 | 153 #ifdef PRODUCT |
154 #define C2_DEVELOP_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) /* flag is constant */ | |
155 #define C2_PD_DEVELOP_FLAG_MEMBER_WITH_TYPE(type, name, doc) /* flag is constant */ | |
156 #define C2_NOTPRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) | |
157 #else | |
158 #define C2_DEVELOP_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) FLAG_MEMBER_WITH_TYPE(name,type), | |
159 #define C2_PD_DEVELOP_FLAG_MEMBER_WITH_TYPE(type, name, doc) FLAG_MEMBER_WITH_TYPE(name,type), | |
160 #define C2_NOTPRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) FLAG_MEMBER_WITH_TYPE(name,type), | |
161 #endif | |
162 | |
6633
a5dd6e3ef9f3
6677625: Move platform specific flags from globals.hpp to globals_<arch>.hpp
twisti
parents:
4107
diff
changeset
|
163 #define ARCH_PRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) FLAG_MEMBER_WITH_TYPE(name,type), |
a5dd6e3ef9f3
6677625: Move platform specific flags from globals.hpp to globals_<arch>.hpp
twisti
parents:
4107
diff
changeset
|
164 #define ARCH_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) FLAG_MEMBER_WITH_TYPE(name,type), |
a5dd6e3ef9f3
6677625: Move platform specific flags from globals.hpp to globals_<arch>.hpp
twisti
parents:
4107
diff
changeset
|
165 #define ARCH_EXPERIMENTAL_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) FLAG_MEMBER_WITH_TYPE(name,type), |
a5dd6e3ef9f3
6677625: Move platform specific flags from globals.hpp to globals_<arch>.hpp
twisti
parents:
4107
diff
changeset
|
166 #ifdef PRODUCT |
a5dd6e3ef9f3
6677625: Move platform specific flags from globals.hpp to globals_<arch>.hpp
twisti
parents:
4107
diff
changeset
|
167 #define ARCH_DEVELOP_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) /* flag is constant */ |
a5dd6e3ef9f3
6677625: Move platform specific flags from globals.hpp to globals_<arch>.hpp
twisti
parents:
4107
diff
changeset
|
168 #define ARCH_NOTPRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) |
a5dd6e3ef9f3
6677625: Move platform specific flags from globals.hpp to globals_<arch>.hpp
twisti
parents:
4107
diff
changeset
|
169 #else |
a5dd6e3ef9f3
6677625: Move platform specific flags from globals.hpp to globals_<arch>.hpp
twisti
parents:
4107
diff
changeset
|
170 #define ARCH_DEVELOP_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) FLAG_MEMBER_WITH_TYPE(name,type), |
a5dd6e3ef9f3
6677625: Move platform specific flags from globals.hpp to globals_<arch>.hpp
twisti
parents:
4107
diff
changeset
|
171 #define ARCH_NOTPRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) FLAG_MEMBER_WITH_TYPE(name,type), |
a5dd6e3ef9f3
6677625: Move platform specific flags from globals.hpp to globals_<arch>.hpp
twisti
parents:
4107
diff
changeset
|
172 #endif |
a5dd6e3ef9f3
6677625: Move platform specific flags from globals.hpp to globals_<arch>.hpp
twisti
parents:
4107
diff
changeset
|
173 |
0 | 174 typedef enum { |
342
37f87013dfd8
6711316: Open source the Garbage-First garbage collector
ysr
parents:
113
diff
changeset
|
175 RUNTIME_FLAGS(RUNTIME_DEVELOP_FLAG_MEMBER_WITH_TYPE, |
37f87013dfd8
6711316: Open source the Garbage-First garbage collector
ysr
parents:
113
diff
changeset
|
176 RUNTIME_PD_DEVELOP_FLAG_MEMBER_WITH_TYPE, |
37f87013dfd8
6711316: Open source the Garbage-First garbage collector
ysr
parents:
113
diff
changeset
|
177 RUNTIME_PRODUCT_FLAG_MEMBER_WITH_TYPE, |
37f87013dfd8
6711316: Open source the Garbage-First garbage collector
ysr
parents:
113
diff
changeset
|
178 RUNTIME_PD_PRODUCT_FLAG_MEMBER_WITH_TYPE, |
0 | 179 RUNTIME_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE, |
350
d28aa69f0959
6618726: Introduce -XX:+UnlockExperimentalVMOptions flag
ysr
parents:
342
diff
changeset
|
180 RUNTIME_EXPERIMENTAL_FLAG_MEMBER_WITH_TYPE, |
0 | 181 RUNTIME_NOTPRODUCT_FLAG_MEMBER_WITH_TYPE, |
182 RUNTIME_MANAGEABLE_FLAG_MEMBER_WITH_TYPE, | |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
13
diff
changeset
|
183 RUNTIME_PRODUCT_RW_FLAG_MEMBER_WITH_TYPE, |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
13
diff
changeset
|
184 RUNTIME_LP64_PRODUCT_FLAG_MEMBER_WITH_TYPE) |
342
37f87013dfd8
6711316: Open source the Garbage-First garbage collector
ysr
parents:
113
diff
changeset
|
185 RUNTIME_OS_FLAGS(RUNTIME_DEVELOP_FLAG_MEMBER_WITH_TYPE, |
37f87013dfd8
6711316: Open source the Garbage-First garbage collector
ysr
parents:
113
diff
changeset
|
186 RUNTIME_PD_DEVELOP_FLAG_MEMBER_WITH_TYPE, |
37f87013dfd8
6711316: Open source the Garbage-First garbage collector
ysr
parents:
113
diff
changeset
|
187 RUNTIME_PRODUCT_FLAG_MEMBER_WITH_TYPE, |
37f87013dfd8
6711316: Open source the Garbage-First garbage collector
ysr
parents:
113
diff
changeset
|
188 RUNTIME_PD_PRODUCT_FLAG_MEMBER_WITH_TYPE, |
37f87013dfd8
6711316: Open source the Garbage-First garbage collector
ysr
parents:
113
diff
changeset
|
189 RUNTIME_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE, |
37f87013dfd8
6711316: Open source the Garbage-First garbage collector
ysr
parents:
113
diff
changeset
|
190 RUNTIME_NOTPRODUCT_FLAG_MEMBER_WITH_TYPE) |
8001
db9981fd3124
8005915: Unify SERIALGC and INCLUDE_ALTERNATE_GCS
jprovino
parents:
6854
diff
changeset
|
191 #if INCLUDE_ALL_GCS |
342
37f87013dfd8
6711316: Open source the Garbage-First garbage collector
ysr
parents:
113
diff
changeset
|
192 G1_FLAGS(RUNTIME_DEVELOP_FLAG_MEMBER_WITH_TYPE, |
37f87013dfd8
6711316: Open source the Garbage-First garbage collector
ysr
parents:
113
diff
changeset
|
193 RUNTIME_PD_DEVELOP_FLAG_MEMBER_WITH_TYPE, |
37f87013dfd8
6711316: Open source the Garbage-First garbage collector
ysr
parents:
113
diff
changeset
|
194 RUNTIME_PRODUCT_FLAG_MEMBER_WITH_TYPE, |
37f87013dfd8
6711316: Open source the Garbage-First garbage collector
ysr
parents:
113
diff
changeset
|
195 RUNTIME_PD_PRODUCT_FLAG_MEMBER_WITH_TYPE, |
37f87013dfd8
6711316: Open source the Garbage-First garbage collector
ysr
parents:
113
diff
changeset
|
196 RUNTIME_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE, |
350
d28aa69f0959
6618726: Introduce -XX:+UnlockExperimentalVMOptions flag
ysr
parents:
342
diff
changeset
|
197 RUNTIME_EXPERIMENTAL_FLAG_MEMBER_WITH_TYPE, |
342
37f87013dfd8
6711316: Open source the Garbage-First garbage collector
ysr
parents:
113
diff
changeset
|
198 RUNTIME_NOTPRODUCT_FLAG_MEMBER_WITH_TYPE, |
37f87013dfd8
6711316: Open source the Garbage-First garbage collector
ysr
parents:
113
diff
changeset
|
199 RUNTIME_MANAGEABLE_FLAG_MEMBER_WITH_TYPE, |
37f87013dfd8
6711316: Open source the Garbage-First garbage collector
ysr
parents:
113
diff
changeset
|
200 RUNTIME_PRODUCT_RW_FLAG_MEMBER_WITH_TYPE) |
8001
db9981fd3124
8005915: Unify SERIALGC and INCLUDE_ALTERNATE_GCS
jprovino
parents:
6854
diff
changeset
|
201 #endif // INCLUDE_ALL_GCS |
0 | 202 #ifdef COMPILER1 |
342
37f87013dfd8
6711316: Open source the Garbage-First garbage collector
ysr
parents:
113
diff
changeset
|
203 C1_FLAGS(C1_DEVELOP_FLAG_MEMBER_WITH_TYPE, |
37f87013dfd8
6711316: Open source the Garbage-First garbage collector
ysr
parents:
113
diff
changeset
|
204 C1_PD_DEVELOP_FLAG_MEMBER_WITH_TYPE, |
37f87013dfd8
6711316: Open source the Garbage-First garbage collector
ysr
parents:
113
diff
changeset
|
205 C1_PRODUCT_FLAG_MEMBER_WITH_TYPE, |
37f87013dfd8
6711316: Open source the Garbage-First garbage collector
ysr
parents:
113
diff
changeset
|
206 C1_PD_PRODUCT_FLAG_MEMBER_WITH_TYPE, |
37f87013dfd8
6711316: Open source the Garbage-First garbage collector
ysr
parents:
113
diff
changeset
|
207 C1_NOTPRODUCT_FLAG_MEMBER_WITH_TYPE) |
0 | 208 #endif |
209 #ifdef COMPILER2 | |
342
37f87013dfd8
6711316: Open source the Garbage-First garbage collector
ysr
parents:
113
diff
changeset
|
210 C2_FLAGS(C2_DEVELOP_FLAG_MEMBER_WITH_TYPE, |
37f87013dfd8
6711316: Open source the Garbage-First garbage collector
ysr
parents:
113
diff
changeset
|
211 C2_PD_DEVELOP_FLAG_MEMBER_WITH_TYPE, |
37f87013dfd8
6711316: Open source the Garbage-First garbage collector
ysr
parents:
113
diff
changeset
|
212 C2_PRODUCT_FLAG_MEMBER_WITH_TYPE, |
37f87013dfd8
6711316: Open source the Garbage-First garbage collector
ysr
parents:
113
diff
changeset
|
213 C2_PD_PRODUCT_FLAG_MEMBER_WITH_TYPE, |
37f87013dfd8
6711316: Open source the Garbage-First garbage collector
ysr
parents:
113
diff
changeset
|
214 C2_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE, |
1080
7c57aead6d3e
6892658: C2 should optimize some stringbuilder patterns
never
parents:
1064
diff
changeset
|
215 C2_EXPERIMENTAL_FLAG_MEMBER_WITH_TYPE, |
342
37f87013dfd8
6711316: Open source the Garbage-First garbage collector
ysr
parents:
113
diff
changeset
|
216 C2_NOTPRODUCT_FLAG_MEMBER_WITH_TYPE) |
0 | 217 #endif |
6633
a5dd6e3ef9f3
6677625: Move platform specific flags from globals.hpp to globals_<arch>.hpp
twisti
parents:
4107
diff
changeset
|
218 ARCH_FLAGS(ARCH_DEVELOP_FLAG_MEMBER_WITH_TYPE, |
a5dd6e3ef9f3
6677625: Move platform specific flags from globals.hpp to globals_<arch>.hpp
twisti
parents:
4107
diff
changeset
|
219 ARCH_PRODUCT_FLAG_MEMBER_WITH_TYPE, |
a5dd6e3ef9f3
6677625: Move platform specific flags from globals.hpp to globals_<arch>.hpp
twisti
parents:
4107
diff
changeset
|
220 ARCH_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE, |
a5dd6e3ef9f3
6677625: Move platform specific flags from globals.hpp to globals_<arch>.hpp
twisti
parents:
4107
diff
changeset
|
221 ARCH_EXPERIMENTAL_FLAG_MEMBER_WITH_TYPE, |
a5dd6e3ef9f3
6677625: Move platform specific flags from globals.hpp to globals_<arch>.hpp
twisti
parents:
4107
diff
changeset
|
222 ARCH_NOTPRODUCT_FLAG_MEMBER_WITH_TYPE) |
4107
cd00eaeebef6
7117389: Add a framework for vendor-specific command line switch extensions to Hotspot
phh
parents:
4088
diff
changeset
|
223 COMMANDLINEFLAGWITHTYPE_EXT |
0 | 224 NUM_CommandLineFlagWithType |
225 } CommandLineFlagWithType; | |
226 | |
227 #define FLAG_IS_DEFAULT(name) (CommandLineFlagsEx::is_default(FLAG_MEMBER(name))) | |
13
183f41cf8bfe
6557851: CMS: ergonomics defaults are not set with FLAG_SET_ERGO
jmasa
parents:
0
diff
changeset
|
228 #define FLAG_IS_ERGO(name) (CommandLineFlagsEx::is_ergo(FLAG_MEMBER(name))) |
183f41cf8bfe
6557851: CMS: ergonomics defaults are not set with FLAG_SET_ERGO
jmasa
parents:
0
diff
changeset
|
229 #define FLAG_IS_CMDLINE(name) (CommandLineFlagsEx::is_cmdline(FLAG_MEMBER(name))) |
0 | 230 |
231 #define FLAG_SET_DEFAULT(name, value) ((name) = (value)) | |
232 | |
233 #define FLAG_SET_CMDLINE(type, name, value) (CommandLineFlagsEx::type##AtPut(FLAG_MEMBER_WITH_TYPE(name,type), (type)(value), COMMAND_LINE)) | |
234 #define FLAG_SET_ERGO(type, name, value) (CommandLineFlagsEx::type##AtPut(FLAG_MEMBER_WITH_TYPE(name,type), (type)(value), ERGONOMIC)) | |
235 | |
236 // Can't put the following in CommandLineFlags because | |
237 // of a circular dependency on the enum definition. | |
238 class CommandLineFlagsEx : CommandLineFlags { | |
239 public: | |
240 static void boolAtPut(CommandLineFlagWithType flag, bool value, FlagValueOrigin origin); | |
241 static void intxAtPut(CommandLineFlagWithType flag, intx value, FlagValueOrigin origin); | |
242 static void uintxAtPut(CommandLineFlagWithType flag, uintx value, FlagValueOrigin origin); | |
1064 | 243 static void uint64_tAtPut(CommandLineFlagWithType flag, uint64_t value, FlagValueOrigin origin); |
0 | 244 static void doubleAtPut(CommandLineFlagWithType flag, double value, FlagValueOrigin origin); |
245 static void ccstrAtPut(CommandLineFlagWithType flag, ccstr value, FlagValueOrigin origin); | |
246 | |
247 static bool is_default(CommandLineFlag flag); | |
13
183f41cf8bfe
6557851: CMS: ergonomics defaults are not set with FLAG_SET_ERGO
jmasa
parents:
0
diff
changeset
|
248 static bool is_ergo(CommandLineFlag flag); |
183f41cf8bfe
6557851: CMS: ergonomics defaults are not set with FLAG_SET_ERGO
jmasa
parents:
0
diff
changeset
|
249 static bool is_cmdline(CommandLineFlag flag); |
0 | 250 }; |
1972 | 251 |
252 #endif // SHARE_VM_RUNTIME_GLOBALS_EXTENSION_HPP |