Mercurial > hg > graal-compiler
annotate src/share/vm/utilities/macros.hpp @ 1783:d5d065957597
6953144: Tiered compilation
Summary: Infrastructure for tiered compilation support (interpreter + c1 + c2) for 32 and 64 bit. Simple tiered policy implementation.
Reviewed-by: kvn, never, phh, twisti
author | iveresov |
---|---|
date | Fri, 03 Sep 2010 17:51:07 -0700 |
parents | d2ede61b7a12 |
children | 18c378513575 |
rev | line source |
---|---|
0 | 1 /* |
1692 | 2 * Copyright (c) 1997, 2010, 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 | |
25 // Use this to mark code that needs to be cleaned up (for development only) | |
26 #define NEEDS_CLEANUP | |
27 | |
28 // Makes a string of the argument (which is not macro-expanded) | |
29 #define STR(a) #a | |
30 | |
31 // Makes a string of the macro expansion of a | |
32 #define XSTR(a) STR(a) | |
33 | |
34 // KERNEL variant | |
35 #ifdef KERNEL | |
36 #define COMPILER1 | |
37 #define SERIALGC | |
38 | |
39 #define JVMTI_KERNEL | |
40 #define FPROF_KERNEL | |
41 #define VM_STRUCTS_KERNEL | |
42 #define JNICHECK_KERNEL | |
43 #define SERVICES_KERNEL | |
44 | |
45 #define KERNEL_RETURN {} | |
46 #define KERNEL_RETURN_(code) { code } | |
47 | |
48 #else // KERNEL | |
49 | |
50 #define KERNEL_RETURN /* next token must be ; */ | |
51 #define KERNEL_RETURN_(code) /* next token must be ; */ | |
52 | |
53 #endif // KERNEL | |
54 | |
55 // COMPILER1 variant | |
56 #ifdef COMPILER1 | |
57 #ifdef COMPILER2 | |
58 #define TIERED | |
59 #endif | |
60 #define COMPILER1_PRESENT(code) code | |
61 #else // COMPILER1 | |
62 #define COMPILER1_PRESENT(code) | |
63 #endif // COMPILER1 | |
64 | |
65 // COMPILER2 variant | |
66 #ifdef COMPILER2 | |
67 #define COMPILER2_PRESENT(code) code | |
453
c96030fff130
6684579: SoftReference processing can be made more efficient
ysr
parents:
337
diff
changeset
|
68 #define NOT_COMPILER2(code) |
0 | 69 #else // COMPILER2 |
70 #define COMPILER2_PRESENT(code) | |
453
c96030fff130
6684579: SoftReference processing can be made more efficient
ysr
parents:
337
diff
changeset
|
71 #define NOT_COMPILER2(code) code |
0 | 72 #endif // COMPILER2 |
73 | |
1783 | 74 #ifdef TIERED |
75 #define TIERED_ONLY(code) code | |
76 #define NOT_TIERED(code) | |
77 #else | |
78 #define TIERED_ONLY(code) | |
79 #define NOT_TIERED(code) code | |
80 #endif // TIERED | |
81 | |
0 | 82 |
83 // PRODUCT variant | |
84 #ifdef PRODUCT | |
85 #define PRODUCT_ONLY(code) code | |
86 #define NOT_PRODUCT(code) | |
87 #define PRODUCT_RETURN {} | |
88 #define PRODUCT_RETURN0 { return 0; } | |
89 #define PRODUCT_RETURN_(code) { code } | |
90 #else // PRODUCT | |
91 #define PRODUCT_ONLY(code) | |
92 #define NOT_PRODUCT(code) code | |
93 #define PRODUCT_RETURN /*next token must be ;*/ | |
94 #define PRODUCT_RETURN0 /*next token must be ;*/ | |
95 #define PRODUCT_RETURN_(code) /*next token must be ;*/ | |
96 #endif // PRODUCT | |
97 | |
98 #ifdef CHECK_UNHANDLED_OOPS | |
99 #define CHECK_UNHANDLED_OOPS_ONLY(code) code | |
100 #define NOT_CHECK_UNHANDLED_OOPS(code) | |
101 #else | |
102 #define CHECK_UNHANDLED_OOPS_ONLY(code) | |
103 #define NOT_CHECK_UNHANDLED_OOPS(code) code | |
104 #endif // CHECK_UNHANDLED_OOPS | |
105 | |
106 #ifdef CC_INTERP | |
107 #define CC_INTERP_ONLY(code) code | |
108 #define NOT_CC_INTERP(code) | |
109 #else | |
110 #define CC_INTERP_ONLY(code) | |
111 #define NOT_CC_INTERP(code) code | |
112 #endif // CC_INTERP | |
113 | |
114 #ifdef ASSERT | |
115 #define DEBUG_ONLY(code) code | |
116 #define NOT_DEBUG(code) | |
809
6e2afda171db
6849716: BitMap - performance regression introduced with G1
jcoomes
parents:
453
diff
changeset
|
117 #define NOT_DEBUG_RETURN /*next token must be ;*/ |
0 | 118 // Historical. |
119 #define debug_only(code) code | |
120 #else // ASSERT | |
121 #define DEBUG_ONLY(code) | |
122 #define NOT_DEBUG(code) code | |
809
6e2afda171db
6849716: BitMap - performance regression introduced with G1
jcoomes
parents:
453
diff
changeset
|
123 #define NOT_DEBUG_RETURN {} |
0 | 124 #define debug_only(code) |
125 #endif // ASSERT | |
126 | |
127 #ifdef _LP64 | |
128 #define LP64_ONLY(code) code | |
129 #define NOT_LP64(code) | |
130 #else // !_LP64 | |
131 #define LP64_ONLY(code) | |
132 #define NOT_LP64(code) code | |
133 #endif // _LP64 | |
134 | |
135 #ifdef LINUX | |
136 #define LINUX_ONLY(code) code | |
137 #define NOT_LINUX(code) | |
138 #else | |
139 #define LINUX_ONLY(code) | |
140 #define NOT_LINUX(code) code | |
141 #endif | |
142 | |
143 #ifdef SOLARIS | |
144 #define SOLARIS_ONLY(code) code | |
145 #define NOT_SOLARIS(code) | |
146 #else | |
147 #define SOLARIS_ONLY(code) | |
148 #define NOT_SOLARIS(code) code | |
149 #endif | |
150 | |
151 #ifdef _WINDOWS | |
152 #define WINDOWS_ONLY(code) code | |
153 #define NOT_WINDOWS(code) | |
154 #else | |
155 #define WINDOWS_ONLY(code) | |
156 #define NOT_WINDOWS(code) code | |
157 #endif | |
158 | |
304 | 159 #if defined(IA32) || defined(AMD64) |
160 #define X86 | |
161 #define X86_ONLY(code) code | |
1692 | 162 #define NOT_X86(code) |
304 | 163 #else |
164 #undef X86 | |
165 #define X86_ONLY(code) | |
1692 | 166 #define NOT_X86(code) code |
304 | 167 #endif |
168 | |
0 | 169 #ifdef IA32 |
170 #define IA32_ONLY(code) code | |
171 #define NOT_IA32(code) | |
172 #else | |
173 #define IA32_ONLY(code) | |
174 #define NOT_IA32(code) code | |
175 #endif | |
176 | |
177 #ifdef IA64 | |
178 #define IA64_ONLY(code) code | |
179 #define NOT_IA64(code) | |
180 #else | |
181 #define IA64_ONLY(code) | |
182 #define NOT_IA64(code) code | |
183 #endif | |
184 | |
185 #ifdef AMD64 | |
186 #define AMD64_ONLY(code) code | |
187 #define NOT_AMD64(code) | |
188 #else | |
189 #define AMD64_ONLY(code) | |
190 #define NOT_AMD64(code) code | |
191 #endif | |
192 | |
193 #ifdef SPARC | |
194 #define SPARC_ONLY(code) code | |
195 #define NOT_SPARC(code) | |
196 #else | |
197 #define SPARC_ONLY(code) | |
198 #define NOT_SPARC(code) code | |
199 #endif | |
200 | |
1681
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
201 #ifdef PPC |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
202 #define PPC_ONLY(code) code |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
203 #define NOT_PPC(code) |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
204 #else |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
205 #define PPC_ONLY(code) |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
206 #define NOT_PPC(code) code |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
207 #endif |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
208 |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
209 #ifdef E500V2 |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
210 #define E500V2_ONLY(code) code |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
211 #define NOT_E500V2(code) |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
212 #else |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
213 #define E500V2_ONLY(code) |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
214 #define NOT_E500V2(code) code |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
215 #endif |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
216 |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
217 |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
218 #ifdef ARM |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
219 #define ARM_ONLY(code) code |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
220 #define NOT_ARM(code) |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
221 #else |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
222 #define ARM_ONLY(code) |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
223 #define NOT_ARM(code) code |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
224 #endif |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
225 |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
226 #ifdef JAVASE_EMBEDDED |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
227 #define EMBEDDED_ONLY(code) code |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
228 #define NOT_EMBEDDED(code) |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
229 #else |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
230 #define EMBEDDED_ONLY(code) |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
231 #define NOT_EMBEDDED(code) code |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
232 #endif |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
233 |
0 | 234 #define define_pd_global(type, name, value) const type pd_##name = value; |