author | kbarrett |
Tue, 09 Jun 2015 15:05:47 -0400 | |
changeset 31340 | 2f9ff278bb13 |
parent 29474 | 81a5c5330d08 |
child 33160 | c59f1676d27e |
permissions | -rw-r--r-- |
1 | 1 |
/* |
29474
81a5c5330d08
8072383: resolve conflicts between open and closed ports
dlong
parents:
29180
diff
changeset
|
2 |
* Copyright (c) 1997, 2015, 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 |
||
7397 | 25 |
#ifndef SHARE_VM_UTILITIES_MACROS_HPP |
26 |
#define SHARE_VM_UTILITIES_MACROS_HPP |
|
27 |
||
1 | 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 |
||
31340
2f9ff278bb13
8086027: Multiple STATIC_ASSERTs at class scope doesn't work
kbarrett
parents:
29474
diff
changeset
|
37 |
// Apply pre-processor token pasting to the expansions of x and y. |
2f9ff278bb13
8086027: Multiple STATIC_ASSERTs at class scope doesn't work
kbarrett
parents:
29474
diff
changeset
|
38 |
// The token pasting operator (##) prevents its arguments from being |
2f9ff278bb13
8086027: Multiple STATIC_ASSERTs at class scope doesn't work
kbarrett
parents:
29474
diff
changeset
|
39 |
// expanded. This macro allows expansion of its arguments before the |
2f9ff278bb13
8086027: Multiple STATIC_ASSERTs at class scope doesn't work
kbarrett
parents:
29474
diff
changeset
|
40 |
// concatenation is performed. Note: One auxilliary level ought to be |
2f9ff278bb13
8086027: Multiple STATIC_ASSERTs at class scope doesn't work
kbarrett
parents:
29474
diff
changeset
|
41 |
// sufficient, but two are used because of bugs in some preprocesors. |
2f9ff278bb13
8086027: Multiple STATIC_ASSERTs at class scope doesn't work
kbarrett
parents:
29474
diff
changeset
|
42 |
#define PASTE_TOKENS(x, y) PASTE_TOKENS_AUX(x, y) |
2f9ff278bb13
8086027: Multiple STATIC_ASSERTs at class scope doesn't work
kbarrett
parents:
29474
diff
changeset
|
43 |
#define PASTE_TOKENS_AUX(x, y) PASTE_TOKENS_AUX2(x, y) |
2f9ff278bb13
8086027: Multiple STATIC_ASSERTs at class scope doesn't work
kbarrett
parents:
29474
diff
changeset
|
44 |
#define PASTE_TOKENS_AUX2(x, y) x ## y |
2f9ff278bb13
8086027: Multiple STATIC_ASSERTs at class scope doesn't work
kbarrett
parents:
29474
diff
changeset
|
45 |
|
13975
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
46 |
// -DINCLUDE_<something>=0 | 1 can be specified on the command line to include |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
47 |
// or exclude functionality. |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
48 |
|
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
49 |
#ifndef INCLUDE_JVMTI |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
50 |
#define INCLUDE_JVMTI 1 |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
51 |
#endif // INCLUDE_JVMTI |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
52 |
|
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
53 |
#if INCLUDE_JVMTI |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
54 |
#define JVMTI_ONLY(x) x |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
55 |
#define NOT_JVMTI(x) |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
56 |
#define NOT_JVMTI_RETURN |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
57 |
#define NOT_JVMTI_RETURN_(code) /* next token must be ; */ |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
58 |
#else |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
59 |
#define JVMTI_ONLY(x) |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
60 |
#define NOT_JVMTI(x) x |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
61 |
#define NOT_JVMTI_RETURN { return; } |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
62 |
#define NOT_JVMTI_RETURN_(code) { return code; } |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
63 |
#endif // INCLUDE_JVMTI |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
64 |
|
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
65 |
#ifndef INCLUDE_FPROF |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
66 |
#define INCLUDE_FPROF 1 |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
67 |
#endif |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
68 |
|
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
69 |
#if INCLUDE_FPROF |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
70 |
#define NOT_FPROF_RETURN /* next token must be ; */ |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
71 |
#define NOT_FPROF_RETURN_(code) /* next token must be ; */ |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
72 |
#else |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
73 |
#define NOT_FPROF_RETURN {} |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
74 |
#define NOT_FPROF_RETURN_(code) { return code; } |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
75 |
#endif // INCLUDE_FPROF |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
76 |
|
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
77 |
#ifndef INCLUDE_VM_STRUCTS |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
78 |
#define INCLUDE_VM_STRUCTS 1 |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
79 |
#endif |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
80 |
|
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
81 |
#if INCLUDE_VM_STRUCTS |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
82 |
#define NOT_VM_STRUCTS_RETURN /* next token must be ; */ |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
83 |
#define NOT_VM_STRUCTS_RETURN_(code) /* next token must be ; */ |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
84 |
#else |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
85 |
#define NOT_VM_STRUCTS_RETURN {} |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
86 |
#define NOT_VM_STRUCTS_RETURN_(code) { return code; } |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
87 |
#endif // INCLUDE_VM_STRUCTS |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
88 |
|
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
89 |
#ifndef INCLUDE_JNI_CHECK |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
90 |
#define INCLUDE_JNI_CHECK 1 |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
91 |
#endif |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
92 |
|
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
93 |
#if INCLUDE_JNI_CHECK |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
94 |
#define NOT_JNI_CHECK_RETURN /* next token must be ; */ |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
95 |
#define NOT_JNI_CHECK_RETURN_(code) /* next token must be ; */ |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
96 |
#else |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
97 |
#define NOT_JNI_CHECK_RETURN {} |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
98 |
#define NOT_JNI_CHECK_RETURN_(code) { return code; } |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
99 |
#endif // INCLUDE_JNI_CHECK |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
100 |
|
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
101 |
#ifndef INCLUDE_SERVICES |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
102 |
#define INCLUDE_SERVICES 1 |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
103 |
#endif |
1 | 104 |
|
13975
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
105 |
#if INCLUDE_SERVICES |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
106 |
#define NOT_SERVICES_RETURN /* next token must be ; */ |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
107 |
#define NOT_SERVICES_RETURN_(code) /* next token must be ; */ |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
108 |
#else |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
109 |
#define NOT_SERVICES_RETURN {} |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
110 |
#define NOT_SERVICES_RETURN_(code) { return code; } |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
111 |
#endif // INCLUDE_SERVICES |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
112 |
|
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
113 |
#ifndef INCLUDE_CDS |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
114 |
#define INCLUDE_CDS 1 |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
115 |
#endif |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
116 |
|
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
117 |
#if INCLUDE_CDS |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
118 |
#define CDS_ONLY(x) x |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
119 |
#define NOT_CDS(x) |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
120 |
#define NOT_CDS_RETURN /* next token must be ; */ |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
121 |
#define NOT_CDS_RETURN_(code) /* next token must be ; */ |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
122 |
#else |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
123 |
#define CDS_ONLY(x) |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
124 |
#define NOT_CDS(x) x |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
125 |
#define NOT_CDS_RETURN {} |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
126 |
#define NOT_CDS_RETURN_(code) { return code; } |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
127 |
#endif // INCLUDE_CDS |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
128 |
|
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
129 |
#ifndef INCLUDE_MANAGEMENT |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
130 |
#define INCLUDE_MANAGEMENT 1 |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
131 |
#endif // INCLUDE_MANAGEMENT |
1 | 132 |
|
13975
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
133 |
#if INCLUDE_MANAGEMENT |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
134 |
#define NOT_MANAGEMENT_RETURN /* next token must be ; */ |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
135 |
#define NOT_MANAGEMENT_RETURN_(code) /* next token must be ; */ |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
136 |
#else |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
137 |
#define NOT_MANAGEMENT_RETURN {} |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
138 |
#define NOT_MANAGEMENT_RETURN_(code) { return code; } |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
139 |
#endif // INCLUDE_MANAGEMENT |
1 | 140 |
|
13975
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
141 |
/* |
15482
470d0b0c09f1
8005915: Unify SERIALGC and INCLUDE_ALTERNATE_GCS
jprovino
parents:
14294
diff
changeset
|
142 |
* When INCLUDE_ALL_GCS is false the only garbage collectors |
13975
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
143 |
* included in the JVM are defaultNewGeneration and markCompact. |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
144 |
* |
15482
470d0b0c09f1
8005915: Unify SERIALGC and INCLUDE_ALTERNATE_GCS
jprovino
parents:
14294
diff
changeset
|
145 |
* When INCLUDE_ALL_GCS is true all garbage collectors are |
13975
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
146 |
* included in the JVM. |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
147 |
*/ |
15482
470d0b0c09f1
8005915: Unify SERIALGC and INCLUDE_ALTERNATE_GCS
jprovino
parents:
14294
diff
changeset
|
148 |
#ifndef INCLUDE_ALL_GCS |
470d0b0c09f1
8005915: Unify SERIALGC and INCLUDE_ALTERNATE_GCS
jprovino
parents:
14294
diff
changeset
|
149 |
#define INCLUDE_ALL_GCS 1 |
470d0b0c09f1
8005915: Unify SERIALGC and INCLUDE_ALTERNATE_GCS
jprovino
parents:
14294
diff
changeset
|
150 |
#endif // INCLUDE_ALL_GCS |
1 | 151 |
|
15482
470d0b0c09f1
8005915: Unify SERIALGC and INCLUDE_ALTERNATE_GCS
jprovino
parents:
14294
diff
changeset
|
152 |
#if INCLUDE_ALL_GCS |
470d0b0c09f1
8005915: Unify SERIALGC and INCLUDE_ALTERNATE_GCS
jprovino
parents:
14294
diff
changeset
|
153 |
#define NOT_ALL_GCS_RETURN /* next token must be ; */ |
470d0b0c09f1
8005915: Unify SERIALGC and INCLUDE_ALTERNATE_GCS
jprovino
parents:
14294
diff
changeset
|
154 |
#define NOT_ALL_GCS_RETURN_(code) /* next token must be ; */ |
13975
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
155 |
#else |
15482
470d0b0c09f1
8005915: Unify SERIALGC and INCLUDE_ALTERNATE_GCS
jprovino
parents:
14294
diff
changeset
|
156 |
#define NOT_ALL_GCS_RETURN {} |
470d0b0c09f1
8005915: Unify SERIALGC and INCLUDE_ALTERNATE_GCS
jprovino
parents:
14294
diff
changeset
|
157 |
#define NOT_ALL_GCS_RETURN_(code) { return code; } |
470d0b0c09f1
8005915: Unify SERIALGC and INCLUDE_ALTERNATE_GCS
jprovino
parents:
14294
diff
changeset
|
158 |
#endif // INCLUDE_ALL_GCS |
1 | 159 |
|
13975
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
160 |
#ifndef INCLUDE_NMT |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
161 |
#define INCLUDE_NMT 1 |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
162 |
#endif // INCLUDE_NMT |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
163 |
|
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
164 |
#if INCLUDE_NMT |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
165 |
#define NOT_NMT_RETURN /* next token must be ; */ |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
166 |
#define NOT_NMT_RETURN_(code) /* next token must be ; */ |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
167 |
#else |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
168 |
#define NOT_NMT_RETURN {} |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
169 |
#define NOT_NMT_RETURN_(code) { return code; } |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
170 |
#endif // INCLUDE_NMT |
1 | 171 |
|
18025 | 172 |
#ifndef INCLUDE_TRACE |
173 |
#define INCLUDE_TRACE 1 |
|
174 |
#endif // INCLUDE_TRACE |
|
175 |
||
1 | 176 |
// COMPILER1 variant |
177 |
#ifdef COMPILER1 |
|
178 |
#ifdef COMPILER2 |
|
179 |
#define TIERED |
|
180 |
#endif |
|
181 |
#define COMPILER1_PRESENT(code) code |
|
182 |
#else // COMPILER1 |
|
183 |
#define COMPILER1_PRESENT(code) |
|
184 |
#endif // COMPILER1 |
|
185 |
||
186 |
// COMPILER2 variant |
|
187 |
#ifdef COMPILER2 |
|
188 |
#define COMPILER2_PRESENT(code) code |
|
1606
dcf9714addbe
6684579: SoftReference processing can be made more efficient
ysr
parents:
1217
diff
changeset
|
189 |
#define NOT_COMPILER2(code) |
1 | 190 |
#else // COMPILER2 |
191 |
#define COMPILER2_PRESENT(code) |
|
1606
dcf9714addbe
6684579: SoftReference processing can be made more efficient
ysr
parents:
1217
diff
changeset
|
192 |
#define NOT_COMPILER2(code) code |
1 | 193 |
#endif // COMPILER2 |
194 |
||
6453 | 195 |
#ifdef TIERED |
196 |
#define TIERED_ONLY(code) code |
|
197 |
#define NOT_TIERED(code) |
|
198 |
#else |
|
199 |
#define TIERED_ONLY(code) |
|
200 |
#define NOT_TIERED(code) code |
|
201 |
#endif // TIERED |
|
202 |
||
1 | 203 |
|
204 |
// PRODUCT variant |
|
205 |
#ifdef PRODUCT |
|
206 |
#define PRODUCT_ONLY(code) code |
|
207 |
#define NOT_PRODUCT(code) |
|
6438
ace4f8100e90
6979444: add command line option to print command line flags descriptions
ikrylov
parents:
6187
diff
changeset
|
208 |
#define NOT_PRODUCT_ARG(arg) |
1 | 209 |
#define PRODUCT_RETURN {} |
210 |
#define PRODUCT_RETURN0 { return 0; } |
|
211 |
#define PRODUCT_RETURN_(code) { code } |
|
212 |
#else // PRODUCT |
|
213 |
#define PRODUCT_ONLY(code) |
|
214 |
#define NOT_PRODUCT(code) code |
|
6438
ace4f8100e90
6979444: add command line option to print command line flags descriptions
ikrylov
parents:
6187
diff
changeset
|
215 |
#define NOT_PRODUCT_ARG(arg) arg, |
1 | 216 |
#define PRODUCT_RETURN /*next token must be ;*/ |
217 |
#define PRODUCT_RETURN0 /*next token must be ;*/ |
|
218 |
#define PRODUCT_RETURN_(code) /*next token must be ;*/ |
|
219 |
#endif // PRODUCT |
|
220 |
||
221 |
#ifdef CHECK_UNHANDLED_OOPS |
|
222 |
#define CHECK_UNHANDLED_OOPS_ONLY(code) code |
|
223 |
#define NOT_CHECK_UNHANDLED_OOPS(code) |
|
224 |
#else |
|
225 |
#define CHECK_UNHANDLED_OOPS_ONLY(code) |
|
226 |
#define NOT_CHECK_UNHANDLED_OOPS(code) code |
|
227 |
#endif // CHECK_UNHANDLED_OOPS |
|
228 |
||
229 |
#ifdef CC_INTERP |
|
230 |
#define CC_INTERP_ONLY(code) code |
|
231 |
#define NOT_CC_INTERP(code) |
|
232 |
#else |
|
233 |
#define CC_INTERP_ONLY(code) |
|
234 |
#define NOT_CC_INTERP(code) code |
|
235 |
#endif // CC_INTERP |
|
236 |
||
237 |
#ifdef ASSERT |
|
238 |
#define DEBUG_ONLY(code) code |
|
239 |
#define NOT_DEBUG(code) |
|
2998
b501bd305780
6849716: BitMap - performance regression introduced with G1
jcoomes
parents:
1606
diff
changeset
|
240 |
#define NOT_DEBUG_RETURN /*next token must be ;*/ |
1 | 241 |
// Historical. |
242 |
#define debug_only(code) code |
|
243 |
#else // ASSERT |
|
244 |
#define DEBUG_ONLY(code) |
|
245 |
#define NOT_DEBUG(code) code |
|
2998
b501bd305780
6849716: BitMap - performance regression introduced with G1
jcoomes
parents:
1606
diff
changeset
|
246 |
#define NOT_DEBUG_RETURN {} |
1 | 247 |
#define debug_only(code) |
248 |
#endif // ASSERT |
|
249 |
||
250 |
#ifdef _LP64 |
|
251 |
#define LP64_ONLY(code) code |
|
252 |
#define NOT_LP64(code) |
|
253 |
#else // !_LP64 |
|
254 |
#define LP64_ONLY(code) |
|
255 |
#define NOT_LP64(code) code |
|
256 |
#endif // _LP64 |
|
257 |
||
258 |
#ifdef LINUX |
|
259 |
#define LINUX_ONLY(code) code |
|
260 |
#define NOT_LINUX(code) |
|
261 |
#else |
|
262 |
#define LINUX_ONLY(code) |
|
263 |
#define NOT_LINUX(code) code |
|
264 |
#endif |
|
265 |
||
22827 | 266 |
#ifdef AIX |
267 |
#define AIX_ONLY(code) code |
|
268 |
#define NOT_AIX(code) |
|
269 |
#else |
|
270 |
#define AIX_ONLY(code) |
|
271 |
#define NOT_AIX(code) code |
|
272 |
#endif |
|
273 |
||
1 | 274 |
#ifdef SOLARIS |
275 |
#define SOLARIS_ONLY(code) code |
|
276 |
#define NOT_SOLARIS(code) |
|
277 |
#else |
|
278 |
#define SOLARIS_ONLY(code) |
|
279 |
#define NOT_SOLARIS(code) code |
|
280 |
#endif |
|
281 |
||
282 |
#ifdef _WINDOWS |
|
283 |
#define WINDOWS_ONLY(code) code |
|
284 |
#define NOT_WINDOWS(code) |
|
285 |
#else |
|
286 |
#define WINDOWS_ONLY(code) |
|
287 |
#define NOT_WINDOWS(code) code |
|
288 |
#endif |
|
289 |
||
10565 | 290 |
#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__APPLE__) |
291 |
#define BSD_ONLY(code) code |
|
292 |
#define NOT_BSD(code) |
|
293 |
#else |
|
294 |
#define BSD_ONLY(code) |
|
295 |
#define NOT_BSD(code) code |
|
296 |
#endif |
|
297 |
||
8495
a4959965eaa3
7012914: JSR 292 MethodHandlesTest C1: frame::verify_return_pc(return_address) failed: must be a return pc
twisti
parents:
8110
diff
changeset
|
298 |
#ifdef _WIN64 |
a4959965eaa3
7012914: JSR 292 MethodHandlesTest C1: frame::verify_return_pc(return_address) failed: must be a return pc
twisti
parents:
8110
diff
changeset
|
299 |
#define WIN64_ONLY(code) code |
a4959965eaa3
7012914: JSR 292 MethodHandlesTest C1: frame::verify_return_pc(return_address) failed: must be a return pc
twisti
parents:
8110
diff
changeset
|
300 |
#define NOT_WIN64(code) |
a4959965eaa3
7012914: JSR 292 MethodHandlesTest C1: frame::verify_return_pc(return_address) failed: must be a return pc
twisti
parents:
8110
diff
changeset
|
301 |
#else |
a4959965eaa3
7012914: JSR 292 MethodHandlesTest C1: frame::verify_return_pc(return_address) failed: must be a return pc
twisti
parents:
8110
diff
changeset
|
302 |
#define WIN64_ONLY(code) |
a4959965eaa3
7012914: JSR 292 MethodHandlesTest C1: frame::verify_return_pc(return_address) failed: must be a return pc
twisti
parents:
8110
diff
changeset
|
303 |
#define NOT_WIN64(code) code |
a4959965eaa3
7012914: JSR 292 MethodHandlesTest C1: frame::verify_return_pc(return_address) failed: must be a return pc
twisti
parents:
8110
diff
changeset
|
304 |
#endif |
a4959965eaa3
7012914: JSR 292 MethodHandlesTest C1: frame::verify_return_pc(return_address) failed: must be a return pc
twisti
parents:
8110
diff
changeset
|
305 |
|
14294 | 306 |
#if defined(ZERO) |
307 |
#define ZERO_ONLY(code) code |
|
308 |
#define NOT_ZERO(code) |
|
309 |
#else |
|
310 |
#define ZERO_ONLY(code) |
|
311 |
#define NOT_ZERO(code) code |
|
312 |
#endif |
|
313 |
||
314 |
#if defined(SHARK) |
|
315 |
#define SHARK_ONLY(code) code |
|
316 |
#define NOT_SHARK(code) |
|
317 |
#else |
|
318 |
#define SHARK_ONLY(code) |
|
319 |
#define NOT_SHARK(code) code |
|
320 |
#endif |
|
321 |
||
1066 | 322 |
#if defined(IA32) || defined(AMD64) |
323 |
#define X86 |
|
324 |
#define X86_ONLY(code) code |
|
6187 | 325 |
#define NOT_X86(code) |
1066 | 326 |
#else |
327 |
#undef X86 |
|
328 |
#define X86_ONLY(code) |
|
6187 | 329 |
#define NOT_X86(code) code |
1066 | 330 |
#endif |
331 |
||
1 | 332 |
#ifdef IA32 |
333 |
#define IA32_ONLY(code) code |
|
334 |
#define NOT_IA32(code) |
|
335 |
#else |
|
336 |
#define IA32_ONLY(code) |
|
337 |
#define NOT_IA32(code) code |
|
338 |
#endif |
|
339 |
||
22819
f88b9c394e42
8019973: PPC64 (part 11): Fix IA64 preprocessor conditionals on AIX.
goetz
parents:
22808
diff
changeset
|
340 |
// This is a REALLY BIG HACK, but on AIX <sys/systemcfg.h> unconditionally defines IA64. |
f88b9c394e42
8019973: PPC64 (part 11): Fix IA64 preprocessor conditionals on AIX.
goetz
parents:
22808
diff
changeset
|
341 |
// At least on AIX 7.1 this is a real problem because 'systemcfg.h' is indirectly included |
f88b9c394e42
8019973: PPC64 (part 11): Fix IA64 preprocessor conditionals on AIX.
goetz
parents:
22808
diff
changeset
|
342 |
// by 'pthread.h' and other common system headers. |
f88b9c394e42
8019973: PPC64 (part 11): Fix IA64 preprocessor conditionals on AIX.
goetz
parents:
22808
diff
changeset
|
343 |
|
f88b9c394e42
8019973: PPC64 (part 11): Fix IA64 preprocessor conditionals on AIX.
goetz
parents:
22808
diff
changeset
|
344 |
#if defined(IA64) && !defined(AIX) |
1 | 345 |
#define IA64_ONLY(code) code |
346 |
#define NOT_IA64(code) |
|
347 |
#else |
|
348 |
#define IA64_ONLY(code) |
|
349 |
#define NOT_IA64(code) code |
|
350 |
#endif |
|
351 |
||
352 |
#ifdef AMD64 |
|
353 |
#define AMD64_ONLY(code) code |
|
354 |
#define NOT_AMD64(code) |
|
355 |
#else |
|
356 |
#define AMD64_ONLY(code) |
|
357 |
#define NOT_AMD64(code) code |
|
358 |
#endif |
|
359 |
||
360 |
#ifdef SPARC |
|
361 |
#define SPARC_ONLY(code) code |
|
362 |
#define NOT_SPARC(code) |
|
363 |
#else |
|
364 |
#define SPARC_ONLY(code) |
|
365 |
#define NOT_SPARC(code) code |
|
366 |
#endif |
|
367 |
||
22806 | 368 |
#if defined(PPC32) || defined(PPC64) |
369 |
#ifndef PPC |
|
370 |
#define PPC |
|
371 |
#endif |
|
6176
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
372 |
#define PPC_ONLY(code) code |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
373 |
#define NOT_PPC(code) |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
374 |
#else |
22806 | 375 |
#undef PPC |
6176
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
376 |
#define PPC_ONLY(code) |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
377 |
#define NOT_PPC(code) code |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
378 |
#endif |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
379 |
|
22806 | 380 |
#ifdef PPC32 |
381 |
#define PPC32_ONLY(code) code |
|
382 |
#define NOT_PPC32(code) |
|
383 |
#else |
|
384 |
#define PPC32_ONLY(code) |
|
385 |
#define NOT_PPC32(code) code |
|
386 |
#endif |
|
387 |
||
388 |
#ifdef PPC64 |
|
389 |
#define PPC64_ONLY(code) code |
|
390 |
#define NOT_PPC64(code) |
|
391 |
#else |
|
392 |
#define PPC64_ONLY(code) |
|
393 |
#define NOT_PPC64(code) code |
|
394 |
#endif |
|
395 |
||
6176
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
396 |
#ifdef E500V2 |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
397 |
#define E500V2_ONLY(code) code |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
398 |
#define NOT_E500V2(code) |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
399 |
#else |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
400 |
#define E500V2_ONLY(code) |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
401 |
#define NOT_E500V2(code) code |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
402 |
#endif |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
403 |
|
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
404 |
#ifdef ARM |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
405 |
#define ARM_ONLY(code) code |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
406 |
#define NOT_ARM(code) |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
407 |
#else |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
408 |
#define ARM_ONLY(code) |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
409 |
#define NOT_ARM(code) code |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
410 |
#endif |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
411 |
|
29474
81a5c5330d08
8072383: resolve conflicts between open and closed ports
dlong
parents:
29180
diff
changeset
|
412 |
#ifdef ARM32 |
81a5c5330d08
8072383: resolve conflicts between open and closed ports
dlong
parents:
29180
diff
changeset
|
413 |
#define ARM32_ONLY(code) code |
81a5c5330d08
8072383: resolve conflicts between open and closed ports
dlong
parents:
29180
diff
changeset
|
414 |
#define NOT_ARM32(code) |
81a5c5330d08
8072383: resolve conflicts between open and closed ports
dlong
parents:
29180
diff
changeset
|
415 |
#else |
81a5c5330d08
8072383: resolve conflicts between open and closed ports
dlong
parents:
29180
diff
changeset
|
416 |
#define ARM32_ONLY(code) |
81a5c5330d08
8072383: resolve conflicts between open and closed ports
dlong
parents:
29180
diff
changeset
|
417 |
#define NOT_ARM32(code) code |
81a5c5330d08
8072383: resolve conflicts between open and closed ports
dlong
parents:
29180
diff
changeset
|
418 |
#endif |
81a5c5330d08
8072383: resolve conflicts between open and closed ports
dlong
parents:
29180
diff
changeset
|
419 |
|
29180 | 420 |
#ifdef AARCH64 |
421 |
#define AARCH64_ONLY(code) code |
|
422 |
#define NOT_AARCH64(code) |
|
423 |
#else |
|
424 |
#define AARCH64_ONLY(code) |
|
425 |
#define NOT_AARCH64(code) code |
|
426 |
#endif |
|
427 |
||
6176
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
428 |
#ifdef JAVASE_EMBEDDED |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
429 |
#define EMBEDDED_ONLY(code) code |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
430 |
#define NOT_EMBEDDED(code) |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
431 |
#else |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
432 |
#define EMBEDDED_ONLY(code) |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
433 |
#define NOT_EMBEDDED(code) code |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
434 |
#endif |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
435 |
|
1 | 436 |
#define define_pd_global(type, name, value) const type pd_##name = value; |
7397 | 437 |
|
438 |
#endif // SHARE_VM_UTILITIES_MACROS_HPP |