Mercurial > hg > truffle
annotate src/share/vm/utilities/macros.hpp @ 2428:5134fa1cfe63
7029036: Card-table verification hangs with all framework collectors, except G1, even before the first GC
Summary: When verifying clean card ranges, use memory-range-bounded iteration over oops of objects overlapping that range, thus avoiding the otherwise quadratic worst-case cost of scanning large object arrays.
Reviewed-by: jmasa, jwilhelm, tonyp
author | ysr |
---|---|
date | Thu, 24 Mar 2011 15:47:01 -0700 |
parents | 1b4e6a5d98e0 |
children | f08d439fab8c |
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 | |
1783 | 77 #ifdef TIERED |
78 #define TIERED_ONLY(code) code | |
79 #define NOT_TIERED(code) | |
80 #else | |
81 #define TIERED_ONLY(code) | |
82 #define NOT_TIERED(code) code | |
83 #endif // TIERED | |
84 | |
0 | 85 |
86 // PRODUCT variant | |
87 #ifdef PRODUCT | |
88 #define PRODUCT_ONLY(code) code | |
89 #define NOT_PRODUCT(code) | |
1768
6ee479178066
6979444: add command line option to print command line flags descriptions
ikrylov
parents:
1692
diff
changeset
|
90 #define NOT_PRODUCT_ARG(arg) |
0 | 91 #define PRODUCT_RETURN {} |
92 #define PRODUCT_RETURN0 { return 0; } | |
93 #define PRODUCT_RETURN_(code) { code } | |
94 #else // PRODUCT | |
95 #define PRODUCT_ONLY(code) | |
96 #define NOT_PRODUCT(code) code | |
1768
6ee479178066
6979444: add command line option to print command line flags descriptions
ikrylov
parents:
1692
diff
changeset
|
97 #define NOT_PRODUCT_ARG(arg) arg, |
0 | 98 #define PRODUCT_RETURN /*next token must be ;*/ |
99 #define PRODUCT_RETURN0 /*next token must be ;*/ | |
100 #define PRODUCT_RETURN_(code) /*next token must be ;*/ | |
101 #endif // PRODUCT | |
102 | |
103 #ifdef CHECK_UNHANDLED_OOPS | |
104 #define CHECK_UNHANDLED_OOPS_ONLY(code) code | |
105 #define NOT_CHECK_UNHANDLED_OOPS(code) | |
106 #else | |
107 #define CHECK_UNHANDLED_OOPS_ONLY(code) | |
108 #define NOT_CHECK_UNHANDLED_OOPS(code) code | |
109 #endif // CHECK_UNHANDLED_OOPS | |
110 | |
111 #ifdef CC_INTERP | |
112 #define CC_INTERP_ONLY(code) code | |
113 #define NOT_CC_INTERP(code) | |
114 #else | |
115 #define CC_INTERP_ONLY(code) | |
116 #define NOT_CC_INTERP(code) code | |
117 #endif // CC_INTERP | |
118 | |
119 #ifdef ASSERT | |
120 #define DEBUG_ONLY(code) code | |
121 #define NOT_DEBUG(code) | |
809
6e2afda171db
6849716: BitMap - performance regression introduced with G1
jcoomes
parents:
453
diff
changeset
|
122 #define NOT_DEBUG_RETURN /*next token must be ;*/ |
0 | 123 // Historical. |
124 #define debug_only(code) code | |
125 #else // ASSERT | |
126 #define DEBUG_ONLY(code) | |
127 #define NOT_DEBUG(code) code | |
809
6e2afda171db
6849716: BitMap - performance regression introduced with G1
jcoomes
parents:
453
diff
changeset
|
128 #define NOT_DEBUG_RETURN {} |
0 | 129 #define debug_only(code) |
130 #endif // ASSERT | |
131 | |
132 #ifdef _LP64 | |
133 #define LP64_ONLY(code) code | |
134 #define NOT_LP64(code) | |
135 #else // !_LP64 | |
136 #define LP64_ONLY(code) | |
137 #define NOT_LP64(code) code | |
138 #endif // _LP64 | |
139 | |
140 #ifdef LINUX | |
141 #define LINUX_ONLY(code) code | |
142 #define NOT_LINUX(code) | |
143 #else | |
144 #define LINUX_ONLY(code) | |
145 #define NOT_LINUX(code) code | |
146 #endif | |
147 | |
148 #ifdef SOLARIS | |
149 #define SOLARIS_ONLY(code) code | |
150 #define NOT_SOLARIS(code) | |
151 #else | |
152 #define SOLARIS_ONLY(code) | |
153 #define NOT_SOLARIS(code) code | |
154 #endif | |
155 | |
156 #ifdef _WINDOWS | |
157 #define WINDOWS_ONLY(code) code | |
158 #define NOT_WINDOWS(code) | |
159 #else | |
160 #define WINDOWS_ONLY(code) | |
161 #define NOT_WINDOWS(code) code | |
162 #endif | |
163 | |
2321
1b4e6a5d98e0
7012914: JSR 292 MethodHandlesTest C1: frame::verify_return_pc(return_address) failed: must be a return pc
twisti
parents:
2195
diff
changeset
|
164 #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
|
165 #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
|
166 #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
|
167 #else |
1b4e6a5d98e0
7012914: JSR 292 MethodHandlesTest C1: frame::verify_return_pc(return_address) failed: must be a return pc
twisti
parents:
2195
diff
changeset
|
168 #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
|
169 #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
|
170 #endif |
1b4e6a5d98e0
7012914: JSR 292 MethodHandlesTest C1: frame::verify_return_pc(return_address) failed: must be a return pc
twisti
parents:
2195
diff
changeset
|
171 |
304 | 172 #if defined(IA32) || defined(AMD64) |
173 #define X86 | |
174 #define X86_ONLY(code) code | |
1692 | 175 #define NOT_X86(code) |
304 | 176 #else |
177 #undef X86 | |
178 #define X86_ONLY(code) | |
1692 | 179 #define NOT_X86(code) code |
304 | 180 #endif |
181 | |
0 | 182 #ifdef IA32 |
183 #define IA32_ONLY(code) code | |
184 #define NOT_IA32(code) | |
185 #else | |
186 #define IA32_ONLY(code) | |
187 #define NOT_IA32(code) code | |
188 #endif | |
189 | |
190 #ifdef IA64 | |
191 #define IA64_ONLY(code) code | |
192 #define NOT_IA64(code) | |
193 #else | |
194 #define IA64_ONLY(code) | |
195 #define NOT_IA64(code) code | |
196 #endif | |
197 | |
198 #ifdef AMD64 | |
199 #define AMD64_ONLY(code) code | |
200 #define NOT_AMD64(code) | |
201 #else | |
202 #define AMD64_ONLY(code) | |
203 #define NOT_AMD64(code) code | |
204 #endif | |
205 | |
206 #ifdef SPARC | |
207 #define SPARC_ONLY(code) code | |
208 #define NOT_SPARC(code) | |
209 #else | |
210 #define SPARC_ONLY(code) | |
211 #define NOT_SPARC(code) code | |
212 #endif | |
213 | |
1681
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
214 #ifdef PPC |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
215 #define PPC_ONLY(code) code |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
216 #define NOT_PPC(code) |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
217 #else |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
218 #define PPC_ONLY(code) |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
219 #define NOT_PPC(code) code |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
220 #endif |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
221 |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
222 #ifdef E500V2 |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
223 #define E500V2_ONLY(code) code |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
224 #define NOT_E500V2(code) |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
225 #else |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
226 #define E500V2_ONLY(code) |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
227 #define NOT_E500V2(code) code |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
228 #endif |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
229 |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
230 |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
231 #ifdef ARM |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
232 #define ARM_ONLY(code) code |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
233 #define NOT_ARM(code) |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
234 #else |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
235 #define ARM_ONLY(code) |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
236 #define NOT_ARM(code) code |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
237 #endif |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
238 |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
239 #ifdef JAVASE_EMBEDDED |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
240 #define EMBEDDED_ONLY(code) code |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
241 #define NOT_EMBEDDED(code) |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
242 #else |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
243 #define EMBEDDED_ONLY(code) |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
244 #define NOT_EMBEDDED(code) code |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
245 #endif |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
246 |
0 | 247 #define define_pd_global(type, name, value) const type pd_##name = value; |
1972 | 248 |
249 #endif // SHARE_VM_UTILITIES_MACROS_HPP |