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