author | redestad |
Sun, 11 Dec 2016 12:20:45 +0100 | |
changeset 42469 | d1c0a9123f87 |
parent 42062 | 473286891dd8 |
child 42650 | 1f304d0c888b |
permissions | -rw-r--r-- |
1 | 1 |
/* |
37272
c427db4ea8c4
8148639: Some MethodCounter fields can be excluded when not including C2
cjplummer
parents:
36350
diff
changeset
|
2 |
* Copyright (c) 1997, 2016, 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 |
||
38704
eb96c446c3a5
8156548: gc/gctests/StringInternSyncWithGC2 fails with Test level exit status: 151
kbarrett
parents:
37272
diff
changeset
|
37 |
// Allow commas in macro arguments. |
eb96c446c3a5
8156548: gc/gctests/StringInternSyncWithGC2 fails with Test level exit status: 151
kbarrett
parents:
37272
diff
changeset
|
38 |
#define COMMA , |
eb96c446c3a5
8156548: gc/gctests/StringInternSyncWithGC2 fails with Test level exit status: 151
kbarrett
parents:
37272
diff
changeset
|
39 |
|
31340
2f9ff278bb13
8086027: Multiple STATIC_ASSERTs at class scope doesn't work
kbarrett
parents:
29474
diff
changeset
|
40 |
// 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
|
41 |
// 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
|
42 |
// 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
|
43 |
// 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
|
44 |
// 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
|
45 |
#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
|
46 |
#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
|
47 |
#define PASTE_TOKENS_AUX2(x, y) x ## y |
2f9ff278bb13
8086027: Multiple STATIC_ASSERTs at class scope doesn't work
kbarrett
parents:
29474
diff
changeset
|
48 |
|
13975
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
49 |
// -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
|
50 |
// or exclude functionality. |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
51 |
|
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
52 |
#ifndef INCLUDE_JVMTI |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
53 |
#define INCLUDE_JVMTI 1 |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
54 |
#endif // INCLUDE_JVMTI |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
55 |
|
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
56 |
#if INCLUDE_JVMTI |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
57 |
#define JVMTI_ONLY(x) x |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
58 |
#define NOT_JVMTI(x) |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
59 |
#define NOT_JVMTI_RETURN |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
60 |
#define NOT_JVMTI_RETURN_(code) /* next token must be ; */ |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
61 |
#else |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
62 |
#define JVMTI_ONLY(x) |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
63 |
#define NOT_JVMTI(x) x |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
64 |
#define NOT_JVMTI_RETURN { return; } |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
65 |
#define NOT_JVMTI_RETURN_(code) { return code; } |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
66 |
#endif // INCLUDE_JVMTI |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
67 |
|
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
68 |
#ifndef INCLUDE_FPROF |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
69 |
#define INCLUDE_FPROF 1 |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
70 |
#endif |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
71 |
|
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
72 |
#if INCLUDE_FPROF |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
73 |
#define NOT_FPROF_RETURN /* next token must be ; */ |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
74 |
#define NOT_FPROF_RETURN_(code) /* next token must be ; */ |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
75 |
#else |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
76 |
#define NOT_FPROF_RETURN {} |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
77 |
#define NOT_FPROF_RETURN_(code) { return code; } |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
78 |
#endif // INCLUDE_FPROF |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
79 |
|
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
80 |
#ifndef INCLUDE_VM_STRUCTS |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
81 |
#define INCLUDE_VM_STRUCTS 1 |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
82 |
#endif |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
83 |
|
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
84 |
#if INCLUDE_VM_STRUCTS |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
85 |
#define NOT_VM_STRUCTS_RETURN /* next token must be ; */ |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
86 |
#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
|
87 |
#else |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
88 |
#define NOT_VM_STRUCTS_RETURN {} |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
89 |
#define NOT_VM_STRUCTS_RETURN_(code) { return code; } |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
90 |
#endif // INCLUDE_VM_STRUCTS |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
91 |
|
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
92 |
#ifndef INCLUDE_JNI_CHECK |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
93 |
#define INCLUDE_JNI_CHECK 1 |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
94 |
#endif |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
95 |
|
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
96 |
#if INCLUDE_JNI_CHECK |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
97 |
#define NOT_JNI_CHECK_RETURN /* next token must be ; */ |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
98 |
#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
|
99 |
#else |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
100 |
#define NOT_JNI_CHECK_RETURN {} |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
101 |
#define NOT_JNI_CHECK_RETURN_(code) { return code; } |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
102 |
#endif // INCLUDE_JNI_CHECK |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
103 |
|
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
104 |
#ifndef INCLUDE_SERVICES |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
105 |
#define INCLUDE_SERVICES 1 |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
106 |
#endif |
1 | 107 |
|
13975
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
108 |
#if INCLUDE_SERVICES |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
109 |
#define NOT_SERVICES_RETURN /* next token must be ; */ |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
110 |
#define NOT_SERVICES_RETURN_(code) /* next token must be ; */ |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
111 |
#else |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
112 |
#define NOT_SERVICES_RETURN {} |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
113 |
#define NOT_SERVICES_RETURN_(code) { return code; } |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
114 |
#endif // INCLUDE_SERVICES |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
115 |
|
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
116 |
#ifndef INCLUDE_CDS |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
117 |
#define INCLUDE_CDS 1 |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
118 |
#endif |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
119 |
|
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
120 |
#if INCLUDE_CDS |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
121 |
#define CDS_ONLY(x) x |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
122 |
#define NOT_CDS(x) |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
123 |
#define NOT_CDS_RETURN /* next token must be ; */ |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
124 |
#define NOT_CDS_RETURN_(code) /* next token must be ; */ |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
125 |
#else |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
126 |
#define CDS_ONLY(x) |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
127 |
#define NOT_CDS(x) x |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
128 |
#define NOT_CDS_RETURN {} |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
129 |
#define NOT_CDS_RETURN_(code) { return code; } |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
130 |
#endif // INCLUDE_CDS |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
131 |
|
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
132 |
#ifndef INCLUDE_MANAGEMENT |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
133 |
#define INCLUDE_MANAGEMENT 1 |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
134 |
#endif // INCLUDE_MANAGEMENT |
1 | 135 |
|
13975
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
136 |
#if INCLUDE_MANAGEMENT |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
137 |
#define NOT_MANAGEMENT_RETURN /* next token must be ; */ |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
138 |
#define NOT_MANAGEMENT_RETURN_(code) /* next token must be ; */ |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
139 |
#else |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
140 |
#define NOT_MANAGEMENT_RETURN {} |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
141 |
#define NOT_MANAGEMENT_RETURN_(code) { return code; } |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
142 |
#endif // INCLUDE_MANAGEMENT |
1 | 143 |
|
13975
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 false the only garbage collectors |
13975
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
146 |
* included in the JVM are defaultNewGeneration and markCompact. |
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 |
* 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
|
149 |
* included in the JVM. |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
150 |
*/ |
15482
470d0b0c09f1
8005915: Unify SERIALGC and INCLUDE_ALTERNATE_GCS
jprovino
parents:
14294
diff
changeset
|
151 |
#ifndef INCLUDE_ALL_GCS |
470d0b0c09f1
8005915: Unify SERIALGC and INCLUDE_ALTERNATE_GCS
jprovino
parents:
14294
diff
changeset
|
152 |
#define INCLUDE_ALL_GCS 1 |
470d0b0c09f1
8005915: Unify SERIALGC and INCLUDE_ALTERNATE_GCS
jprovino
parents:
14294
diff
changeset
|
153 |
#endif // INCLUDE_ALL_GCS |
1 | 154 |
|
15482
470d0b0c09f1
8005915: Unify SERIALGC and INCLUDE_ALTERNATE_GCS
jprovino
parents:
14294
diff
changeset
|
155 |
#if INCLUDE_ALL_GCS |
470d0b0c09f1
8005915: Unify SERIALGC and INCLUDE_ALTERNATE_GCS
jprovino
parents:
14294
diff
changeset
|
156 |
#define NOT_ALL_GCS_RETURN /* next token must be ; */ |
470d0b0c09f1
8005915: Unify SERIALGC and INCLUDE_ALTERNATE_GCS
jprovino
parents:
14294
diff
changeset
|
157 |
#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
|
158 |
#else |
15482
470d0b0c09f1
8005915: Unify SERIALGC and INCLUDE_ALTERNATE_GCS
jprovino
parents:
14294
diff
changeset
|
159 |
#define NOT_ALL_GCS_RETURN {} |
470d0b0c09f1
8005915: Unify SERIALGC and INCLUDE_ALTERNATE_GCS
jprovino
parents:
14294
diff
changeset
|
160 |
#define NOT_ALL_GCS_RETURN_(code) { return code; } |
470d0b0c09f1
8005915: Unify SERIALGC and INCLUDE_ALTERNATE_GCS
jprovino
parents:
14294
diff
changeset
|
161 |
#endif // INCLUDE_ALL_GCS |
1 | 162 |
|
13975
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
163 |
#ifndef INCLUDE_NMT |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
164 |
#define INCLUDE_NMT 1 |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
165 |
#endif // INCLUDE_NMT |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
166 |
|
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
167 |
#if INCLUDE_NMT |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
168 |
#define NOT_NMT_RETURN /* next token must be ; */ |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
169 |
#define NOT_NMT_RETURN_(code) /* next token must be ; */ |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
170 |
#else |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
171 |
#define NOT_NMT_RETURN {} |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
172 |
#define NOT_NMT_RETURN_(code) { return code; } |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
10565
diff
changeset
|
173 |
#endif // INCLUDE_NMT |
1 | 174 |
|
18025 | 175 |
#ifndef INCLUDE_TRACE |
176 |
#define INCLUDE_TRACE 1 |
|
177 |
#endif // INCLUDE_TRACE |
|
178 |
||
33160
c59f1676d27e
8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
31340
diff
changeset
|
179 |
#ifndef INCLUDE_JVMCI |
c59f1676d27e
8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
31340
diff
changeset
|
180 |
#define INCLUDE_JVMCI 1 |
c59f1676d27e
8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
31340
diff
changeset
|
181 |
#endif |
c59f1676d27e
8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
31340
diff
changeset
|
182 |
|
c59f1676d27e
8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
31340
diff
changeset
|
183 |
#if INCLUDE_JVMCI |
c59f1676d27e
8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
31340
diff
changeset
|
184 |
#define JVMCI_ONLY(code) code |
c59f1676d27e
8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
31340
diff
changeset
|
185 |
#define NOT_JVMCI(code) |
c59f1676d27e
8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
31340
diff
changeset
|
186 |
#define NOT_JVMCI_RETURN /* next token must be ; */ |
c59f1676d27e
8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
31340
diff
changeset
|
187 |
#else |
c59f1676d27e
8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
31340
diff
changeset
|
188 |
#define JVMCI_ONLY(code) |
c59f1676d27e
8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
31340
diff
changeset
|
189 |
#define NOT_JVMCI(code) code |
c59f1676d27e
8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
31340
diff
changeset
|
190 |
#define NOT_JVMCI_RETURN {} |
c59f1676d27e
8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
31340
diff
changeset
|
191 |
#endif // INCLUDE_JVMCI |
c59f1676d27e
8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
31340
diff
changeset
|
192 |
|
1 | 193 |
// COMPILER1 variant |
194 |
#ifdef COMPILER1 |
|
195 |
#ifdef COMPILER2 |
|
196 |
#define TIERED |
|
197 |
#endif |
|
198 |
#define COMPILER1_PRESENT(code) code |
|
199 |
#else // COMPILER1 |
|
200 |
#define COMPILER1_PRESENT(code) |
|
201 |
#endif // COMPILER1 |
|
202 |
||
203 |
// COMPILER2 variant |
|
204 |
#ifdef COMPILER2 |
|
205 |
#define COMPILER2_PRESENT(code) code |
|
1606
dcf9714addbe
6684579: SoftReference processing can be made more efficient
ysr
parents:
1217
diff
changeset
|
206 |
#define NOT_COMPILER2(code) |
1 | 207 |
#else // COMPILER2 |
208 |
#define COMPILER2_PRESENT(code) |
|
1606
dcf9714addbe
6684579: SoftReference processing can be made more efficient
ysr
parents:
1217
diff
changeset
|
209 |
#define NOT_COMPILER2(code) code |
1 | 210 |
#endif // COMPILER2 |
211 |
||
37272
c427db4ea8c4
8148639: Some MethodCounter fields can be excluded when not including C2
cjplummer
parents:
36350
diff
changeset
|
212 |
// COMPILER2 or JVMCI |
c427db4ea8c4
8148639: Some MethodCounter fields can be excluded when not including C2
cjplummer
parents:
36350
diff
changeset
|
213 |
#if defined(COMPILER2) || INCLUDE_JVMCI |
c427db4ea8c4
8148639: Some MethodCounter fields can be excluded when not including C2
cjplummer
parents:
36350
diff
changeset
|
214 |
#define COMPILER2_OR_JVMCI 1 |
c427db4ea8c4
8148639: Some MethodCounter fields can be excluded when not including C2
cjplummer
parents:
36350
diff
changeset
|
215 |
#define COMPILER2_OR_JVMCI_PRESENT(code) code |
c427db4ea8c4
8148639: Some MethodCounter fields can be excluded when not including C2
cjplummer
parents:
36350
diff
changeset
|
216 |
#define NOT_COMPILER2_OR_JVMCI(code) |
c427db4ea8c4
8148639: Some MethodCounter fields can be excluded when not including C2
cjplummer
parents:
36350
diff
changeset
|
217 |
#else |
c427db4ea8c4
8148639: Some MethodCounter fields can be excluded when not including C2
cjplummer
parents:
36350
diff
changeset
|
218 |
#define COMPILER2_OR_JVMCI 0 |
c427db4ea8c4
8148639: Some MethodCounter fields can be excluded when not including C2
cjplummer
parents:
36350
diff
changeset
|
219 |
#define COMPILER2_OR_JVMCI_PRESENT(code) |
c427db4ea8c4
8148639: Some MethodCounter fields can be excluded when not including C2
cjplummer
parents:
36350
diff
changeset
|
220 |
#define NOT_COMPILER2_OR_JVMCI(code) code |
c427db4ea8c4
8148639: Some MethodCounter fields can be excluded when not including C2
cjplummer
parents:
36350
diff
changeset
|
221 |
#endif |
c427db4ea8c4
8148639: Some MethodCounter fields can be excluded when not including C2
cjplummer
parents:
36350
diff
changeset
|
222 |
|
6453 | 223 |
#ifdef TIERED |
224 |
#define TIERED_ONLY(code) code |
|
225 |
#define NOT_TIERED(code) |
|
33160
c59f1676d27e
8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
31340
diff
changeset
|
226 |
#else // TIERED |
6453 | 227 |
#define TIERED_ONLY(code) |
228 |
#define NOT_TIERED(code) code |
|
229 |
#endif // TIERED |
|
230 |
||
1 | 231 |
|
232 |
// PRODUCT variant |
|
233 |
#ifdef PRODUCT |
|
234 |
#define PRODUCT_ONLY(code) code |
|
235 |
#define NOT_PRODUCT(code) |
|
6438
ace4f8100e90
6979444: add command line option to print command line flags descriptions
ikrylov
parents:
6187
diff
changeset
|
236 |
#define NOT_PRODUCT_ARG(arg) |
1 | 237 |
#define PRODUCT_RETURN {} |
238 |
#define PRODUCT_RETURN0 { return 0; } |
|
239 |
#define PRODUCT_RETURN_(code) { code } |
|
240 |
#else // PRODUCT |
|
241 |
#define PRODUCT_ONLY(code) |
|
242 |
#define NOT_PRODUCT(code) code |
|
6438
ace4f8100e90
6979444: add command line option to print command line flags descriptions
ikrylov
parents:
6187
diff
changeset
|
243 |
#define NOT_PRODUCT_ARG(arg) arg, |
1 | 244 |
#define PRODUCT_RETURN /*next token must be ;*/ |
245 |
#define PRODUCT_RETURN0 /*next token must be ;*/ |
|
246 |
#define PRODUCT_RETURN_(code) /*next token must be ;*/ |
|
247 |
#endif // PRODUCT |
|
248 |
||
249 |
#ifdef CHECK_UNHANDLED_OOPS |
|
250 |
#define CHECK_UNHANDLED_OOPS_ONLY(code) code |
|
251 |
#define NOT_CHECK_UNHANDLED_OOPS(code) |
|
252 |
#else |
|
253 |
#define CHECK_UNHANDLED_OOPS_ONLY(code) |
|
254 |
#define NOT_CHECK_UNHANDLED_OOPS(code) code |
|
255 |
#endif // CHECK_UNHANDLED_OOPS |
|
256 |
||
257 |
#ifdef CC_INTERP |
|
258 |
#define CC_INTERP_ONLY(code) code |
|
259 |
#define NOT_CC_INTERP(code) |
|
260 |
#else |
|
261 |
#define CC_INTERP_ONLY(code) |
|
262 |
#define NOT_CC_INTERP(code) code |
|
263 |
#endif // CC_INTERP |
|
264 |
||
265 |
#ifdef ASSERT |
|
266 |
#define DEBUG_ONLY(code) code |
|
267 |
#define NOT_DEBUG(code) |
|
2998
b501bd305780
6849716: BitMap - performance regression introduced with G1
jcoomes
parents:
1606
diff
changeset
|
268 |
#define NOT_DEBUG_RETURN /*next token must be ;*/ |
1 | 269 |
// Historical. |
270 |
#define debug_only(code) code |
|
271 |
#else // ASSERT |
|
272 |
#define DEBUG_ONLY(code) |
|
273 |
#define NOT_DEBUG(code) code |
|
2998
b501bd305780
6849716: BitMap - performance regression introduced with G1
jcoomes
parents:
1606
diff
changeset
|
274 |
#define NOT_DEBUG_RETURN {} |
1 | 275 |
#define debug_only(code) |
276 |
#endif // ASSERT |
|
277 |
||
278 |
#ifdef _LP64 |
|
279 |
#define LP64_ONLY(code) code |
|
280 |
#define NOT_LP64(code) |
|
281 |
#else // !_LP64 |
|
282 |
#define LP64_ONLY(code) |
|
283 |
#define NOT_LP64(code) code |
|
284 |
#endif // _LP64 |
|
285 |
||
286 |
#ifdef LINUX |
|
287 |
#define LINUX_ONLY(code) code |
|
288 |
#define NOT_LINUX(code) |
|
289 |
#else |
|
290 |
#define LINUX_ONLY(code) |
|
291 |
#define NOT_LINUX(code) code |
|
292 |
#endif |
|
293 |
||
22827 | 294 |
#ifdef AIX |
295 |
#define AIX_ONLY(code) code |
|
296 |
#define NOT_AIX(code) |
|
297 |
#else |
|
298 |
#define AIX_ONLY(code) |
|
299 |
#define NOT_AIX(code) code |
|
300 |
#endif |
|
301 |
||
1 | 302 |
#ifdef SOLARIS |
303 |
#define SOLARIS_ONLY(code) code |
|
304 |
#define NOT_SOLARIS(code) |
|
305 |
#else |
|
306 |
#define SOLARIS_ONLY(code) |
|
307 |
#define NOT_SOLARIS(code) code |
|
308 |
#endif |
|
309 |
||
310 |
#ifdef _WINDOWS |
|
311 |
#define WINDOWS_ONLY(code) code |
|
312 |
#define NOT_WINDOWS(code) |
|
313 |
#else |
|
314 |
#define WINDOWS_ONLY(code) |
|
315 |
#define NOT_WINDOWS(code) code |
|
316 |
#endif |
|
317 |
||
10565 | 318 |
#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__APPLE__) |
40010 | 319 |
#define BSD |
10565 | 320 |
#define BSD_ONLY(code) code |
321 |
#define NOT_BSD(code) |
|
322 |
#else |
|
323 |
#define BSD_ONLY(code) |
|
324 |
#define NOT_BSD(code) code |
|
325 |
#endif |
|
326 |
||
8495
a4959965eaa3
7012914: JSR 292 MethodHandlesTest C1: frame::verify_return_pc(return_address) failed: must be a return pc
twisti
parents:
8110
diff
changeset
|
327 |
#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
|
328 |
#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
|
329 |
#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
|
330 |
#else |
a4959965eaa3
7012914: JSR 292 MethodHandlesTest C1: frame::verify_return_pc(return_address) failed: must be a return pc
twisti
parents:
8110
diff
changeset
|
331 |
#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
|
332 |
#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
|
333 |
#endif |
a4959965eaa3
7012914: JSR 292 MethodHandlesTest C1: frame::verify_return_pc(return_address) failed: must be a return pc
twisti
parents:
8110
diff
changeset
|
334 |
|
14294 | 335 |
#if defined(ZERO) |
336 |
#define ZERO_ONLY(code) code |
|
337 |
#define NOT_ZERO(code) |
|
338 |
#else |
|
339 |
#define ZERO_ONLY(code) |
|
340 |
#define NOT_ZERO(code) code |
|
341 |
#endif |
|
342 |
||
343 |
#if defined(SHARK) |
|
344 |
#define SHARK_ONLY(code) code |
|
345 |
#define NOT_SHARK(code) |
|
346 |
#else |
|
347 |
#define SHARK_ONLY(code) |
|
348 |
#define NOT_SHARK(code) code |
|
349 |
#endif |
|
350 |
||
1066 | 351 |
#if defined(IA32) || defined(AMD64) |
352 |
#define X86 |
|
353 |
#define X86_ONLY(code) code |
|
6187 | 354 |
#define NOT_X86(code) |
1066 | 355 |
#else |
356 |
#undef X86 |
|
357 |
#define X86_ONLY(code) |
|
6187 | 358 |
#define NOT_X86(code) code |
1066 | 359 |
#endif |
360 |
||
1 | 361 |
#ifdef IA32 |
362 |
#define IA32_ONLY(code) code |
|
363 |
#define NOT_IA32(code) |
|
364 |
#else |
|
365 |
#define IA32_ONLY(code) |
|
366 |
#define NOT_IA32(code) code |
|
367 |
#endif |
|
368 |
||
22819
f88b9c394e42
8019973: PPC64 (part 11): Fix IA64 preprocessor conditionals on AIX.
goetz
parents:
22808
diff
changeset
|
369 |
// 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
|
370 |
// 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
|
371 |
// by 'pthread.h' and other common system headers. |
f88b9c394e42
8019973: PPC64 (part 11): Fix IA64 preprocessor conditionals on AIX.
goetz
parents:
22808
diff
changeset
|
372 |
|
f88b9c394e42
8019973: PPC64 (part 11): Fix IA64 preprocessor conditionals on AIX.
goetz
parents:
22808
diff
changeset
|
373 |
#if defined(IA64) && !defined(AIX) |
1 | 374 |
#define IA64_ONLY(code) code |
375 |
#define NOT_IA64(code) |
|
376 |
#else |
|
377 |
#define IA64_ONLY(code) |
|
378 |
#define NOT_IA64(code) code |
|
379 |
#endif |
|
380 |
||
381 |
#ifdef AMD64 |
|
382 |
#define AMD64_ONLY(code) code |
|
383 |
#define NOT_AMD64(code) |
|
384 |
#else |
|
385 |
#define AMD64_ONLY(code) |
|
386 |
#define NOT_AMD64(code) code |
|
387 |
#endif |
|
388 |
||
42062 | 389 |
#ifdef S390 |
390 |
#define S390_ONLY(code) code |
|
391 |
#define NOT_S390(code) |
|
392 |
#else |
|
393 |
#define S390_ONLY(code) |
|
394 |
#define NOT_S390(code) code |
|
395 |
#endif |
|
396 |
||
1 | 397 |
#ifdef SPARC |
398 |
#define SPARC_ONLY(code) code |
|
399 |
#define NOT_SPARC(code) |
|
400 |
#else |
|
401 |
#define SPARC_ONLY(code) |
|
402 |
#define NOT_SPARC(code) code |
|
403 |
#endif |
|
404 |
||
22806 | 405 |
#if defined(PPC32) || defined(PPC64) |
406 |
#ifndef PPC |
|
407 |
#define PPC |
|
408 |
#endif |
|
6176
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
409 |
#define PPC_ONLY(code) code |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
410 |
#define NOT_PPC(code) |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
411 |
#else |
22806 | 412 |
#undef PPC |
6176
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
413 |
#define PPC_ONLY(code) |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
414 |
#define NOT_PPC(code) code |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
415 |
#endif |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
416 |
|
22806 | 417 |
#ifdef PPC32 |
418 |
#define PPC32_ONLY(code) code |
|
419 |
#define NOT_PPC32(code) |
|
420 |
#else |
|
421 |
#define PPC32_ONLY(code) |
|
422 |
#define NOT_PPC32(code) code |
|
423 |
#endif |
|
424 |
||
425 |
#ifdef PPC64 |
|
426 |
#define PPC64_ONLY(code) code |
|
427 |
#define NOT_PPC64(code) |
|
428 |
#else |
|
429 |
#define PPC64_ONLY(code) |
|
430 |
#define NOT_PPC64(code) code |
|
431 |
#endif |
|
432 |
||
6176
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
433 |
#ifdef E500V2 |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
434 |
#define E500V2_ONLY(code) code |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
435 |
#define NOT_E500V2(code) |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
436 |
#else |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
437 |
#define E500V2_ONLY(code) |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
438 |
#define NOT_E500V2(code) code |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
439 |
#endif |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
440 |
|
40010 | 441 |
// Note: There are three ARM ports. They set the following in the makefiles: |
442 |
// 1. Closed 32-bit port: -DARM -DARM32 -DTARGET_ARCH_arm |
|
443 |
// 2. Closed 64-bit port: -DARM -DAARCH64 -D_LP64 -DTARGET_ARCH_arm |
|
444 |
// 3. Open 64-bit port: -DAARCH64 -D_LP64 -DTARGET_ARCH_aaarch64 |
|
6176
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
445 |
#ifdef ARM |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
446 |
#define ARM_ONLY(code) code |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
447 |
#define NOT_ARM(code) |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
448 |
#else |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
449 |
#define ARM_ONLY(code) |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
450 |
#define NOT_ARM(code) code |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
451 |
#endif |
4d9030fe341f
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
5547
diff
changeset
|
452 |
|
29474
81a5c5330d08
8072383: resolve conflicts between open and closed ports
dlong
parents:
29180
diff
changeset
|
453 |
#ifdef ARM32 |
81a5c5330d08
8072383: resolve conflicts between open and closed ports
dlong
parents:
29180
diff
changeset
|
454 |
#define ARM32_ONLY(code) code |
81a5c5330d08
8072383: resolve conflicts between open and closed ports
dlong
parents:
29180
diff
changeset
|
455 |
#define NOT_ARM32(code) |
81a5c5330d08
8072383: resolve conflicts between open and closed ports
dlong
parents:
29180
diff
changeset
|
456 |
#else |
81a5c5330d08
8072383: resolve conflicts between open and closed ports
dlong
parents:
29180
diff
changeset
|
457 |
#define ARM32_ONLY(code) |
81a5c5330d08
8072383: resolve conflicts between open and closed ports
dlong
parents:
29180
diff
changeset
|
458 |
#define NOT_ARM32(code) code |
81a5c5330d08
8072383: resolve conflicts between open and closed ports
dlong
parents:
29180
diff
changeset
|
459 |
#endif |
81a5c5330d08
8072383: resolve conflicts between open and closed ports
dlong
parents:
29180
diff
changeset
|
460 |
|
29180 | 461 |
#ifdef AARCH64 |
462 |
#define AARCH64_ONLY(code) code |
|
463 |
#define NOT_AARCH64(code) |
|
464 |
#else |
|
465 |
#define AARCH64_ONLY(code) |
|
466 |
#define NOT_AARCH64(code) code |
|
467 |
#endif |
|
468 |
||
1 | 469 |
#define define_pd_global(type, name, value) const type pd_##name = value; |
7397 | 470 |
|
40010 | 471 |
// Helper macros for constructing file names for includes. |
472 |
#define CPU_HEADER_STEM(basename) PASTE_TOKENS(basename, INCLUDE_SUFFIX_CPU) |
|
473 |
#define OS_HEADER_STEM(basename) PASTE_TOKENS(basename, INCLUDE_SUFFIX_OS) |
|
474 |
#define OS_CPU_HEADER_STEM(basename) PASTE_TOKENS(basename, PASTE_TOKENS(INCLUDE_SUFFIX_OS, INCLUDE_SUFFIX_CPU)) |
|
475 |
||
476 |
// Include platform dependent files. |
|
477 |
// |
|
478 |
// This macro constructs from basename and INCLUDE_SUFFIX_OS / |
|
479 |
// INCLUDE_SUFFIX_CPU, which are set on the command line, the name of |
|
480 |
// platform dependent files to be included. |
|
481 |
// Example: INCLUDE_SUFFIX_OS=_linux / INCLUDE_SUFFIX_CPU=_sparc |
|
482 |
// CPU_HEADER_INLINE(macroAssembler) --> macroAssembler_sparc.inline.hpp |
|
483 |
// OS_CPU_HEADER(vmStructs) --> vmStructs_linux_sparc.hpp |
|
484 |
// |
|
485 |
// basename<cpu>.hpp / basename<cpu>.inline.hpp |
|
486 |
#define CPU_HEADER_H(basename) XSTR(CPU_HEADER_STEM(basename).h) |
|
487 |
#define CPU_HEADER(basename) XSTR(CPU_HEADER_STEM(basename).hpp) |
|
488 |
#define CPU_HEADER_INLINE(basename) XSTR(CPU_HEADER_STEM(basename).inline.hpp) |
|
489 |
// basename<os>.hpp / basename<os>.inline.hpp |
|
490 |
#define OS_HEADER_H(basename) XSTR(OS_HEADER_STEM(basename).h) |
|
491 |
#define OS_HEADER(basename) XSTR(OS_HEADER_STEM(basename).hpp) |
|
492 |
#define OS_HEADER_INLINE(basename) XSTR(OS_HEADER_STEM(basename).inline.hpp) |
|
493 |
// basename<os><cpu>.hpp / basename<os><cpu>.inline.hpp |
|
494 |
#define OS_CPU_HEADER(basename) XSTR(OS_CPU_HEADER_STEM(basename).hpp) |
|
495 |
#define OS_CPU_HEADER_INLINE(basename) XSTR(OS_CPU_HEADER_STEM(basename).inline.hpp) |
|
496 |
||
40655
9f644073d3a0
8157907: Incorrect inclusion of atomic.hpp instead of atomic.inline.hpp
dholmes
parents:
40015
diff
changeset
|
497 |
// To use Atomic::inc(jshort* dest) and Atomic::dec(jshort* dest), the address must be specially |
9f644073d3a0
8157907: Incorrect inclusion of atomic.hpp instead of atomic.inline.hpp
dholmes
parents:
40015
diff
changeset
|
498 |
// aligned, such that (*dest) occupies the upper 16 bits of an aligned 32-bit word. The best way to |
9f644073d3a0
8157907: Incorrect inclusion of atomic.hpp instead of atomic.inline.hpp
dholmes
parents:
40015
diff
changeset
|
499 |
// achieve is to place your short value next to another short value, which doesn't need atomic ops. |
9f644073d3a0
8157907: Incorrect inclusion of atomic.hpp instead of atomic.inline.hpp
dholmes
parents:
40015
diff
changeset
|
500 |
// |
9f644073d3a0
8157907: Incorrect inclusion of atomic.hpp instead of atomic.inline.hpp
dholmes
parents:
40015
diff
changeset
|
501 |
// Example |
9f644073d3a0
8157907: Incorrect inclusion of atomic.hpp instead of atomic.inline.hpp
dholmes
parents:
40015
diff
changeset
|
502 |
// ATOMIC_SHORT_PAIR( |
9f644073d3a0
8157907: Incorrect inclusion of atomic.hpp instead of atomic.inline.hpp
dholmes
parents:
40015
diff
changeset
|
503 |
// volatile short _refcount, // needs atomic operation |
9f644073d3a0
8157907: Incorrect inclusion of atomic.hpp instead of atomic.inline.hpp
dholmes
parents:
40015
diff
changeset
|
504 |
// unsigned short _length // number of UTF8 characters in the symbol (does not need atomic op) |
9f644073d3a0
8157907: Incorrect inclusion of atomic.hpp instead of atomic.inline.hpp
dholmes
parents:
40015
diff
changeset
|
505 |
// ); |
9f644073d3a0
8157907: Incorrect inclusion of atomic.hpp instead of atomic.inline.hpp
dholmes
parents:
40015
diff
changeset
|
506 |
|
9f644073d3a0
8157907: Incorrect inclusion of atomic.hpp instead of atomic.inline.hpp
dholmes
parents:
40015
diff
changeset
|
507 |
#ifdef VM_LITTLE_ENDIAN |
9f644073d3a0
8157907: Incorrect inclusion of atomic.hpp instead of atomic.inline.hpp
dholmes
parents:
40015
diff
changeset
|
508 |
#define ATOMIC_SHORT_PAIR(atomic_decl, non_atomic_decl) \ |
9f644073d3a0
8157907: Incorrect inclusion of atomic.hpp instead of atomic.inline.hpp
dholmes
parents:
40015
diff
changeset
|
509 |
non_atomic_decl; \ |
9f644073d3a0
8157907: Incorrect inclusion of atomic.hpp instead of atomic.inline.hpp
dholmes
parents:
40015
diff
changeset
|
510 |
atomic_decl |
9f644073d3a0
8157907: Incorrect inclusion of atomic.hpp instead of atomic.inline.hpp
dholmes
parents:
40015
diff
changeset
|
511 |
#else |
9f644073d3a0
8157907: Incorrect inclusion of atomic.hpp instead of atomic.inline.hpp
dholmes
parents:
40015
diff
changeset
|
512 |
#define ATOMIC_SHORT_PAIR(atomic_decl, non_atomic_decl) \ |
9f644073d3a0
8157907: Incorrect inclusion of atomic.hpp instead of atomic.inline.hpp
dholmes
parents:
40015
diff
changeset
|
513 |
atomic_decl; \ |
9f644073d3a0
8157907: Incorrect inclusion of atomic.hpp instead of atomic.inline.hpp
dholmes
parents:
40015
diff
changeset
|
514 |
non_atomic_decl |
9f644073d3a0
8157907: Incorrect inclusion of atomic.hpp instead of atomic.inline.hpp
dholmes
parents:
40015
diff
changeset
|
515 |
#endif |
9f644073d3a0
8157907: Incorrect inclusion of atomic.hpp instead of atomic.inline.hpp
dholmes
parents:
40015
diff
changeset
|
516 |
|
7397 | 517 |
#endif // SHARE_VM_UTILITIES_MACROS_HPP |