1 /*
  2  * Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved.
  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  *
 19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 20  * or visit www.oracle.com if you need additional information or have any
 21  * questions.
 22  *
 23  */
 24 
 25 #ifndef SHARE_UTILITIES_MACROS_HPP
 26 #define SHARE_UTILITIES_MACROS_HPP
 27 
 28 // Use this to mark code that needs to be cleaned up (for development only)
 29 #define NEEDS_CLEANUP
 30 
 31 // Makes a string of the argument (which is not macro-expanded)
 32 #define STR(a)  #a
 33 
 34 // Makes a string of the macro expansion of a
 35 #define XSTR(a) STR(a)
 36 
 37 // Allow commas in macro arguments.
 38 #define COMMA ,
 39 
 40 // Apply pre-processor token pasting to the expansions of x and y.
 41 // The token pasting operator (##) prevents its arguments from being
 42 // expanded.  This macro allows expansion of its arguments before the
 43 // concatenation is performed.  Note: One auxilliary level ought to be
 44 // sufficient, but two are used because of bugs in some preprocesors.
 45 #define PASTE_TOKENS(x, y) PASTE_TOKENS_AUX(x, y)
 46 #define PASTE_TOKENS_AUX(x, y) PASTE_TOKENS_AUX2(x, y)
 47 #define PASTE_TOKENS_AUX2(x, y) x ## y
 48 
 49 // -DINCLUDE_<something>=0 | 1 can be specified on the command line to include
 50 // or exclude functionality.
 51 
 52 #ifndef FILE_AND_LINE
 53 #define FILE_AND_LINE __FILE__ ":" XSTR(__LINE__)
 54 #endif
 55 
 56 #ifndef INCLUDE_JVMTI
 57 #define INCLUDE_JVMTI 1
 58 #endif  // INCLUDE_JVMTI
 59 
 60 #if INCLUDE_JVMTI
 61 #define JVMTI_ONLY(x) x
 62 #define NOT_JVMTI(x)
 63 #define NOT_JVMTI_RETURN
 64 #define NOT_JVMTI_RETURN_(code) /* next token must be ; */
 65 #else
 66 #define JVMTI_ONLY(x)
 67 #define NOT_JVMTI(x) x
 68 #define NOT_JVMTI_RETURN { return; }
 69 #define NOT_JVMTI_RETURN_(code) { return code; }
 70 #endif // INCLUDE_JVMTI
 71 
 72 #ifndef INCLUDE_VM_STRUCTS
 73 #define INCLUDE_VM_STRUCTS 1
 74 #endif
 75 
 76 #if INCLUDE_VM_STRUCTS
 77 #define NOT_VM_STRUCTS_RETURN        /* next token must be ; */
 78 #define NOT_VM_STRUCTS_RETURN_(code) /* next token must be ; */
 79 #else
 80 #define NOT_VM_STRUCTS_RETURN           {}
 81 #define NOT_VM_STRUCTS_RETURN_(code) { return code; }
 82 #endif // INCLUDE_VM_STRUCTS
 83 
 84 #ifndef INCLUDE_JNI_CHECK
 85 #define INCLUDE_JNI_CHECK 1
 86 #endif
 87 
 88 #if INCLUDE_JNI_CHECK
 89 #define NOT_JNI_CHECK_RETURN        /* next token must be ; */
 90 #define NOT_JNI_CHECK_RETURN_(code) /* next token must be ; */
 91 #else
 92 #define NOT_JNI_CHECK_RETURN            {}
 93 #define NOT_JNI_CHECK_RETURN_(code) { return code; }
 94 #endif // INCLUDE_JNI_CHECK
 95 
 96 #ifndef INCLUDE_SERVICES
 97 #define INCLUDE_SERVICES 1
 98 #endif
 99 
