author | shade |
Fri, 04 May 2018 19:16:56 +0200 | |
branch | epsilon-gc-branch |
changeset 56533 | 28a4f284ad83 |
parent 49982 | 9042ffe5b7fe |
child 56535 | 532bc255382f |
permissions | -rw-r--r-- |
1 | 1 |
/* |
46560
388aa8d67c80
8181449: Fix debug.hpp / globalDefinitions.hpp dependency inversion
kbarrett
parents:
42650
diff
changeset
|
2 |
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. |
1 | 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 |
* |
|
5547
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
5403
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
5403
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
5403
diff
changeset
|
21 |
* questions. |
1 | 22 |
* |
23 |
*/ |
|
24 |
||
7397 | 25 |
#ifndef SHARE_VM_UTILITIES_MACROS_HPP |
26 |
#define SHARE_VM_UTILITIES_MACROS_HPP |
|
27 |
||
1 | 28 |
// Use this to mark code that needs to be cleaned up (for development only) |
29 |
#define NEEDS_CLEANUP |
|
30 |
||
31 |
// Makes a string of the argument (which is not macro-expanded) |
|
32 |
#define STR(a) #a |
|
33 |
||
34 |
// Makes a string of the macro expansion of a |
|
35 |
#define XSTR(a) STR(a) |
|
36 |
||
38704
eb96c446c3a5
8156548: gc/gctests/StringInternSyncWithGC2 fails with Test level exit status: 151
kbarrett
parents:
37272
diff
changeset
|
37 |
// Allow commas in macro arguments. |
eb96c446c3a5
8156548: gc/gctests/StringInternSyncWithGC2 fails with Test level exit status: 151
kbarrett
parents:
37272
diff
changeset
|
38 |
#define COMMA , |
eb96c446c3a5
8156548: gc/gctests/StringInternSyncWithGC2 fails with Test level exit status: 151
kbarrett
parents:
37272
diff
changeset
|
39 |
|
31340
2f9ff278bb13
8086027: Multiple STATIC_ASSERTs at class scope doesn't work
kbarrett
parents:
29474
diff
changeset
|
40 |
// Apply pre-processor token pasting to the expansions of x and y. |
2f9ff278bb13
8086027: Multiple STATIC_ASSERTs at class scope doesn't work
kbarrett
parents:
29474
diff
changeset
|
41 |
// The token pasting operator (##) prevents its arguments from being |
2f9ff278bb13
8086027: Multiple STATIC_ASSERTs at class scope doesn't work
kbarrett
parents:
29474
diff
changeset
|
42 |
// expanded. This macro allows expansion of its arguments before the |
2f9ff278bb13
8086027: Multiple STATIC_ASSERTs at class scope doesn't work
kbarrett
parents:
29474
diff
changeset
|
43 |
// concatenation is performed. Note: One auxilliary level ought to be |
2f9ff278bb13
8086027: Multiple STATIC_ASSERTs at class scope doesn't work
kbarrett
parents:
29474
diff
changeset
|
44 |
// sufficient, but two are used because of bugs in some preprocesors. |
2f9ff278bb13
8086027: Multiple STATIC_ASSERTs at class scope doesn't work
kbarrett
parents:
29474
diff
changeset
|
45 |
#define PASTE_TOKENS(x, y) PASTE_TOKENS_AUX(x, y) |
2f9ff278bb13
8086027: Multiple STATIC_ASSERTs at class scope doesn't work
kbarrett
parents:
29474
diff
changeset
|
46 |
#define PASTE_TOKENS_AUX(x, y) PASTE_TOKENS_AUX2(x, y) |
2f9ff278bb13
8086027: Multiple STATIC_ASSERTs at class scope doesn't work
kbarrett
parents:
29474
diff
changeset
|
47 |
#define PASTE_TOKENS_AUX2(x, y) x ## y |
2f9ff278bb13
8086027: Multiple STATIC_ASSERTs at class scope doesn't work
kbarrett
parents:
29474
diff
changeset
|
48 |
|
13975
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
49 |
// -DINCLUDE_<something>=0 | 1 can be specified on the command line to include |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
50 |
// or exclude functionality. |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
51 |
|
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
52 |
#ifndef INCLUDE_JVMTI |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
53 |
#define INCLUDE_JVMTI 1 |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
54 |
#endif // INCLUDE_JVMTI |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
55 |
|
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
56 |
#if INCLUDE_JVMTI |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
57 |
#define JVMTI_ONLY(x) x |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
58 |
#define NOT_JVMTI(x) |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
59 |
#define NOT_JVMTI_RETURN |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
60 |
#define NOT_JVMTI_RETURN_(code) /* next token must be ; */ |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
61 |
#else |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
62 |
#define JVMTI_ONLY(x) |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
63 |
#define NOT_JVMTI(x) x |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
64 |
#define NOT_JVMTI_RETURN { return; } |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
65 |
#define NOT_JVMTI_RETURN_(code) { return code; } |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
66 |
#endif // INCLUDE_JVMTI |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
67 |
|
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
68 |
#ifndef INCLUDE_VM_STRUCTS |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
69 |
#define INCLUDE_VM_STRUCTS 1 |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
70 |
#endif |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
71 |
|
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
72 |
#if INCLUDE_VM_STRUCTS |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
73 |
#define NOT_VM_STRUCTS_RETURN /* next token must be ; */ |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
74 |
#define NOT_VM_STRUCTS_RETURN_(code) /* next token must be ; */ |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
75 |
#else |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
76 |
#define NOT_VM_STRUCTS_RETURN {} |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
77 |
#define NOT_VM_STRUCTS_RETURN_(code) { return code; } |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
78 |
#endif // INCLUDE_VM_STRUCTS |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
79 |
|
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
80 |
#ifndef INCLUDE_JNI_CHECK |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
81 |
#define INCLUDE_JNI_CHECK 1 |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
82 |
#endif |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
83 |
|
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
84 |
#if INCLUDE_JNI_CHECK |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
85 |
#define NOT_JNI_CHECK_RETURN /* next token must be ; */ |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
86 |
#define NOT_JNI_CHECK_RETURN_(code) /* next token must be ; */ |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
87 |
#else |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
88 |
#define NOT_JNI_CHECK_RETURN {} |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
89 |
#define NOT_JNI_CHECK_RETURN_(code) { return code; } |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
90 |
#endif // INCLUDE_JNI_CHECK |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
91 |
|
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
92 |
#ifndef INCLUDE_SERVICES |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
93 |
#define INCLUDE_SERVICES 1 |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
94 |
#endif |
1 | 95 |
|
13975
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
96 |
#if INCLUDE_SERVICES |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
97 |
#define NOT_SERVICES_RETURN /* next token must be ; */ |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
98 |
#define NOT_SERVICES_RETURN_(code) /* next token must be ; */ |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
99 |
#else |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
100 |
#define NOT_SERVICES_RETURN {} |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
101 |
#define NOT_SERVICES_RETURN_(code) { return code; } |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
102 |
#endif // INCLUDE_SERVICES |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
103 |
|
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
104 |
#ifndef INCLUDE_CDS |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
105 |
#define INCLUDE_CDS 1 |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
106 |
#endif |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
107 |
|
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
108 |
#if INCLUDE_CDS |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
109 |
#define CDS_ONLY(x) x |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
110 |
#define NOT_CDS(x) |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
111 |
#define NOT_CDS_RETURN /* next token must be ; */ |
49746 | 112 |
#define NOT_CDS_RETURN0 /* next token must be ; */ |
13975
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
113 |
#define NOT_CDS_RETURN_(code) /* next token must be ; */ |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
114 |
#else |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
115 |
#define CDS_ONLY(x) |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
116 |
#define NOT_CDS(x) x |
49746 | 117 |
#define NOT_CDS_RETURN {} |
118 |
#define NOT_CDS_RETURN0 { return 0; } |
|
13975
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
119 |
#define NOT_CDS_RETURN_(code) { return code; } |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
120 |
#endif // INCLUDE_CDS |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
121 |
|
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
122 |
#ifndef INCLUDE_MANAGEMENT |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
123 |
#define INCLUDE_MANAGEMENT 1 |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
124 |
#endif // INCLUDE_MANAGEMENT |
1 | 125 |
|
13975
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
126 |
#if INCLUDE_MANAGEMENT |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
127 |
#define NOT_MANAGEMENT_RETURN /* next token must be ; */ |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
128 |
#define NOT_MANAGEMENT_RETURN_(code) /* next token must be ; */ |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
129 |
#else |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
130 |
#define NOT_MANAGEMENT_RETURN {} |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
131 |
#define NOT_MANAGEMENT_RETURN_(code) { return code; } |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
132 |
#endif // INCLUDE_MANAGEMENT |
1 | 133 |
|
49982 | 134 |
#ifndef INCLUDE_CMSGC |
135 |
#define INCLUDE_CMSGC 1 |
|
136 |
#endif // INCLUDE_CMSGC |
|
137 |
||
138 |
#if INCLUDE_CMSGC |
|
139 |
#define CMSGC_ONLY(x) x |
|
140 |
#define CMSGC_ONLY_ARG(arg) arg, |
|
141 |
#define NOT_CMSGC(x) |
|
142 |
#define NOT_CMSGC_RETURN /* next token must be ; */ |
|
143 |
#define NOT_CMSGC_RETURN_(code) /* next token must be ; */ |
|
144 |
#else |
|
145 |
#define CMSGC_ONLY(x) |
|
146 |
#define CMSGC_ONLY_ARG(x) |
|
147 |
#define NOT_CMSGC(x) x |
|
148 |
#define NOT_CMSGC_RETURN {} |
|
149 |
#define NOT_CMSGC_RETURN_(code) { return code; } |
|
150 |
#endif // INCLUDE_CMSGC |
|
151 |
||
152 |
#ifndef INCLUDE_G1GC |
|
153 |
#define INCLUDE_G1GC 1 |
|
154 |
#endif // INCLUDE_G1GC |
|
155 |
||
156 |
#if INCLUDE_G1GC |
|
157 |
#define G1GC_ONLY(x) x |
|
158 |
#define G1GC_ONLY_ARG(arg) arg, |
|
159 |
#define NOT_G1GC(x) |
|
160 |
#define NOT_G1GC_RETURN /* next token must be ; */ |
|
161 |
#define NOT_G1GC_RETURN_(code) /* next token must be ; */ |
|
162 |
#else |
|
163 |
#define G1GC_ONLY(x) |
|
164 |
#define G1GC_ONLY_ARG(arg) |
|
165 |
#define NOT_G1GC(x) x |
|
166 |
#define NOT_G1GC_RETURN {} |
|
167 |
#define NOT_G1GC_RETURN_(code) { return code; } |
|
168 |
#endif // INCLUDE_G1GC |
|
169 |
||
170 |
#ifndef INCLUDE_PARALLELGC |
|
171 |
#define INCLUDE_PARALLELGC 1 |
|
172 |
#endif // INCLUDE_PARALLELGC |
|
1 | 173 |
|
49982 | 174 |
#if INCLUDE_PARALLELGC |
175 |
#define PARALLELGC_ONLY(x) x |
|
176 |
#define PARALLELGC_ONLY_ARG(arg) arg, |
|
177 |
#define NOT_PARALLELGC(x) |
|
178 |
#define NOT_PARALLELGC_RETURN /* next token must be ; */ |
|
179 |
#define NOT_PARALLELGC_RETURN_(code) /* next token must be ; */ |
|
13975
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
180 |
#else |
49982 | 181 |
#define PARALLELGC_ONLY(x) |
182 |
#define PARALLELGC_ONLY_ARG(arg) |
|
183 |
#define NOT_PARALLELGC(x) x |
|
184 |
#define NOT_PARALLELGC_RETURN {} |
|
185 |
#define NOT_PARALLELGC_RETURN_(code) { return code; } |
|
186 |
#endif // INCLUDE_PARALLELGC |
|
187 |
||
188 |
#ifndef INCLUDE_SERIALGC |
|
189 |
#define INCLUDE_SERIALGC 1 |
|
190 |
#endif // INCLUDE_SERIALGC |
|
191 |
||
192 |
#if INCLUDE_SERIALGC |
|
193 |
#define SERIALGC_ONLY(x) x |
|
194 |
#define SERIALGC_ONLY_ARG(arg) arg, |
|
195 |
#define NOT_SERIALGC(x) |
|
196 |
#define NOT_SERIALGC_RETURN /* next token must be ; */ |
|
197 |
#define NOT_SERIALGC_RETURN_(code) /* next token must be ; */ |
|
198 |
#else |
|
199 |
#define SERIALGC_ONLY(x) |
|
200 |
#define SERIALGC_ONLY_ARG(arg) |
|
201 |
#define NOT_SERIALGC(x) x |
|
202 |
#define NOT_SERIALGC_RETURN {} |
|
203 |
#define NOT_SERIALGC_RETURN_(code) { return code; } |
|
204 |
#endif // INCLUDE_SERIALGC |
|
205 |
||
56533 | 206 |
#ifndef INCLUDE_EPSILONGC |
207 |
#define INCLUDE_EPSILONGC 1 |
|
208 |
#endif // INCLUDE_EPSILONGC |
|
209 |
||
210 |
#if INCLUDE_EPSILONGC |
|
211 |
#define EPSILONGC_ONLY(x) x |
|
212 |
#define EPSILONGC_ONLY_ARG(arg) arg, |
|
213 |
#define NOT_EPSILONGC(x) |
|
214 |
#define NOT_EPSILONGC_RETURN /* next token must be ; */ |
|
215 |
#define NOT_EPSILONGC_RETURN_(code) /* next token must be ; */ |
|
216 |
#else |
|
217 |
#define EPSILONGC_ONLY(x) |
|
218 |
#define EPSILONGC_ONLY_ARG(arg) |
|
219 |
#define NOT_EPSILONGC(x) x |
|
220 |
#define NOT_EPSILONGC_RETURN {} |
|
221 |
#define NOT_EPSILONGC_RETURN_(code) { return code; } |
|
222 |
#endif // INCLUDE_EPSILONGC |
|
223 |
||
224 |
#if INCLUDE_CMSGC || INCLUDE_G1GC || INCLUDE_PARALLELGC || INCLUDE_EPSILONGC |
|
49982 | 225 |
#define INCLUDE_NOT_ONLY_SERIALGC 1 |
226 |
#else |
|
227 |
#define INCLUDE_NOT_ONLY_SERIALGC 0 |
|
228 |
#endif |
|
229 |
||
230 |
#define INCLUDE_OOP_OOP_ITERATE_BACKWARDS INCLUDE_NOT_ONLY_SERIALGC |
|
1 | 231 |
|
13975
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
232 |
#ifndef INCLUDE_NMT |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
233 |
#define INCLUDE_NMT 1 |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
234 |
#endif // INCLUDE_NMT |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
235 |
|
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
236 |
#if INCLUDE_NMT |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
237 |
#define NOT_NMT_RETURN /* next token must be ; */ |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
238 |
#define NOT_NMT_RETURN_(code) /* next token must be ; */ |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
239 |
#else |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
240 |
#define NOT_NMT_RETURN {} |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
241 |
#define NOT_NMT_RETURN_(code) { return code; } |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
242 |
#endif // INCLUDE_NMT |
1 | 243 |
|
18025 | 244 |
#ifndef INCLUDE_TRACE |
245 |
#define INCLUDE_TRACE 1 |
|
246 |
#endif // INCLUDE_TRACE |
|
247 |
||
33160
c59f1676d27e
8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
31340
diff
changeset
|
248 |
#ifndef INCLUDE_JVMCI |
c59f1676d27e
8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
31340
diff
changeset
|
249 |
#define INCLUDE_JVMCI 1 |
c59f1676d27e
8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
31340
diff
changeset
|
250 |
#endif |
c59f1676d27e
8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
31340
diff
changeset
|
251 |
|
49972
37b2446d7f86
8202552: [AOT][JVMCI] Incorrect usage of INCLUDE_JVMCI and INCLUDE_AOT
kvn
parents:
49906
diff
changeset
|
252 |
#ifndef INCLUDE_AOT |
37b2446d7f86
8202552: [AOT][JVMCI] Incorrect usage of INCLUDE_JVMCI and INCLUDE_AOT
kvn
parents:
49906
diff
changeset
|
253 |
#define INCLUDE_AOT 1 |
37b2446d7f86
8202552: [AOT][JVMCI] Incorrect usage of INCLUDE_JVMCI and INCLUDE_AOT
kvn
parents:
49906
diff
changeset
|
254 |
#endif |
37b2446d7f86
8202552: [AOT][JVMCI] Incorrect usage of INCLUDE_JVMCI and INCLUDE_AOT
kvn
parents:
49906
diff
changeset
|
255 |
|
37b2446d7f86
8202552: [AOT][JVMCI] Incorrect usage of INCLUDE_JVMCI and INCLUDE_AOT
kvn
parents:
49906
diff
changeset
|
256 |
#if INCLUDE_AOT && !INCLUDE_JVMCI |
37b2446d7f86
8202552: [AOT][JVMCI] Incorrect usage of INCLUDE_JVMCI and INCLUDE_AOT
kvn
parents:
49906
diff
changeset
|
257 |
# error "Must have JVMCI for AOT" |
42650 | 258 |
#endif |
259 |
||
33160
c59f1676d27e
8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
31340
diff
changeset
|
260 |
#if INCLUDE_JVMCI |
c59f1676d27e
8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
31340
diff
changeset
|
261 |
#define JVMCI_ONLY(code) code |
c59f1676d27e
8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
31340
diff
changeset
|
262 |
#define NOT_JVMCI(code) |
c59f1676d27e
8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
31340
diff
changeset
|
263 |
#define NOT_JVMCI_RETURN /* next token must be ; */ |
c59f1676d27e
8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
31340
diff
changeset
|
264 |
#else |
c59f1676d27e
8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
31340
diff
changeset
|
265 |
#define JVMCI_ONLY(code) |
c59f1676d27e
8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
31340
diff
changeset
|
266 |
#define NOT_JVMCI(code) code |
c59f1676d27e
8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
31340
diff
changeset
|
267 |
#define NOT_JVMCI_RETURN {} |
c59f1676d27e
8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
31340
diff
changeset
|
268 |
#endif // INCLUDE_JVMCI |
c59f1676d27e
8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
31340
diff
changeset
|
269 |
|
42650 | 270 |
#if INCLUDE_AOT |
271 |
#define AOT_ONLY(code) code |
|
272 |
#define NOT_AOT(code) |
|
273 |
#define NOT_AOT_RETURN /* next token must be ; */ |
|
274 |
#else |
|
275 |
#define AOT_ONLY(code) |
|
276 |
#define NOT_AOT(code) code |
|
277 |
#define NOT_AOT_RETURN {} |
|
278 |
#endif // INCLUDE_AOT |
|
279 |
||
1 | 280 |
// COMPILER1 variant |
281 |
#ifdef COMPILER1 |
|
282 |
#ifdef COMPILER2 |
|
283 |
#define TIERED |
|
284 |
#endif |
|
285 |
#define COMPILER1_PRESENT(code) code |
|
49906 | 286 |
#define NOT_COMPILER1(code) |
1 | 287 |
#else // COMPILER1 |
288 |
#define COMPILER1_PRESENT(code) |
|
49906 | 289 |
#define NOT_COMPILER1(code) code |
1 | 290 |
#endif // COMPILER1 |
291 |
||
292 |
// COMPILER2 variant |
|
293 |
#ifdef COMPILER2 |
|
294 |
#define COMPILER2_PRESENT(code) code |
|
1606
dcf9714addbe
6684579: SoftReference processing can be made more efficient
ysr
parents:
1217
diff
changeset
|
295 |
#define NOT_COMPILER2(code) |
1 | 296 |
#else // COMPILER2 |
297 |
#define COMPILER2_PRESENT(code) |
|
1606
dcf9714addbe
6684579: SoftReference processing can be made more efficient
ysr
parents:
1217
diff
changeset
|
298 |
#define NOT_COMPILER2(code) code |
1 | 299 |
#endif // COMPILER2 |
300 |
||
37272
c427db4ea8c4
8148639: Some MethodCounter fields can be excluded when not including C2
cjplummer
parents:
36350
diff
changeset
|
301 |
// COMPILER2 or JVMCI |
c427db4ea8c4
8148639: Some MethodCounter fields can be excluded when not including C2
cjplummer
parents:
36350
diff
changeset
|
302 |
#if defined(COMPILER2) || INCLUDE_JVMCI |
c427db4ea8c4
8148639: Some MethodCounter fields can be excluded when not including C2
cjplummer
parents:
36350
diff
changeset
|
303 |
#define COMPILER2_OR_JVMCI 1 |
c427db4ea8c4
8148639: Some MethodCounter fields can be excluded when not including C2
cjplummer
parents:
36350
diff
changeset
|
304 |
#define COMPILER2_OR_JVMCI_PRESENT(code) code |
c427db4ea8c4
8148639: Some MethodCounter fields can be excluded when not including C2
cjplummer
parents:
36350
diff
changeset
|
305 |
#define NOT_COMPILER2_OR_JVMCI(code) |
c427db4ea8c4
8148639: Some MethodCounter fields can be excluded when not including C2
cjplummer
parents:
36350
diff
changeset
|
306 |
#else |
c427db4ea8c4
8148639: Some MethodCounter fields can be excluded when not including C2
cjplummer
parents:
36350
diff
changeset
|
307 |
#define COMPILER2_OR_JVMCI 0 |
c427db4ea8c4
8148639: Some MethodCounter fields can be excluded when not including C2
cjplummer
parents:
36350
diff
changeset
|
308 |
#define COMPILER2_OR_JVMCI_PRESENT(code) |
c427db4ea8c4
8148639: Some MethodCounter fields can be excluded when not including C2
cjplummer
parents:
36350
diff
changeset
|
309 |
#define NOT_COMPILER2_OR_JVMCI(code) code |
c427db4ea8c4
8148639: Some MethodCounter fields can be excluded when not including C2
cjplummer
parents:
36350
diff
changeset
|
310 |
#endif |
c427db4ea8c4
8148639: Some MethodCounter fields can be excluded when not including C2
cjplummer
parents:
36350
diff
changeset
|
311 |
|
6453 | 312 |
#ifdef TIERED |
313 |
#define TIERED_ONLY(code) code |
|
314 |
#define NOT_TIERED(code) |
|
33160
c59f1676d27e
8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
31340
diff
changeset
|
315 |
#else // TIERED |
6453 | 316 |
#define TIERED_ONLY(code) |
317 |
#define NOT_TIERED(code) code |
|
318 |
#endif // TIERED |
|
319 |
||
1 | 320 |
|
321 |
// PRODUCT variant |
|
322 |
#ifdef PRODUCT |
|
323 |
#define PRODUCT_ONLY(code) code |
|
324 |
#define NOT_PRODUCT(code) |
|
6438
ace4f8100e90
6979444: add command line option to print command line flags descriptions
ikrylov
parents:
6187
diff
changeset
|
325 |
#define NOT_PRODUCT_ARG(arg) |
1 | 326 |
#define PRODUCT_RETURN {} |
327 |
#define PRODUCT_RETURN0 { return 0; } |
|
328 |
#define PRODUCT_RETURN_(code) { code } |
|
329 |
#else // PRODUCT |
|
330 |
#define PRODUCT_ONLY(code) |
|
331 |
#define NOT_PRODUCT(code) code |
|
6438
ace4f8100e90
6979444: add command line option to print command line flags descriptions
ikrylov
parents:
6187
diff
changeset
|
332 |
#define NOT_PRODUCT_ARG(arg) arg, |
1 | 333 |
#define PRODUCT_RETURN /*next token must be ;*/ |
334 |
#define PRODUCT_RETURN0 /*next token must be ;*/ |
|
335 |
#define PRODUCT_RETURN_(code) /*next token must be ;*/ |
|
336 |
#endif // PRODUCT |
|
337 |
||
338 |
#ifdef CHECK_UNHANDLED_OOPS |
|
339 |
#define CHECK_UNHANDLED_OOPS_ONLY(code) code |
|
340 |
#define NOT_CHECK_UNHANDLED_OOPS(code) |
|
341 |
#else |
|
342 |
#define CHECK_UNHANDLED_OOPS_ONLY(code) |
|
343 |
#define NOT_CHECK_UNHANDLED_OOPS(code) code |
|
344 |
#endif // CHECK_UNHANDLED_OOPS |
|
345 |
||
346 |
#ifdef CC_INTERP |
|
347 |
#define CC_INTERP_ONLY(code) code |
|
348 |
#define NOT_CC_INTERP(code) |
|
349 |
#else |
|
350 |
#define CC_INTERP_ONLY(code) |
|
351 |
#define NOT_CC_INTERP(code) code |
|
352 |
#endif // CC_INTERP |
|
353 |
||
354 |
#ifdef ASSERT |
|
355 |
#define DEBUG_ONLY(code) code |
|
356 |
#define NOT_DEBUG(code) |
|
2998
b501bd305780
6849716: BitMap - performance regression introduced with G1
jcoomes
parents:
1606
diff
changeset
|
357 |
#define NOT_DEBUG_RETURN /*next token must be ;*/ |
1 | 358 |
// Historical. |
359 |
#define debug_only(code) code |
|
360 |
#else // ASSERT |
|
361 |
#define DEBUG_ONLY(code) |
|
362 |
#define NOT_DEBUG(code) code |
|
2998
b501bd305780
6849716: BitMap - performance regression introduced with G1
jcoomes
parents:
1606
diff
changeset
|
363 |
#define NOT_DEBUG_RETURN {} |
1 | 364 |
#define debug_only(code) |
365 |
#endif // ASSERT |
|
366 |
||
367 |
#ifdef _LP64 |
|
368 |
#define LP64_ONLY(code) code |
|
369 |
#define NOT_LP64(code) |
|
370 |
#else // !_LP64 |
|
371 |
#define LP64_ONLY(code) |
|
372 |
#define NOT_LP64(code) code |
|
373 |
#endif // _LP64 |
|
374 |
||
375 |
#ifdef LINUX |
|
376 |
#define LINUX_ONLY(code) code |
|
377 |
#define NOT_LINUX(code) |
|
378 |
#else |
|
379 |
#define LINUX_ONLY(code) |
|
380 |
#define NOT_LINUX(code) code |
|
381 |
#endif |
|
382 |
||
22827 | 383 |
#ifdef AIX |
384 |
#define AIX_ONLY(code) code |
|
385 |
#define NOT_AIX(code) |
|
386 |
#else |
|
387 |
#define AIX_ONLY(code) |
|
388 |
#define NOT_AIX(code) code |
|
389 |
#endif |
|
390 |
||
1 | 391 |
#ifdef SOLARIS |
392 |
#define SOLARIS_ONLY(code) code |
|
393 |
#define NOT_SOLARIS(code) |
|
394 |
#else |
|
395 |
#define SOLARIS_ONLY(code) |
|
396 |
#define NOT_SOLARIS(code) code |
|
397 |
#endif |
|
398 |
||
399 |
#ifdef _WINDOWS |
|
400 |
#define WINDOWS_ONLY(code) code |
|
401 |
#define NOT_WINDOWS(code) |
|
402 |
#else |
|
403 |
#define WINDOWS_ONLY(code) |
|
404 |
#define NOT_WINDOWS(code) code |
|
405 |
#endif |
|
406 |
||
10565 | 407 |
#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__APPLE__) |
47765
b7c7428eaab9
8189610: Reconcile jvm.h and all jvm_md.h between java.base and hotspot
coleenp
parents:
47687
diff
changeset
|
408 |
#ifndef BSD |
40010 | 409 |
#define BSD |
47765
b7c7428eaab9
8189610: Reconcile jvm.h and all jvm_md.h between java.base and hotspot
coleenp
parents:
47687
diff
changeset
|
410 |
#endif // BSD defined in <sys/param.h> |
10565 | 411 |
#define BSD_ONLY(code) code |
412 |
#define NOT_BSD(code) |
|
413 |
#else |
|
414 |
#define BSD_ONLY(code) |
|
415 |
#define NOT_BSD(code) code |
|
416 |
#endif |
|
417 |
||
8495
a4959965eaa3
7012914: JSR 292 MethodHandlesTest C1: frame::verify_return_pc(return_address) failed: must be a return pc
twisti
parents:
8110
diff
changeset
|
418 |
#ifdef _WIN64 |
a4959965eaa3
7012914: JSR 292 MethodHandlesTest C1: frame::verify_return_pc(return_address) failed: must be a return pc
twisti
parents:
8110
diff
changeset
|
419 |
#define WIN64_ONLY(code) code |
a4959965eaa3
7012914: JSR 292 MethodHandlesTest C1: frame::verify_return_pc(return_address) failed: must be a return pc
twisti
parents:
8110
diff
changeset
|
420 |
#define NOT_WIN64(code) |
a4959965eaa3
7012914: JSR 292 MethodHandlesTest C1: frame::verify_return_pc(return_address) failed: must be a return pc
twisti
parents:
8110
diff
changeset
|
421 |
#else |
a4959965eaa3
7012914: JSR 292 MethodHandlesTest C1: frame::verify_return_pc(return_address) failed: must be a return pc
twisti
parents:
8110
diff
changeset
|
422 |
#define WIN64_ONLY(code) |
a4959965eaa3
7012914: JSR 292 MethodHandlesTest C1: frame::verify_return_pc(return_address) failed: must be a return pc
twisti
parents:
8110
diff
changeset
|
423 |
#define NOT_WIN64(code) code |
a4959965eaa3
7012914: JSR 292 MethodHandlesTest C1: frame::verify_return_pc(return_address) failed: must be a return pc
twisti
parents:
8110
diff
changeset
|
424 |
#endif |
a4959965eaa3
7012914: JSR 292 MethodHandlesTest C1: frame::verify_return_pc(return_address) failed: must be a return pc
twisti
parents:
8110
diff
changeset
|
425 |
|
14294 | 426 |
#if defined(ZERO) |
427 |
#define ZERO_ONLY(code) code |
|
428 |
#define NOT_ZERO(code) |
|
429 |
#else |
|
430 |
#define ZERO_ONLY(code) |
|
431 |
#define NOT_ZERO(code) code |
|
432 |
#endif |
|
433 |
||
1066 | 434 |
#if defined(IA32) || defined(AMD64) |
435 |
#define X86 |
|
436 |
#define X86_ONLY(code) code |
|
6187 | 437 |
#define NOT_X86(code) |
1066 | 438 |
#else |
439 |
#undef X86 |
|
440 |
#define X86_ONLY(code) |
|
6187 | 441 |
#define NOT_X86(code) code |
1066 | 442 |
#endif |
443 |
||
1 | 444 |
#ifdef IA32 |
445 |
#define IA32_ONLY(code) code |
|
446 |
#define NOT_IA32(code) |
|
447 |
#else |
|
448 |
#define IA32_ONLY(code) |
|
449 |
#define NOT_IA32(code) code |
|
450 |
#endif |
|
451 |
||
22819
f88b9c394e42
8019973: PPC64 (part 11): Fix IA64 preprocessor conditionals on AIX.
goetz
parents:
22808
diff
changeset
|
452 |
// This is a REALLY BIG HACK, but on AIX <sys/systemcfg.h> unconditionally defines IA64. |
f88b9c394e42
8019973: PPC64 (part 11): Fix IA64 preprocessor conditionals on AIX.
goetz
parents:
22808
diff
changeset
|
453 |
// At least on AIX 7.1 this is a real problem because 'systemcfg.h' is indirectly included |
f88b9c394e42
8019973: PPC64 (part 11): Fix IA64 preprocessor conditionals on AIX.
goetz
parents:
22808
diff
changeset
|
454 |
// by 'pthread.h' and other common system headers. |
f88b9c394e42
8019973: PPC64 (part 11): Fix IA64 preprocessor conditionals on AIX.
goetz
parents:
22808
diff
changeset
|
455 |
|
f88b9c394e42
8019973: PPC64 (part 11): Fix IA64 preprocessor conditionals on AIX.
goetz
parents:
22808
diff
changeset
|
456 |
#if defined(IA64) && !defined(AIX) |
1 | 457 |
#define IA64_ONLY(code) code |
458 |
#define NOT_IA64(code) |
|
459 |
#else |
|
460 |
#define IA64_ONLY(code) |
|
461 |
#define NOT_IA64(code) code |
|
462 |
#endif |
|
463 |
||
464 |
#ifdef AMD64 |
|
465 |
#define AMD64_ONLY(code) code |
|
466 |
#define NOT_AMD64(code) |
|
467 |
#else |
|
468 |
#define AMD64_ONLY(code) |
|
469 |
#define NOT_AMD64(code) code |
|
470 |
#endif |
|
471 |
||
42062 | 472 |
#ifdef S390 |
473 |
#define S390_ONLY(code) code |
|
474 |
#define NOT_S390(code) |
|
475 |
#else |
|
476 |
#define S390_ONLY(code) |
|
477 |
#define NOT_S390(code) code |
|
478 |
#endif |
|
479 |
||
1 | 480 |
#ifdef SPARC |
481 |
#define SPARC_ONLY(code) code |
|
482 |
#define NOT_SPARC(code) |
|
483 |
#else |
|
484 |
#define SPARC_ONLY(code) |
|
485 |
#define NOT_SPARC(code) code |
|
486 |
#endif |
|
487 |
||
22806 | 488 |
#if defined(PPC32) || defined(PPC64) |
489 |
#ifndef PPC |
|
490 |
#define PPC |
|
491 |
#endif |
|
6176
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
492 |
#define PPC_ONLY(code) code |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
493 |
#define NOT_PPC(code) |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
494 |
#else |
22806 | 495 |
#undef PPC |
6176
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
496 |
#define PPC_ONLY(code) |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
497 |
#define NOT_PPC(code) code |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
498 |
#endif |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
499 |
|
22806 | 500 |
#ifdef PPC32 |
501 |
#define PPC32_ONLY(code) code |
|
502 |
#define NOT_PPC32(code) |
|
503 |
#else |
|
504 |
#define PPC32_ONLY(code) |
|
505 |
#define NOT_PPC32(code) code |
|
506 |
#endif |
|
507 |
||
508 |
#ifdef PPC64 |
|
509 |
#define PPC64_ONLY(code) code |
|
510 |
#define NOT_PPC64(code) |
|
511 |
#else |
|
512 |
#define PPC64_ONLY(code) |
|
513 |
#define NOT_PPC64(code) code |
|
514 |
#endif |
|
515 |
||
6176
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
516 |
#ifdef E500V2 |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
517 |
#define E500V2_ONLY(code) code |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
518 |
#define NOT_E500V2(code) |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
519 |
#else |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
520 |
#define E500V2_ONLY(code) |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
521 |
#define NOT_E500V2(code) code |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
522 |
#endif |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
523 |
|
40010 | 524 |
// Note: There are three ARM ports. They set the following in the makefiles: |
525 |
// 1. Closed 32-bit port: -DARM -DARM32 -DTARGET_ARCH_arm |
|
526 |
// 2. Closed 64-bit port: -DARM -DAARCH64 -D_LP64 -DTARGET_ARCH_arm |
|
527 |
// 3. Open 64-bit port: -DAARCH64 -D_LP64 -DTARGET_ARCH_aaarch64 |
|
6176
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
528 |
#ifdef ARM |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
529 |
#define ARM_ONLY(code) code |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
530 |
#define NOT_ARM(code) |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
531 |
#else |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
532 |
#define ARM_ONLY(code) |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
533 |
#define NOT_ARM(code) code |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
534 |
#endif |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
535 |
|
29474
81a5c5330d08
8072383: resolve conflicts between open and closed ports
dlong
parents:
29180
diff
changeset
|
536 |
#ifdef ARM32 |
81a5c5330d08
8072383: resolve conflicts between open and closed ports
dlong
parents:
29180
diff
changeset
|
537 |
#define ARM32_ONLY(code) code |
81a5c5330d08
8072383: resolve conflicts between open and closed ports
dlong
parents:
29180
diff
changeset
|
538 |
#define NOT_ARM32(code) |
81a5c5330d08
8072383: resolve conflicts between open and closed ports
dlong
parents:
29180
diff
changeset
|
539 |
#else |
81a5c5330d08
8072383: resolve conflicts between open and closed ports
dlong
parents:
29180
diff
changeset
|
540 |
#define ARM32_ONLY(code) |
81a5c5330d08
8072383: resolve conflicts between open and closed ports
dlong
parents:
29180
diff
changeset
|
541 |
#define NOT_ARM32(code) code |
81a5c5330d08
8072383: resolve conflicts between open and closed ports
dlong
parents:
29180
diff
changeset
|
542 |
#endif |
81a5c5330d08
8072383: resolve conflicts between open and closed ports
dlong
parents:
29180
diff
changeset
|
543 |
|
29180 | 544 |
#ifdef AARCH64 |
545 |
#define AARCH64_ONLY(code) code |
|
546 |
#define NOT_AARCH64(code) |
|
547 |
#else |
|
548 |
#define AARCH64_ONLY(code) |
|
549 |
#define NOT_AARCH64(code) code |
|
550 |
#endif |
|
551 |
||
1 | 552 |
#define define_pd_global(type, name, value) const type pd_##name = value; |
7397 | 553 |
|
40010 | 554 |
// Helper macros for constructing file names for includes. |
555 |
#define CPU_HEADER_STEM(basename) PASTE_TOKENS(basename, INCLUDE_SUFFIX_CPU) |
|
556 |
#define OS_HEADER_STEM(basename) PASTE_TOKENS(basename, INCLUDE_SUFFIX_OS) |
|
557 |
#define OS_CPU_HEADER_STEM(basename) PASTE_TOKENS(basename, PASTE_TOKENS(INCLUDE_SUFFIX_OS, INCLUDE_SUFFIX_CPU)) |
|
46560
388aa8d67c80
8181449: Fix debug.hpp / globalDefinitions.hpp dependency inversion
kbarrett
parents:
42650
diff
changeset
|
558 |
#define COMPILER_HEADER_STEM(basename) PASTE_TOKENS(basename, INCLUDE_SUFFIX_COMPILER) |
40010 | 559 |
|
560 |
// Include platform dependent files. |
|
561 |
// |
|
562 |
// This macro constructs from basename and INCLUDE_SUFFIX_OS / |
|
46560
388aa8d67c80
8181449: Fix debug.hpp / globalDefinitions.hpp dependency inversion
kbarrett
parents:
42650
diff
changeset
|
563 |
// INCLUDE_SUFFIX_CPU / INCLUDE_SUFFIX_COMPILER, which are set on |
388aa8d67c80
8181449: Fix debug.hpp / globalDefinitions.hpp dependency inversion
kbarrett
parents:
42650
diff
changeset
|
564 |
// the command line, the name of platform dependent files to be included. |
40010 | 565 |
// Example: INCLUDE_SUFFIX_OS=_linux / INCLUDE_SUFFIX_CPU=_sparc |
566 |
// CPU_HEADER_INLINE(macroAssembler) --> macroAssembler_sparc.inline.hpp |
|
567 |
// OS_CPU_HEADER(vmStructs) --> vmStructs_linux_sparc.hpp |
|
568 |
// |
|
569 |
// basename<cpu>.hpp / basename<cpu>.inline.hpp |
|
570 |
#define CPU_HEADER_H(basename) XSTR(CPU_HEADER_STEM(basename).h) |
|
571 |
#define CPU_HEADER(basename) XSTR(CPU_HEADER_STEM(basename).hpp) |
|
572 |
#define CPU_HEADER_INLINE(basename) XSTR(CPU_HEADER_STEM(basename).inline.hpp) |
|
573 |
// basename<os>.hpp / basename<os>.inline.hpp |
|
574 |
#define OS_HEADER_H(basename) XSTR(OS_HEADER_STEM(basename).h) |
|
575 |
#define OS_HEADER(basename) XSTR(OS_HEADER_STEM(basename).hpp) |
|
576 |
#define OS_HEADER_INLINE(basename) XSTR(OS_HEADER_STEM(basename).inline.hpp) |
|
577 |
// basename<os><cpu>.hpp / basename<os><cpu>.inline.hpp |
|
578 |
#define OS_CPU_HEADER(basename) XSTR(OS_CPU_HEADER_STEM(basename).hpp) |
|
579 |
#define OS_CPU_HEADER_INLINE(basename) XSTR(OS_CPU_HEADER_STEM(basename).inline.hpp) |
|
46560
388aa8d67c80
8181449: Fix debug.hpp / globalDefinitions.hpp dependency inversion
kbarrett
parents:
42650
diff
changeset
|
580 |
// basename<compiler>.hpp / basename<compiler>.inline.hpp |
388aa8d67c80
8181449: Fix debug.hpp / globalDefinitions.hpp dependency inversion
kbarrett
parents:
42650
diff
changeset
|
581 |
#define COMPILER_HEADER(basename) XSTR(COMPILER_HEADER_STEM(basename).hpp) |
388aa8d67c80
8181449: Fix debug.hpp / globalDefinitions.hpp dependency inversion
kbarrett
parents:
42650
diff
changeset
|
582 |
#define COMPILER_HEADER_INLINE(basename) XSTR(COMPILER_HEADER_STEM(basename).inline.hpp) |
40010 | 583 |
|
40655
9f644073d3a0
8157907: Incorrect inclusion of atomic.hpp instead of atomic.inline.hpp
dholmes
parents:
40015
diff
changeset
|
584 |
// To use Atomic::inc(jshort* dest) and Atomic::dec(jshort* dest), the address must be specially |
9f644073d3a0
8157907: Incorrect inclusion of atomic.hpp instead of atomic.inline.hpp
dholmes
parents:
40015
diff
changeset
|
585 |
// aligned, such that (*dest) occupies the upper 16 bits of an aligned 32-bit word. The best way to |
9f644073d3a0
8157907: Incorrect inclusion of atomic.hpp instead of atomic.inline.hpp
dholmes
parents:
40015
diff
changeset
|
586 |
// achieve is to place your short value next to another short value, which doesn't need atomic ops. |
9f644073d3a0
8157907: Incorrect inclusion of atomic.hpp instead of atomic.inline.hpp
dholmes
parents:
40015
diff
changeset
|
587 |
// |
9f644073d3a0
8157907: Incorrect inclusion of atomic.hpp instead of atomic.inline.hpp
dholmes
parents:
40015
diff
changeset
|
588 |
// Example |
9f644073d3a0
8157907: Incorrect inclusion of atomic.hpp instead of atomic.inline.hpp
dholmes
parents:
40015
diff
changeset
|
589 |
// ATOMIC_SHORT_PAIR( |
9f644073d3a0
8157907: Incorrect inclusion of atomic.hpp instead of atomic.inline.hpp
dholmes
parents:
40015
diff
changeset
|
590 |
// volatile short _refcount, // needs atomic operation |
9f644073d3a0
8157907: Incorrect inclusion of atomic.hpp instead of atomic.inline.hpp
dholmes
parents:
40015
diff
changeset
|
591 |
// unsigned short _length // number of UTF8 characters in the symbol (does not need atomic op) |
9f644073d3a0
8157907: Incorrect inclusion of atomic.hpp instead of atomic.inline.hpp
dholmes
parents:
40015
diff
changeset
|
592 |
// ); |
9f644073d3a0
8157907: Incorrect inclusion of atomic.hpp instead of atomic.inline.hpp
dholmes
parents:
40015
diff
changeset
|
593 |
|
9f644073d3a0
8157907: Incorrect inclusion of atomic.hpp instead of atomic.inline.hpp
dholmes
parents:
40015
diff
changeset
|
594 |
#ifdef VM_LITTLE_ENDIAN |
9f644073d3a0
8157907: Incorrect inclusion of atomic.hpp instead of atomic.inline.hpp
dholmes
parents:
40015
diff
changeset
|
595 |
#define ATOMIC_SHORT_PAIR(atomic_decl, non_atomic_decl) \ |
9f644073d3a0
8157907: Incorrect inclusion of atomic.hpp instead of atomic.inline.hpp
dholmes
parents:
40015
diff
changeset
|
596 |
non_atomic_decl; \ |
9f644073d3a0
8157907: Incorrect inclusion of atomic.hpp instead of atomic.inline.hpp
dholmes
parents:
40015
diff
changeset
|
597 |
atomic_decl |
9f644073d3a0
8157907: Incorrect inclusion of atomic.hpp instead of atomic.inline.hpp
dholmes
parents:
40015
diff
changeset
|
598 |
#else |
9f644073d3a0
8157907: Incorrect inclusion of atomic.hpp instead of atomic.inline.hpp
dholmes
parents:
40015
diff
changeset
|
599 |
#define ATOMIC_SHORT_PAIR(atomic_decl, non_atomic_decl) \ |
9f644073d3a0
8157907: Incorrect inclusion of atomic.hpp instead of atomic.inline.hpp
dholmes
parents:
40015
diff
changeset
|
600 |
atomic_decl; \ |
9f644073d3a0
8157907: Incorrect inclusion of atomic.hpp instead of atomic.inline.hpp
dholmes
parents:
40015
diff
changeset
|
601 |
non_atomic_decl |
9f644073d3a0
8157907: Incorrect inclusion of atomic.hpp instead of atomic.inline.hpp
dholmes
parents:
40015
diff
changeset
|
602 |
#endif |
9f644073d3a0
8157907: Incorrect inclusion of atomic.hpp instead of atomic.inline.hpp
dholmes
parents:
40015
diff
changeset
|
603 |
|
49982 | 604 |
#if INCLUDE_CDS && INCLUDE_G1GC && defined(_LP64) && !defined(_WINDOWS) |
46810
7dad333205cd
8179302: Pre-resolve constant pool string entries and cache resolved_reference arrays in CDS archive.
jiangli
parents:
46560
diff
changeset
|
605 |
#define INCLUDE_CDS_JAVA_HEAP 1 |
7dad333205cd
8179302: Pre-resolve constant pool string entries and cache resolved_reference arrays in CDS archive.
jiangli
parents:
46560
diff
changeset
|
606 |
#define CDS_JAVA_HEAP_ONLY(x) x |
7dad333205cd
8179302: Pre-resolve constant pool string entries and cache resolved_reference arrays in CDS archive.
jiangli
parents:
46560
diff
changeset
|
607 |
#define NOT_CDS_JAVA_HEAP(x) |
7dad333205cd
8179302: Pre-resolve constant pool string entries and cache resolved_reference arrays in CDS archive.
jiangli
parents:
46560
diff
changeset
|
608 |
#define NOT_CDS_JAVA_HEAP_RETURN |
7dad333205cd
8179302: Pre-resolve constant pool string entries and cache resolved_reference arrays in CDS archive.
jiangli
parents:
46560
diff
changeset
|
609 |
#define NOT_CDS_JAVA_HEAP_RETURN_(code) |
7dad333205cd
8179302: Pre-resolve constant pool string entries and cache resolved_reference arrays in CDS archive.
jiangli
parents:
46560
diff
changeset
|
610 |
#else |
7dad333205cd
8179302: Pre-resolve constant pool string entries and cache resolved_reference arrays in CDS archive.
jiangli
parents:
46560
diff
changeset
|
611 |
#define INCLUDE_CDS_JAVA_HEAP 0 |
7dad333205cd
8179302: Pre-resolve constant pool string entries and cache resolved_reference arrays in CDS archive.
jiangli
parents:
46560
diff
changeset
|
612 |
#define CDS_JAVA_HEAP_ONLY(x) |
7dad333205cd
8179302: Pre-resolve constant pool string entries and cache resolved_reference arrays in CDS archive.
jiangli
parents:
46560
diff
changeset
|
613 |
#define NOT_CDS_JAVA_HEAP(x) x |
7dad333205cd
8179302: Pre-resolve constant pool string entries and cache resolved_reference arrays in CDS archive.
jiangli
parents:
46560
diff
changeset
|
614 |
#define NOT_CDS_JAVA_HEAP_RETURN {} |
7dad333205cd
8179302: Pre-resolve constant pool string entries and cache resolved_reference arrays in CDS archive.
jiangli
parents:
46560
diff
changeset
|
615 |
#define NOT_CDS_JAVA_HEAP_RETURN_(code) { return code; } |
7dad333205cd
8179302: Pre-resolve constant pool string entries and cache resolved_reference arrays in CDS archive.
jiangli
parents:
46560
diff
changeset
|
616 |
#endif |
7dad333205cd
8179302: Pre-resolve constant pool string entries and cache resolved_reference arrays in CDS archive.
jiangli
parents:
46560
diff
changeset
|
617 |
|
7397 | 618 |
#endif // SHARE_VM_UTILITIES_MACROS_HPP |