Mercurial > hg > graal-jvmci-8
annotate src/share/vm/utilities/macros.hpp @ 5129:51111665eda6
Support for recording a leaf graph id for each deoptimization point in the debug info.
author | Lukas Stadler <lukas.stadler@jku.at> |
---|---|
date | Wed, 21 Mar 2012 10:47:02 +0100 |
parents | 723df37192d6 |
children | ab038e0d6b43 |
rev | line source |
---|---|
0 | 1 /* |
2321
1b4e6a5d98e0
7012914: JSR 292 MethodHandlesTest C1: frame::verify_return_pc(return_address) failed: must be a return pc
twisti
parents:
2195
diff
changeset
|
2 * Copyright (c) 1997, 2011, 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:
1490
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1490
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:
1490
diff
changeset
|
21 * questions. |
0 | 22 * |
23 */ | |
24 | |
1972 | 25 #ifndef SHARE_VM_UTILITIES_MACROS_HPP |
26 #define SHARE_VM_UTILITIES_MACROS_HPP | |
27 | |
0 | 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 | |
37 // KERNEL variant | |
38 #ifdef KERNEL | |
39 #define COMPILER1 | |
40 #define SERIALGC | |
41 | |
42 #define JVMTI_KERNEL | |
43 #define FPROF_KERNEL | |
44 #define VM_STRUCTS_KERNEL | |
45 #define JNICHECK_KERNEL | |
46 #define SERVICES_KERNEL | |
47 | |
48 #define KERNEL_RETURN {} | |
2195
bf8517f4e4d0
6766644: Redefinition of compiled method fails with assertion "Can not load classes with the Compiler thread"
kamg
parents:
1972
diff
changeset
|
49 #define KERNEL_RETURN_(code) { return code; } |
0 | 50 |
51 #else // KERNEL | |
52 | |
53 #define KERNEL_RETURN /* next token must be ; */ | |
54 #define KERNEL_RETURN_(code) /* next token must be ; */ | |
55 | |
56 #endif // KERNEL | |
57 | |
58 // COMPILER1 variant | |
59 #ifdef COMPILER1 | |
60 #ifdef COMPILER2 | |
61 #define TIERED | |
62 #endif | |
63 #define COMPILER1_PRESENT(code) code | |
64 #else // COMPILER1 | |
65 #define COMPILER1_PRESENT(code) | |
66 #endif // COMPILER1 | |
67 | |
68 // COMPILER2 variant | |
69 #ifdef COMPILER2 | |
70 #define COMPILER2_PRESENT(code) code | |
453
c96030fff130
6684579: SoftReference processing can be made more efficient
ysr
parents:
337
diff
changeset
|
71 #define NOT_COMPILER2(code) |
0 | 72 #else // COMPILER2 |
73 #define COMPILER2_PRESENT(code) | |
453
c96030fff130
6684579: SoftReference processing can be made more efficient
ysr
parents:
337
diff
changeset
|
74 #define NOT_COMPILER2(code) code |
0 | 75 #endif // COMPILER2 |
76 | |
4559
723df37192d6
Make it possible again to build a real client libjvm, drop the UseGraal flag.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
3960
diff
changeset
|
77 #ifdef GRAAL |
723df37192d6
Make it possible again to build a real client libjvm, drop the UseGraal flag.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
3960
diff
changeset
|
78 #define IS_GRAAL(code) code |
723df37192d6
Make it possible again to build a real client libjvm, drop the UseGraal flag.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
3960
diff
changeset
|
79 #else |
723df37192d6
Make it possible again to build a real client libjvm, drop the UseGraal flag.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
3960
diff
changeset
|
80 #define IS_GRAAL(code) |
723df37192d6
Make it possible again to build a real client libjvm, drop the UseGraal flag.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
3960
diff
changeset
|
81 #endif |
723df37192d6
Make it possible again to build a real client libjvm, drop the UseGraal flag.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
3960
diff
changeset
|
82 |
1783 | 83 #ifdef TIERED |
84 #define TIERED_ONLY(code) code | |
85 #define NOT_TIERED(code) | |
86 #else | |
87 #define TIERED_ONLY(code) | |
88 #define NOT_TIERED(code) code | |
89 #endif // TIERED | |
90 | |
0 | 91 |
92 // PRODUCT variant | |
93 #ifdef PRODUCT | |
94 #define PRODUCT_ONLY(code) code | |
95 #define NOT_PRODUCT(code) | |
1768
6ee479178066
6979444: add command line option to print command line flags descriptions
ikrylov
parents:
1692
diff
changeset
|
96 #define NOT_PRODUCT_ARG(arg) |
0 | 97 #define PRODUCT_RETURN {} |
98 #define PRODUCT_RETURN0 { return 0; } | |
99 #define PRODUCT_RETURN_(code) { code } | |
100 #else // PRODUCT | |
101 #define PRODUCT_ONLY(code) | |
102 #define NOT_PRODUCT(code) code | |
1768
6ee479178066
6979444: add command line option to print command line flags descriptions
ikrylov
parents:
1692
diff
changeset
|
103 #define NOT_PRODUCT_ARG(arg) arg, |
0 | 104 #define PRODUCT_RETURN /*next token must be ;*/ |
105 #define PRODUCT_RETURN0 /*next token must be ;*/ | |
106 #define PRODUCT_RETURN_(code) /*next token must be ;*/ | |
107 #endif // PRODUCT | |
108 | |
109 #ifdef CHECK_UNHANDLED_OOPS | |
110 #define CHECK_UNHANDLED_OOPS_ONLY(code) code | |
111 #define NOT_CHECK_UNHANDLED_OOPS(code) | |
112 #else | |
113 #define CHECK_UNHANDLED_OOPS_ONLY(code) | |
114 #define NOT_CHECK_UNHANDLED_OOPS(code) code | |
115 #endif // CHECK_UNHANDLED_OOPS | |
116 | |
117 #ifdef CC_INTERP | |
118 #define CC_INTERP_ONLY(code) code | |
119 #define NOT_CC_INTERP(code) | |
120 #else | |
121 #define CC_INTERP_ONLY(code) | |
122 #define NOT_CC_INTERP(code) code | |
123 #endif // CC_INTERP | |
124 | |
125 #ifdef ASSERT | |
126 #define DEBUG_ONLY(code) code | |
127 #define NOT_DEBUG(code) | |
809
6e2afda171db
6849716: BitMap - performance regression introduced with G1
jcoomes
parents:
453
diff
changeset
|
128 #define NOT_DEBUG_RETURN /*next token must be ;*/ |
0 | 129 // Historical. |
130 #define debug_only(code) code | |
131 #else // ASSERT | |
132 #define DEBUG_ONLY(code) | |
133 #define NOT_DEBUG(code) code | |
809
6e2afda171db
6849716: BitMap - performance regression introduced with G1
jcoomes
parents:
453
diff
changeset
|
134 #define NOT_DEBUG_RETURN {} |
0 | 135 #define debug_only(code) |
136 #endif // ASSERT | |
137 | |
138 #ifdef _LP64 | |
139 #define LP64_ONLY(code) code | |
140 #define NOT_LP64(code) | |
141 #else // !_LP64 | |
142 #define LP64_ONLY(code) | |
143 #define NOT_LP64(code) code | |
144 #endif // _LP64 | |
145 | |
146 #ifdef LINUX | |
147 #define LINUX_ONLY(code) code | |
148 #define NOT_LINUX(code) | |
149 #else | |
150 #define LINUX_ONLY(code) | |
151 #define NOT_LINUX(code) code | |
152 #endif | |
153 | |
154 #ifdef SOLARIS | |
155 #define SOLARIS_ONLY(code) code | |
156 #define NOT_SOLARIS(code) | |
157 #else | |
158 #define SOLARIS_ONLY(code) | |
159 #define NOT_SOLARIS(code) code | |
160 #endif | |
161 | |
162 #ifdef _WINDOWS | |
163 #define WINDOWS_ONLY(code) code | |
164 #define NOT_WINDOWS(code) | |
165 #else | |
166 #define WINDOWS_ONLY(code) | |
167 #define NOT_WINDOWS(code) code | |
168 #endif | |
169 | |
3960 | 170 #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__APPLE__) |
171 #define BSD_ONLY(code) code | |
172 #define NOT_BSD(code) | |
173 #else | |
174 #define BSD_ONLY(code) | |
175 #define NOT_BSD(code) code | |
176 #endif | |
177 | |
2321
1b4e6a5d98e0
7012914: JSR 292 MethodHandlesTest C1: frame::verify_return_pc(return_address) failed: must be a return pc
twisti
parents:
2195
diff
changeset
|
178 #ifdef _WIN64 |
1b4e6a5d98e0
7012914: JSR 292 MethodHandlesTest C1: frame::verify_return_pc(return_address) failed: must be a return pc
twisti
parents:
2195
diff
changeset
|
179 #define WIN64_ONLY(code) code |
1b4e6a5d98e0
7012914: JSR 292 MethodHandlesTest C1: frame::verify_return_pc(return_address) failed: must be a return pc
twisti
parents:
2195
diff
changeset
|
180 #define NOT_WIN64(code) |
1b4e6a5d98e0
7012914: JSR 292 MethodHandlesTest C1: frame::verify_return_pc(return_address) failed: must be a return pc
twisti
parents:
2195
diff
changeset
|
181 #else |
1b4e6a5d98e0
7012914: JSR 292 MethodHandlesTest C1: frame::verify_return_pc(return_address) failed: must be a return pc
twisti
parents:
2195
diff
changeset
|
182 #define WIN64_ONLY(code) |
1b4e6a5d98e0
7012914: JSR 292 MethodHandlesTest C1: frame::verify_return_pc(return_address) failed: must be a return pc
twisti
parents:
2195
diff
changeset
|
183 #define NOT_WIN64(code) code |
1b4e6a5d98e0
7012914: JSR 292 MethodHandlesTest C1: frame::verify_return_pc(return_address) failed: must be a return pc
twisti
parents:
2195
diff
changeset
|
184 #endif |
1b4e6a5d98e0
7012914: JSR 292 MethodHandlesTest C1: frame::verify_return_pc(return_address) failed: must be a return pc
twisti
parents:
2195
diff
changeset
|
185 |
304 | 186 #if defined(IA32) || defined(AMD64) |
187 #define X86 | |
188 #define X86_ONLY(code) code | |
1692 | 189 #define NOT_X86(code) |
304 | 190 #else |
191 #undef X86 | |
192 #define X86_ONLY(code) | |
1692 | 193 #define NOT_X86(code) code |
304 | 194 #endif |
195 | |
0 | 196 #ifdef IA32 |
197 #define IA32_ONLY(code) code | |
198 #define NOT_IA32(code) | |
199 #else | |
200 #define IA32_ONLY(code) | |
201 #define NOT_IA32(code) code | |
202 #endif | |
203 | |
204 #ifdef IA64 | |
205 #define IA64_ONLY(code) code | |
206 #define NOT_IA64(code) | |
207 #else | |
208 #define IA64_ONLY(code) | |
209 #define NOT_IA64(code) code | |
210 #endif | |
211 | |
212 #ifdef AMD64 | |
213 #define AMD64_ONLY(code) code | |
214 #define NOT_AMD64(code) | |
215 #else | |
216 #define AMD64_ONLY(code) | |
217 #define NOT_AMD64(code) code | |
218 #endif | |
219 | |
220 #ifdef SPARC | |
221 #define SPARC_ONLY(code) code | |
222 #define NOT_SPARC(code) | |
223 #else | |
224 #define SPARC_ONLY(code) | |
225 #define NOT_SPARC(code) code | |
226 #endif | |
227 | |
1681
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
228 #ifdef PPC |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
229 #define PPC_ONLY(code) code |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
230 #define NOT_PPC(code) |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
231 #else |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
232 #define PPC_ONLY(code) |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
233 #define NOT_PPC(code) code |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
234 #endif |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
235 |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
236 #ifdef E500V2 |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
237 #define E500V2_ONLY(code) code |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
238 #define NOT_E500V2(code) |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
239 #else |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
240 #define E500V2_ONLY(code) |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
241 #define NOT_E500V2(code) code |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
242 #endif |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
243 |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
244 |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
245 #ifdef ARM |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
246 #define ARM_ONLY(code) code |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
247 #define NOT_ARM(code) |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
248 #else |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
249 #define ARM_ONLY(code) |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
250 #define NOT_ARM(code) code |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
251 #endif |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
252 |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
253 #ifdef JAVASE_EMBEDDED |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
254 #define EMBEDDED_ONLY(code) code |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
255 #define NOT_EMBEDDED(code) |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
256 #else |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
257 #define EMBEDDED_ONLY(code) |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
258 #define NOT_EMBEDDED(code) code |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
259 #endif |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
260 |
5129
51111665eda6
Support for recording a leaf graph id for each deoptimization point in the debug info.
Lukas Stadler <lukas.stadler@jku.at>
parents:
4559
diff
changeset
|
261 #ifdef GRAAL |
51111665eda6
Support for recording a leaf graph id for each deoptimization point in the debug info.
Lukas Stadler <lukas.stadler@jku.at>
parents:
4559
diff
changeset
|
262 #define GRAAL_ONLY(code...) code |
51111665eda6
Support for recording a leaf graph id for each deoptimization point in the debug info.
Lukas Stadler <lukas.stadler@jku.at>
parents:
4559
diff
changeset
|
263 #define NOT_GRAAL(code...) |
51111665eda6
Support for recording a leaf graph id for each deoptimization point in the debug info.
Lukas Stadler <lukas.stadler@jku.at>
parents:
4559
diff
changeset
|
264 #else |
51111665eda6
Support for recording a leaf graph id for each deoptimization point in the debug info.
Lukas Stadler <lukas.stadler@jku.at>
parents:
4559
diff
changeset
|
265 #define GRAAL_ONLY(code...) |
51111665eda6
Support for recording a leaf graph id for each deoptimization point in the debug info.
Lukas Stadler <lukas.stadler@jku.at>
parents:
4559
diff
changeset
|
266 #define NOT_GRAAL(code...) code |
51111665eda6
Support for recording a leaf graph id for each deoptimization point in the debug info.
Lukas Stadler <lukas.stadler@jku.at>
parents:
4559
diff
changeset
|
267 #endif |
51111665eda6
Support for recording a leaf graph id for each deoptimization point in the debug info.
Lukas Stadler <lukas.stadler@jku.at>
parents:
4559
diff
changeset
|
268 |
0 | 269 #define define_pd_global(type, name, value) const type pd_##name = value; |
1972 | 270 |
271 #endif // SHARE_VM_UTILITIES_MACROS_HPP |