author | bobv |
Tue, 03 Aug 2010 08:13:38 -0400 | |
changeset 6176 | 4d9030fe341f |
parent 5547 | f4b087cbb361 |
child 6187 | 4fa7845f7c14 |
permissions | -rw-r--r-- |
1 | 1 |
/* |
5547
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
5403
diff
changeset
|
2 |
* Copyright (c) 1997, 2009, 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 |
||
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 |
|
1606
dcf9714addbe
6684579: SoftReference processing can be made more efficient
ysr
parents:
1217
diff
changeset
|
68 |
#define NOT_COMPILER2(code) |
1 | 69 |
#else // COMPILER2 |
70 |
#define COMPILER2_PRESENT(code) |
|
1606
dcf9714addbe
6684579: SoftReference processing can be made more efficient
ysr
parents:
1217
diff
changeset
|
71 |
#define NOT_COMPILER2(code) code |
1 | 72 |
#endif // COMPILER2 |
73 |
||
74 |
||
75 |
// PRODUCT variant |
|
76 |
#ifdef PRODUCT |
|
77 |
#define PRODUCT_ONLY(code) code |
|
78 |
#define NOT_PRODUCT(code) |
|
79 |
#define PRODUCT_RETURN {} |
|
80 |
#define PRODUCT_RETURN0 { return 0; } |
|
81 |
#define PRODUCT_RETURN_(code) { code } |
|
82 |
#else // PRODUCT |
|
83 |
#define PRODUCT_ONLY(code) |
|
84 |
#define NOT_PRODUCT(code) code |
|
85 |
#define PRODUCT_RETURN /*next token must be ;*/ |
|
86 |
#define PRODUCT_RETURN0 /*next token must be ;*/ |
|
87 |
#define PRODUCT_RETURN_(code) /*next token must be ;*/ |
|
88 |
#endif // PRODUCT |
|
89 |
||
90 |
#ifdef CHECK_UNHANDLED_OOPS |
|
91 |
#define CHECK_UNHANDLED_OOPS_ONLY(code) code |
|
92 |
#define NOT_CHECK_UNHANDLED_OOPS(code) |
|
93 |
#else |
|
94 |
#define CHECK_UNHANDLED_OOPS_ONLY(code) |
|
95 |
#define NOT_CHECK_UNHANDLED_OOPS(code) code |
|
96 |
#endif // CHECK_UNHANDLED_OOPS |
|
97 |
||
98 |
#ifdef CC_INTERP |
|
99 |
#define CC_INTERP_ONLY(code) code |
|
100 |
#define NOT_CC_INTERP(code) |
|
101 |
#else |
|
102 |
#define CC_INTERP_ONLY(code) |
|
103 |
#define NOT_CC_INTERP(code) code |
|
104 |
#endif // CC_INTERP |
|
105 |
||
106 |
#ifdef ASSERT |
|
107 |
#define DEBUG_ONLY(code) code |
|
108 |
#define NOT_DEBUG(code) |
|
2998
b501bd305780
6849716: BitMap - performance regression introduced with G1
jcoomes
parents:
1606
diff
changeset
|
109 |
#define NOT_DEBUG_RETURN /*next token must be ;*/ |
1 | 110 |
// Historical. |
111 |
#define debug_only(code) code |
|
112 |
#else // ASSERT |
|
113 |
#define DEBUG_ONLY(code) |
|
114 |
#define NOT_DEBUG(code) code |
|
2998
b501bd305780
6849716: BitMap - performance regression introduced with G1
jcoomes
parents:
1606
diff
changeset
|
115 |
#define NOT_DEBUG_RETURN {} |
1 | 116 |
#define debug_only(code) |
117 |
#endif // ASSERT |
|
118 |
||
119 |
#ifdef _LP64 |
|
120 |
#define LP64_ONLY(code) code |
|
121 |
#define NOT_LP64(code) |
|
122 |
#else // !_LP64 |
|
123 |
#define LP64_ONLY(code) |
|
124 |
#define NOT_LP64(code) code |
|
125 |
#endif // _LP64 |
|
126 |
||
127 |
#ifdef LINUX |
|
128 |
#define LINUX_ONLY(code) code |
|
129 |
#define NOT_LINUX(code) |
|
130 |
#else |
|
131 |
#define LINUX_ONLY(code) |
|
132 |
#define NOT_LINUX(code) code |
|
133 |
#endif |
|
134 |
||
135 |
#ifdef SOLARIS |
|
136 |
#define SOLARIS_ONLY(code) code |
|
137 |
#define NOT_SOLARIS(code) |
|
138 |
#else |
|
139 |
#define SOLARIS_ONLY(code) |
|
140 |
#define NOT_SOLARIS(code) code |
|
141 |
#endif |
|
142 |
||
143 |
#ifdef _WINDOWS |
|
144 |
#define WINDOWS_ONLY(code) code |
|
145 |
#define NOT_WINDOWS(code) |
|
146 |
#else |
|
147 |
#define WINDOWS_ONLY(code) |
|
148 |
#define NOT_WINDOWS(code) code |
|
149 |
#endif |
|
150 |
||
1066 | 151 |
#if defined(IA32) || defined(AMD64) |
152 |
#define X86 |
|
153 |
#define X86_ONLY(code) code |
|
154 |
#else |
|
155 |
#undef X86 |
|
156 |
#define X86_ONLY(code) |
|
157 |
#endif |
|
158 |
||
1 | 159 |
#ifdef IA32 |
160 |
#define IA32_ONLY(code) code |
|
161 |
#define NOT_IA32(code) |
|
162 |
#else |
|
163 |
#define IA32_ONLY(code) |
|
164 |
#define NOT_IA32(code) code |
|
165 |
#endif |
|
166 |
||
167 |
#ifdef IA64 |
|
168 |
#define IA64_ONLY(code) code |
|
169 |
#define NOT_IA64(code) |
|
170 |
#else |
|
171 |
#define IA64_ONLY(code) |
|
172 |
#define NOT_IA64(code) code |
|
173 |
#endif |
|
174 |
||
175 |
#ifdef AMD64 |
|
176 |
#define AMD64_ONLY(code) code |
|
177 |
#define NOT_AMD64(code) |
|
178 |
#else |
|
179 |
#define AMD64_ONLY(code) |
|
180 |
#define NOT_AMD64(code) code |
|
181 |
#endif |
|
182 |
||
183 |
#ifdef SPARC |
|
184 |
#define SPARC_ONLY(code) code |
|
185 |
#define NOT_SPARC(code) |
|
186 |
#else |
|
187 |
#define SPARC_ONLY(code) |
|
188 |
#define NOT_SPARC(code) code |
|
189 |
#endif |
|
190 |
||
6176
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
191 |
#ifdef PPC |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
192 |
#define PPC_ONLY(code) code |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
193 |
#define NOT_PPC(code) |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
194 |
#else |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
195 |
#define PPC_ONLY(code) |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
196 |
#define NOT_PPC(code) code |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
197 |
#endif |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
198 |
|
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
199 |
#ifdef E500V2 |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
200 |
#define E500V2_ONLY(code) code |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
201 |
#define NOT_E500V2(code) |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
202 |
#else |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
203 |
#define E500V2_ONLY(code) |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
204 |
#define NOT_E500V2(code) code |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
205 |
#endif |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
206 |
|
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
207 |
|
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
208 |
#ifdef ARM |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
209 |
#define ARM_ONLY(code) code |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
210 |
#define NOT_ARM(code) |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
211 |
#else |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
212 |
#define ARM_ONLY(code) |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
213 |
#define NOT_ARM(code) code |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
214 |
#endif |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
215 |
|
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
216 |
#ifdef JAVASE_EMBEDDED |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
217 |
#define EMBEDDED_ONLY(code) code |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
218 |
#define NOT_EMBEDDED(code) |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
219 |
#else |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
220 |
#define EMBEDDED_ONLY(code) |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
221 |
#define NOT_EMBEDDED(code) code |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
222 |
#endif |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
223 |
|
1 | 224 |
#define define_pd_global(type, name, value) const type pd_##name = value; |