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