comparison src/share/vm/utilities/macros.hpp @ 6948:e522a00b91aa

Merge with http://hg.openjdk.java.net/hsx/hsx25/hotspot/ after NPG - C++ build works
author Doug Simon <doug.simon@oracle.com>
date Mon, 12 Nov 2012 23:14:12 +0100
parents 120820e30baa a3e2f723f2a5
children 5d0bb7d52783
comparison
equal deleted inserted replaced
6711:ae13cc658b80 6948:e522a00b91aa
1 /* 1 /*
2 * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 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 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
32 #define STR(a) #a 32 #define STR(a) #a
33 33
34 // Makes a string of the macro expansion of a 34 // Makes a string of the macro expansion of a
35 #define XSTR(a) STR(a) 35 #define XSTR(a) STR(a)
36 36
37 // KERNEL variant 37 // -DINCLUDE_<something>=0 | 1 can be specified on the command line to include
38 #ifdef KERNEL 38 // or exclude functionality.
39 #define COMPILER1 39
40 #define SERIALGC 40 #ifndef INCLUDE_JVMTI
41 41 #define INCLUDE_JVMTI 1
42 #define JVMTI_KERNEL 42 #endif // INCLUDE_JVMTI
43 #define FPROF_KERNEL 43
44 #define VM_STRUCTS_KERNEL 44 #if INCLUDE_JVMTI
45 #define JNICHECK_KERNEL 45 #define JVMTI_ONLY(x) x
46 #define SERVICES_KERNEL 46 #define NOT_JVMTI(x)
47 47 #define NOT_JVMTI_RETURN
48 #define KERNEL_RETURN {} 48 #define NOT_JVMTI_RETURN_(code) /* next token must be ; */
49 #define KERNEL_RETURN_(code) { return code; } 49 #else
50 50 #define JVMTI_ONLY(x)
51 #else // KERNEL 51 #define NOT_JVMTI(x) x
52 52 #define NOT_JVMTI_RETURN { return; }
53 #define KERNEL_RETURN /* next token must be ; */ 53 #define NOT_JVMTI_RETURN_(code) { return code; }
54 #define KERNEL_RETURN_(code) /* next token must be ; */ 54 #endif // INCLUDE_JVMTI
55 55
56 #endif // KERNEL 56 #ifndef INCLUDE_FPROF
57 #define INCLUDE_FPROF 1
58 #endif
59
60 #if INCLUDE_FPROF
61 #define NOT_FPROF_RETURN /* next token must be ; */
62 #define NOT_FPROF_RETURN_(code) /* next token must be ; */
63 #else
64 #define NOT_FPROF_RETURN {}
65 #define NOT_FPROF_RETURN_(code) { return code; }
66 #endif // INCLUDE_FPROF
67
68 #ifndef INCLUDE_VM_STRUCTS
69 #define INCLUDE_VM_STRUCTS 1
70 #endif
71
72 #if INCLUDE_VM_STRUCTS
73 #define NOT_VM_STRUCTS_RETURN /* next token must be ; */
74 #define NOT_VM_STRUCTS_RETURN_(code) /* next token must be ; */
75 #else
76 #define NOT_VM_STRUCTS_RETURN {}
77 #define NOT_VM_STRUCTS_RETURN_(code) { return code; }
78 #endif // INCLUDE_VM_STRUCTS
79
80 #ifndef INCLUDE_JNI_CHECK
81 #define INCLUDE_JNI_CHECK 1
82 #endif
83
84 #if INCLUDE_JNI_CHECK
85 #define NOT_JNI_CHECK_RETURN /* next token must be ; */
86 #define NOT_JNI_CHECK_RETURN_(code) /* next token must be ; */
87 #else
88 #define NOT_JNI_CHECK_RETURN {}
89 #define NOT_JNI_CHECK_RETURN_(code) { return code; }
90 #endif // INCLUDE_JNI_CHECK
91
92 #ifndef INCLUDE_SERVICES
93 #define INCLUDE_SERVICES 1
94 #endif
95
96 #if INCLUDE_SERVICES
97 #define NOT_SERVICES_RETURN /* next token must be ; */
98 #define NOT_SERVICES_RETURN_(code) /* next token must be ; */
99 #else
100 #define NOT_SERVICES_RETURN {}
101 #define NOT_SERVICES_RETURN_(code) { return code; }
102 #endif // INCLUDE_SERVICES
103
104 #ifndef INCLUDE_CDS
105 #define INCLUDE_CDS 1
106 #endif
107
108 #if INCLUDE_CDS
109 #define CDS_ONLY(x) x
110 #define NOT_CDS(x)
111 #define NOT_CDS_RETURN /* next token must be ; */
112 #define NOT_CDS_RETURN_(code) /* next token must be ; */
113 #else
114 #define CDS_ONLY(x)
115 #define NOT_CDS(x) x
116 #define NOT_CDS_RETURN {}
117 #define NOT_CDS_RETURN_(code) { return code; }
118 #endif // INCLUDE_CDS
119
120 #ifndef INCLUDE_MANAGEMENT
121 #define INCLUDE_MANAGEMENT 1
122 #endif // INCLUDE_MANAGEMENT
123
124 #if INCLUDE_MANAGEMENT
125 #define NOT_MANAGEMENT_RETURN /* next token must be ; */
126 #define NOT_MANAGEMENT_RETURN_(code) /* next token must be ; */
127 #else
128 #define NOT_MANAGEMENT_RETURN {}
129 #define NOT_MANAGEMENT_RETURN_(code) { return code; }
130 #endif // INCLUDE_MANAGEMENT
131
132 /*
133 * When INCLUDE_ALTERNATE_GCS is false the only garbage collectors
134 * included in the JVM are defaultNewGeneration and markCompact.
135 *
136 * When INCLUDE_ALTERNATE_GCS is true all garbage collectors are
137 * included in the JVM.
138 */
139 #ifndef INCLUDE_ALTERNATE_GCS
140 #define INCLUDE_ALTERNATE_GCS 1
141 #endif // INCLUDE_ALTERNATE_GCS
142
143 #if INCLUDE_ALTERNATE_GCS
144 #define NOT_ALTERNATE_GCS_RETURN /* next token must be ; */
145 #define NOT_ALTERNATE_GCS_RETURN_(code) /* next token must be ; */
146 #else
147 #define NOT_ALTERNATE_GCS_RETURN {}
148 #define NOT_ALTERNATE_GCS_RETURN_(code) { return code; }
149 #endif // INCLUDE_ALTERNATE_GCS
150
151 #ifndef INCLUDE_NMT
152 #define INCLUDE_NMT 1
153 #endif // INCLUDE_NMT
154
155 #if INCLUDE_NMT
156 #define NOT_NMT_RETURN /* next token must be ; */
157 #define NOT_NMT_RETURN_(code) /* next token must be ; */
158 #else
159 #define NOT_NMT_RETURN {}
160 #define NOT_NMT_RETURN_(code) { return code; }
161 #endif // INCLUDE_NMT
57 162
58 // COMPILER1 variant 163 // COMPILER1 variant
59 #ifdef COMPILER1 164 #ifdef COMPILER1
60 #ifdef COMPILER2 165 #ifdef COMPILER2
61 #define TIERED 166 #define TIERED
191 #else 296 #else
192 #define WIN64_ONLY(code) 297 #define WIN64_ONLY(code)
193 #define NOT_WIN64(code) code 298 #define NOT_WIN64(code) code
194 #endif 299 #endif
195 300
301 #if defined(ZERO)
302 #define ZERO_ONLY(code) code
303 #define NOT_ZERO(code)
304 #else
305 #define ZERO_ONLY(code)
306 #define NOT_ZERO(code) code
307 #endif
308
309 #if defined(SHARK)
310 #define SHARK_ONLY(code) code
311 #define NOT_SHARK(code)
312 #else
313 #define SHARK_ONLY(code)
314 #define NOT_SHARK(code) code
315 #endif
316
196 #if defined(IA32) || defined(AMD64) 317 #if defined(IA32) || defined(AMD64)
197 #define X86 318 #define X86
198 #define X86_ONLY(code) code 319 #define X86_ONLY(code) code
199 #define NOT_X86(code) 320 #define NOT_X86(code)
200 #else 321 #else