100 #if INCLUDE_SERVICES
101 #define NOT_SERVICES_RETURN        /* next token must be ; */
102 #define NOT_SERVICES_RETURN_(code) /* next token must be ; */
103 #else
104 #define NOT_SERVICES_RETURN             {}
105 #define NOT_SERVICES_RETURN_(code) { return code; }
106 #endif // INCLUDE_SERVICES
107 
108 #ifndef INCLUDE_CDS
109 #define INCLUDE_CDS 1
110 #endif
111 
112 #if INCLUDE_CDS
113 #define CDS_ONLY(x) x
114 #define NOT_CDS(x)
115 #define NOT_CDS_RETURN        /* next token must be ; */
116 #define NOT_CDS_RETURN0       /* next token must be ; */
117 #define NOT_CDS_RETURN_(code) /* next token must be ; */
118 #else
119 #define CDS_ONLY(x)
120 #define NOT_CDS(x) x
121 #define NOT_CDS_RETURN        {}
122 #define NOT_CDS_RETURN0       { return 0; }
123 #define NOT_CDS_RETURN_(code) { return code; }
124 #endif // INCLUDE_CDS
125 
126 #ifndef INCLUDE_MANAGEMENT
127 #define INCLUDE_MANAGEMENT 1
128 #endif // INCLUDE_MANAGEMENT
129 
130 #if INCLUDE_MANAGEMENT
131 #define NOT_MANAGEMENT_RETURN        /* next token must be ; */
132 #define NOT_MANAGEMENT_RETURN_(code) /* next token must be ; */
133 #else
134 #define NOT_MANAGEMENT_RETURN        {}
135 #define NOT_MANAGEMENT_RETURN_(code) { return code; }
136 #endif // INCLUDE_MANAGEMENT
137 
138 #ifndef INCLUDE_EPSILONGC
139 #define INCLUDE_EPSILONGC 1
140 #endif // INCLUDE_EPSILONGC
141 
142 #if INCLUDE_EPSILONGC
143 #define EPSILONGC_ONLY(x) x
144 #define EPSILONGC_ONLY_ARG(arg) arg,
145 #define NOT_EPSILONGC(x)
146 #define NOT_EPSILONGC_RETURN        /* next token must be ; */
147 #define NOT_EPSILONGC_RETURN_(code) /* next token must be ; */
148 #else
149 #define EPSILONGC_ONLY(x)
150 #define EPSILONGC_ONLY_ARG(arg)
151 #define NOT_EPSILONGC(x) x
152 #define NOT_EPSILONGC_RETURN        {}
153 #define NOT_EPSILONGC_RETURN_(code) { return code; }
154 #endif // INCLUDE_EPSILONGC
155 
156 #ifndef INCLUDE_G1GC
157 #define INCLUDE_G1GC 1
158 #endif // INCLUDE_G1GC
159 
160 #if INCLUDE_G1GC
161 #define G1GC_ONLY(x) x
162 #define G1GC_ONLY_ARG(arg) arg,
163 #define NOT_G1GC(x)
164 #define NOT_G1GC_RETURN        /* next token must be ; */
165 #define NOT_G1GC_RETURN_(code) /* next token must be ; */
166 #else
167 #define G1GC_ONLY(x)
168 #define G1GC_ONLY_ARG(arg)
169 #define NOT_G1GC(x) x
170 #define NOT_G1GC_RETURN        {}
171 #define NOT_G1GC_RETURN_(code) { return code; }
172 #endif // INCLUDE_G1GC
173 
174 #ifndef INCLUDE_PARALLELGC
175 #define INCLUDE_PARALLELGC 1
176 #endif // INCLUDE_PARALLELGC
177 
178 #if INCLUDE_PARALLELGC
179 #define PARALLELGC_ONLY(x) x
180 #define PARALLELGC_ONLY_ARG(arg) arg,
181 #define NOT_PARALLELGC(x)
182 #define NOT_PARALLELGC_RETURN        /* next token must be ; */
183 #define NOT_PARALLELGC_RETURN_(code) /* next token must be ; */
184 #else
185 #define PARALLELGC_ONLY(x)
186 #define PARALLELGC_ONLY_ARG(arg)
187 #define NOT_PARALLELGC(x) x
188 #define NOT_PARALLELGC_RETURN        {}
189 #define NOT_PARALLELGC_RETURN_(code) { return code; }
190 #endif // INCLUDE_PARALLELGC
191 
192 #ifndef INCLUDE_SERIALGC
193 #define INCLUDE_SERIALGC 1
194 #endif // INCLUDE_SERIALGC
195 
196 #if INCLUDE_SERIALGC
197 #define SERIALGC_ONLY(x) x
198 #define SERIALGC_ONLY_ARG(arg) arg,
199 #define NOT_SERIALGC(x)
200 #define NOT_SERIALGC_RETURN        /* next token must be ; */
201 #define NOT_SERIALGC_RETURN_(code) /* next token must be ; */
202 #else
203 #define SERIALGC_ONLY(x)
204 #define SERIALGC_ONLY_ARG(arg)
205 #define NOT_SERIALGC(x) x
206 #define NOT_SERIALGC_RETURN        {}
207 #define NOT_SERIALGC_RETURN_(code) { return code; }
208 #endif // INCLUDE_SERIALGC
209 
210 #ifndef INCLUDE_SHENANDOAHGC
211 #define INCLUDE_SHENANDOAHGC 1
212 #endif // INCLUDE_SHENANDOAHGC
213 
214 #if INCLUDE_SHENANDOAHGC
215 #define SHENANDOAHGC_ONLY(x) x
216 #define SHENANDOAHGC_ONLY_ARG(arg) arg,
217 #define NOT_SHENANDOAHGC(x)
218 #define NOT_SHENANDOAHGC_RETURN        /* next token must be ; */
219 #define NOT_SHENANDOAHGC_RETURN_(code) /* next token must be ; */
220 #else
221 #define SHENANDOAHGC_ONLY(x)
222 #define SHENANDOAHGC_ONLY_ARG(arg)
223 #define NOT_SHENANDOAHGC(x) x
224 #define NOT_SHENANDOAHGC_RETURN        {}
225 #define NOT_SHENANDOAHGC_RETURN_(code) { return code; }
226 #endif // INCLUDE_SHENANDOAHGC
227 
228 #ifndef INCLUDE_ZGC
229 #define INCLUDE_ZGC 1
230 #endif // INCLUDE_ZGC
231 
232 #if INCLUDE_ZGC
233 #define ZGC_ONLY(x) x
234 #define ZGC_ONLY_ARG(arg) arg,
235 #define NOT_ZGC(x)
236 #define NOT_ZGC_RETURN        /* next token must be ; */
237 #define NOT_ZGC_RETURN_(code) /* next token must be ; */
238 #else
239 #define ZGC_ONLY(x)
240 #define ZGC_ONLY_ARG(arg)
241 #define NOT_ZGC(x) x
242 #define NOT_ZGC_RETURN        {}
243 #define NOT_ZGC_RETURN_(code) { return code; }
244 #endif // INCLUDE_ZGC
245 
246 #ifndef INCLUDE_NMT
247 #define INCLUDE_NMT 1
248 #endif // INCLUDE_NMT
249 
250 #if INCLUDE_NMT
251 #define NOT_NMT_RETURN        /* next token must be ; */
252 #define NOT_NMT_RETURN_(code) /* next token must be ; */
253 #define NMT_ONLY(x) x
254 #define NOT_NMT(x)
255 #else
256 #define NOT_NMT_RETURN        {}
257 #define NOT_NMT_RETURN_(code) { return code; }
258 #define NMT_ONLY(x)
259 #define NOT_NMT(x) x
260 #endif // INCLUDE_NMT
261 
262 #ifndef INCLUDE_JFR
263 #define INCLUDE_JFR 1
264 #endif
265 
266 #if INCLUDE_JFR
267 #define JFR_ONLY(code) code
268 #define NOT_JFR_RETURN()      /* next token must be ; */
269 #define NOT_JFR_RETURN_(code) /* next token must be ; */
270 #else
271 #define JFR_ONLY(code)
272 #define NOT_JFR_RETURN()      {}
273 #define NOT_JFR_RETURN_(code) { return code; }
274 #endif
275 
276 #ifndef INCLUDE_JVMCI
277 #define INCLUDE_JVMCI 1
278 #endif
279 
280 #if INCLUDE_JVMCI
281 #define JVMCI_ONLY(code) code
282 #define NOT_JVMCI(code)
283 #define NOT_JVMCI_RETURN /* next token must be ; */
284 #else
285 #define JVMCI_ONLY(code)
286 #define NOT_JVMCI(code) code
287 #define NOT_JVMCI_RETURN {}
288 #endif // INCLUDE_JVMCI
289 
290 // COMPILER1 variant
291 #ifdef COMPILER1
292 #define COMPILER1_PRESENT(code) code
293 #define NOT_COMPILER1(code)
294 #else // COMPILER1
295 #define COMPILER1_PRESENT(code)
296 #define NOT_COMPILER1(code) code
297 #endif // COMPILER1
298 
299 // COMPILER2 variant
300 #ifdef COMPILER2
301 #define COMPILER2_PRESENT(code) code
302 #define NOT_COMPILER2(code)
303 #else // COMPILER2
304 #define COMPILER2_PRESENT(code)
305 #define NOT_COMPILER2(code) code
306 #endif // COMPILER2
307 
308 // COMPILER2 or JVMCI
309 #if defined(COMPILER2) || INCLUDE_JVMCI
310 #define COMPILER2_OR_JVMCI 1
311 #define COMPILER2_OR_JVMCI_PRESENT(code) code
312 #define NOT_COMPILER2_OR_JVMCI(code)
313 #define NOT_COMPILER2_OR_JVMCI_RETURN        /* next token must be ; */
314 #define NOT_COMPILER2_OR_JVMCI_RETURN_(code) /* next token must be ; */
315 #else
316 #define COMPILER2_OR_JVMCI 0
317 #define COMPILER2_OR_JVMCI_PRESENT(code)
318 #define NOT_COMPILER2_OR_JVMCI(code) code
319 #define NOT_COMPILER2_OR_JVMCI_RETURN {}
320 #define NOT_COMPILER2_OR_JVMCI_RETURN_(code) { return code; }
321 #endif
322 
323 // COMPILER1 and COMPILER2
324 #if defined(COMPILER1) && defined(COMPILER2)
325 #define COMPILER1_AND_COMPILER2 1
326 #define COMPILER1_AND_COMPILER2_PRESENT(code) code
327 #else
328 #define COMPILER1_AND_COMPILER2 0
329 #define COMPILER1_AND_COMPILER2_PRESENT(code)
330 #endif
331 
332 // COMPILER1 or COMPILER2
333 #if defined(COMPILER1) || defined(COMPILER2)
334 #define COMPILER1_OR_COMPILER2 1
335 #define COMPILER1_OR_COMPILER2_PRESENT(code) code
336 #else
337 #define COMPILER1_OR_COMPILER2 0
338 #define COMPILER1_OR_COMPILER2_PRESENT(code)
339 #endif
340 
341 
342 // PRODUCT variant
343 #ifdef PRODUCT
344 #define PRODUCT_ONLY(code) code
345 #define NOT_PRODUCT(code)
346 #define NOT_PRODUCT_ARG(arg)
347 #define PRODUCT_RETURN  {}
348 #define PRODUCT_RETURN0 { return 0; }
349 #define PRODUCT_RETURN_(code) { code }
350 #else // PRODUCT
351 #define PRODUCT_ONLY(code)
352 #define NOT_PRODUCT(code) code
353 #define NOT_PRODUCT_ARG(arg) arg,
354 #define PRODUCT_RETURN  /*next token must be ;*/
355 #define PRODUCT_RETURN0 /*next token must be ;*/
356 #define PRODUCT_RETURN_(code)  /*next token must be ;*/
357 #endif // PRODUCT
358 
359 #ifdef CHECK_UNHANDLED_OOPS
360 #define CHECK_UNHANDLED_OOPS_ONLY(code) code
361 #define NOT_CHECK_UNHANDLED_OOPS(code)
362 #else
363 #define CHECK_UNHANDLED_OOPS_ONLY(code)
364 #define NOT_CHECK_UNHANDLED_OOPS(code)  code
365 #endif // CHECK_UNHANDLED_OOPS
366 
367 #ifdef ASSERT
368 #define DEBUG_ONLY(code) code
369 #define NOT_DEBUG(code)
370 #define NOT_DEBUG_RETURN  /*next token must be ;*/
371 // Historical.
372 #define debug_only(code) code
373 #else // ASSERT
374 #define DEBUG_ONLY(code)
375 #define NOT_DEBUG(code) code
376 #define NOT_DEBUG_RETURN {}
377 #define debug_only(code)
378 #endif // ASSERT
379 
380 #ifdef  _LP64
381 #define LP64_ONLY(code) code
382 #define NOT_LP64(code)
383 #else  // !_LP64
384 #define LP64_ONLY(code)
385 #define NOT_LP64(code) code
386 #endif // _LP64
387 
388 #ifdef LINUX
389 #define LINUX_ONLY(code) code
390 #define NOT_LINUX(code)
391 #else
392 #define LINUX_ONLY(code)
393 #define NOT_LINUX(code) code
394 #endif
395 
396 #ifdef __APPLE__
397 #define MACOS_ONLY(code) code
398 #define NOT_MACOS(code)
399 #else
400 #define MACOS_ONLY(code)
401 #define NOT_MACOS(code) code
402 #endif
403 
404 #ifdef AIX
405 #define AIX_ONLY(code) code
406 #define NOT_AIX(code)
407 #else
408 #define AIX_ONLY(code)
409 #define NOT_AIX(code) code
410 #endif
411 
412 #ifdef _WINDOWS
413 #define WINDOWS_ONLY(code) code
414 #define NOT_WINDOWS(code)
415 #else
416 #define WINDOWS_ONLY(code)
417 #define NOT_WINDOWS(code) code
418 #endif
419 
420 #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__APPLE__)
421 #ifndef BSD
422 #define BSD
423 #endif // BSD defined in <sys/param.h>
424 #define BSD_ONLY(code) code
425 #define NOT_BSD(code)
426 #else
427 #define BSD_ONLY(code)
428 #define NOT_BSD(code) code
429 #endif
430 
431 #ifdef _WIN64
432 #define WIN64_ONLY(code) code
433 #define NOT_WIN64(code)
434 #else
435 #define WIN64_ONLY(code)
436 #define NOT_WIN64(code) code
437 #endif
438 
439 #if defined(ZERO)
440 #define ZERO_ONLY(code) code
441 #define NOT_ZERO(code)
442 #define NOT_ZERO_RETURN {}
443 #else
444 #define ZERO_ONLY(code)
445 #define NOT_ZERO(code) code
446 #define NOT_ZERO_RETURN
447 #endif
448 
449 #if defined(IA32) || defined(AMD64)
450 #define X86
451 #define X86_ONLY(code) code
452 #define NOT_X86(code)
453 #else
454 #undef X86
455 #define X86_ONLY(code)
456 #define NOT_X86(code) code
457 #endif
458 
459 #ifdef IA32
460 #define IA32_ONLY(code) code
461 #define NOT_IA32(code)
462 #else
463 #define IA32_ONLY(code)
464 #define NOT_IA32(code) code
465 #endif
466 
467 // This is a REALLY BIG HACK, but on AIX <sys/systemcfg.h> unconditionally defines IA64.
468 // At least on AIX 7.1 this is a real problem because 'systemcfg.h' is indirectly included
469 // by 'pthread.h' and other common system headers.
470 
471 #if defined(IA64) && !defined(AIX)
472 #define IA64_ONLY(code) code
473 #define NOT_IA64(code)
474 #else
475 #define IA64_ONLY(code)
476 #define NOT_IA64(code) code
477 #endif
478 
479 #ifdef AMD64
480 #define AMD64_ONLY(code) code
481 #define NOT_AMD64(code)
482 #else
483 #define AMD64_ONLY(code)
484 #define NOT_AMD64(code) code
485 #endif
486 
487 #ifdef S390
488 #define S390_ONLY(code) code
489 #define NOT_S390(code)
490 #else
491 #define S390_ONLY(code)
492 #define NOT_S390(code) code
493 #endif
494 
495 #if defined(PPC32) || defined(PPC64)
496 #ifndef PPC
497 #define PPC
498 #endif
499 #define PPC_ONLY(code) code
500 #define NOT_PPC(code)
501 #else
502 #undef PPC
503 #define PPC_ONLY(code)
504 #define NOT_PPC(code) code
505 #endif
506 
507 #ifdef PPC32
508 #define PPC32_ONLY(code) code
509 #define NOT_PPC32(code)
510 #else
511 #define PPC32_ONLY(code)
512 #define NOT_PPC32(code) code
513 #endif
514 
515 #ifdef PPC64
516 #define PPC64_ONLY(code) code
517 #define NOT_PPC64(code)
518 #else
519 #define PPC64_ONLY(code)
520 #define NOT_PPC64(code) code
521 #endif
522 
523 #ifdef E500V2
524 #define E500V2_ONLY(code) code
525 #define NOT_E500V2(code)
526 #else
527 #define E500V2_ONLY(code)
528 #define NOT_E500V2(code) code
529 #endif
530 
531 // Note: There are two ARM ports. They set the following in the makefiles:
532 // 1. 32-bit port:   -DARM -DARM32 -DTARGET_ARCH_arm
533 // 2. 64-bit port:   -DAARCH64 -D_LP64 -DTARGET_ARCH_aaarch64
534 #ifdef ARM
535 #define ARM_ONLY(code) code
536 #define NOT_ARM(code)
537 #else
538 #define ARM_ONLY(code)
539 #define NOT_ARM(code) code
540 #endif
541 
542 #ifdef ARM32
543 #define ARM32_ONLY(code) code
544 #define NOT_ARM32(code)
545 #else
546 #define ARM32_ONLY(code)
547 #define NOT_ARM32(code) code
548 #endif
549 
550 #ifdef AARCH64
551 #define AARCH64_ONLY(code) code
552 #define NOT_AARCH64(code)
553 #else
554 #define AARCH64_ONLY(code)
555 #define NOT_AARCH64(code) code
556 #endif
557 
558 #define MACOS_AARCH64_ONLY(x) MACOS_ONLY(AARCH64_ONLY(x))
559 
560 #ifdef VM_LITTLE_ENDIAN
561 #define LITTLE_ENDIAN_ONLY(code) code
562 #define BIG_ENDIAN_ONLY(code)
563 #else
564 #define LITTLE_ENDIAN_ONLY(code)
565 #define BIG_ENDIAN_ONLY(code) code
566 #endif
567 
568 #define define_pd_global(type, name, value) const type pd_##name = value;
569 
570 // Helper macros for constructing file names for includes.
571 #define CPU_HEADER_STEM(basename) PASTE_TOKENS(basename, INCLUDE_SUFFIX_CPU)
572 #define OS_HEADER_STEM(basename) PASTE_TOKENS(basename, INCLUDE_SUFFIX_OS)
573 #define OS_CPU_HEADER_STEM(basename) PASTE_TOKENS(basename, PASTE_TOKENS(INCLUDE_SUFFIX_OS, INCLUDE_SUFFIX_CPU))
574 #define COMPILER_HEADER_STEM(basename) PASTE_TOKENS(basename, INCLUDE_SUFFIX_COMPILER)
575 
576 // Include platform dependent files.
577 //
578 // This macro constructs from basename and INCLUDE_SUFFIX_OS /
579 // INCLUDE_SUFFIX_CPU / INCLUDE_SUFFIX_COMPILER, which are set on
580 // the command line, the name of platform dependent files to be included.
581 // Example: INCLUDE_SUFFIX_OS=_linux / INCLUDE_SUFFIX_CPU=_x86
582 //   CPU_HEADER_INLINE(macroAssembler) --> macroAssembler_x86.inline.hpp
583 //   OS_CPU_HEADER(vmStructs)          --> vmStructs_linux_x86.hpp
584 //
585 // basename<cpu>.hpp / basename<cpu>.inline.hpp
586 #define CPU_HEADER_H(basename)         XSTR(CPU_HEADER_STEM(basename).h)
587 #define CPU_HEADER(basename)           XSTR(CPU_HEADER_STEM(basename).hpp)
588 #define CPU_HEADER_INLINE(basename)    XSTR(CPU_HEADER_STEM(basename).inline.hpp)
589 // basename<os>.hpp / basename<os>.inline.hpp
590 #define OS_HEADER_H(basename)          XSTR(OS_HEADER_STEM(basename).h)
591 #define OS_HEADER(basename)            XSTR(OS_HEADER_STEM(basename).hpp)
592 #define OS_HEADER_INLINE(basename)     XSTR(OS_HEADER_STEM(basename).inline.hpp)
593 // basename<os><cpu>.hpp / basename<os><cpu>.inline.hpp
594 #define OS_CPU_HEADER(basename)        XSTR(OS_CPU_HEADER_STEM(basename).hpp)
595 #define OS_CPU_HEADER_INLINE(basename) XSTR(OS_CPU_HEADER_STEM(basename).inline.hpp)
596 // basename<compiler>.hpp / basename<compiler>.inline.hpp
597 #define COMPILER_HEADER(basename)        XSTR(COMPILER_HEADER_STEM(basename).hpp)
598 #define COMPILER_HEADER_INLINE(basename) XSTR(COMPILER_HEADER_STEM(basename).inline.hpp)
599 
600 #if INCLUDE_CDS && INCLUDE_G1GC && defined(_LP64) && !defined(_WINDOWS)
601 #define INCLUDE_CDS_JAVA_HEAP 1
602 #define CDS_JAVA_HEAP_ONLY(x) x
603 #define NOT_CDS_JAVA_HEAP(x)
604 #define NOT_CDS_JAVA_HEAP_RETURN
605 #define NOT_CDS_JAVA_HEAP_RETURN_(code)
606 #else
607 #define INCLUDE_CDS_JAVA_HEAP 0
608 #define CDS_JAVA_HEAP_ONLY(x)
609 #define NOT_CDS_JAVA_HEAP(x) x
610 #define NOT_CDS_JAVA_HEAP_RETURN        {}
611 #define NOT_CDS_JAVA_HEAP_RETURN_(code) { return code; }
612 #endif
613 
614 #endif // SHARE_UTILITIES_MACROS_HPP