< prev index next >

src/hotspot/share/utilities/macros.hpp

Print this page
rev 49911 : imported patch removeAllGCs


 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 #else
 130 #define NOT_MANAGEMENT_RETURN        {}
 131 #define NOT_MANAGEMENT_RETURN_(code) { return code; }
 132 #endif // INCLUDE_MANAGEMENT
 133 
 134 /*
 135  * When INCLUDE_ALL_GCS is false the only garbage collectors
 136  * included in the JVM are defaultNewGeneration and markCompact.
 137  *
 138  * When INCLUDE_ALL_GCS is true all garbage collectors are
 139  * included in the JVM.
 140  */
 141 #ifndef INCLUDE_ALL_GCS
 142 #define INCLUDE_ALL_GCS 1
 143 #endif // INCLUDE_ALL_GCS
 144 
 145 #if INCLUDE_ALL_GCS
 146 #define ALL_GCS_ONLY(x) x
 147 #define NOT_ALL_GCS_RETURN        /* next token must be ; */
 148 #define NOT_ALL_GCS_RETURN_(code) /* next token must be ; */
 149 #else
 150 #define ALL_GCS_ONLY(x)
 151 #define NOT_ALL_GCS_RETURN        {}
 152 #define NOT_ALL_GCS_RETURN_(code) { return code; }
 153 #endif // INCLUDE_ALL_GCS



























































 154 
 155 #ifndef INCLUDE_NMT
 156 #define INCLUDE_NMT 1
 157 #endif // INCLUDE_NMT
 158 
 159 #if INCLUDE_NMT
 160 #define NOT_NMT_RETURN        /* next token must be ; */
 161 #define NOT_NMT_RETURN_(code) /* next token must be ; */
 162 #else
 163 #define NOT_NMT_RETURN        {}
 164 #define NOT_NMT_RETURN_(code) { return code; }
 165 #endif // INCLUDE_NMT
 166 
 167 #ifndef INCLUDE_TRACE
 168 #define INCLUDE_TRACE 1
 169 #endif // INCLUDE_TRACE
 170 
 171 #ifndef INCLUDE_JVMCI
 172 #define INCLUDE_JVMCI 1
 173 #endif


 507 // To use Atomic::inc(jshort* dest) and Atomic::dec(jshort* dest), the address must be specially
 508 // aligned, such that (*dest) occupies the upper 16 bits of an aligned 32-bit word. The best way to
 509 // achieve is to place your short value next to another short value, which doesn't need atomic ops.
 510 //
 511 // Example
 512 //  ATOMIC_SHORT_PAIR(
 513 //    volatile short _refcount,  // needs atomic operation
 514 //    unsigned short _length     // number of UTF8 characters in the symbol (does not need atomic op)
 515 //  );
 516 
 517 #ifdef VM_LITTLE_ENDIAN
 518   #define ATOMIC_SHORT_PAIR(atomic_decl, non_atomic_decl)  \
 519     non_atomic_decl;                                       \
 520     atomic_decl
 521 #else
 522   #define ATOMIC_SHORT_PAIR(atomic_decl, non_atomic_decl)  \
 523     atomic_decl;                                           \
 524     non_atomic_decl
 525 #endif
 526 
 527 #if INCLUDE_CDS && INCLUDE_ALL_GCS && defined(_LP64) && !defined(_WINDOWS)
 528 #define INCLUDE_CDS_JAVA_HEAP 1
 529 #define CDS_JAVA_HEAP_ONLY(x) x
 530 #define NOT_CDS_JAVA_HEAP(x)
 531 #define NOT_CDS_JAVA_HEAP_RETURN
 532 #define NOT_CDS_JAVA_HEAP_RETURN_(code)
 533 #else
 534 #define INCLUDE_CDS_JAVA_HEAP 0
 535 #define CDS_JAVA_HEAP_ONLY(x)
 536 #define NOT_CDS_JAVA_HEAP(x) x
 537 #define NOT_CDS_JAVA_HEAP_RETURN        {}
 538 #define NOT_CDS_JAVA_HEAP_RETURN_(code) { return code; }
 539 #endif
 540 
 541 #endif // SHARE_VM_UTILITIES_MACROS_HPP


 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 #else
 130 #define NOT_MANAGEMENT_RETURN        {}
 131 #define NOT_MANAGEMENT_RETURN_(code) { return code; }
 132 #endif // INCLUDE_MANAGEMENT
 133 
 134 #ifndef INCLUDE_CMSGC
 135 #define INCLUDE_CMSGC 1
 136 #endif // INCLUDE_CMSGC
 137 
 138 #if INCLUDE_CMSGC
 139 #define CMSGC_ONLY(x) x
 140 #define CMSGC_ONLY_ARG(arg) arg,
 141 #define NOT_CMSGC(x)
 142 #define NOT_CMSGC_RETURN        /* next token must be ; */
 143 #define NOT_CMSGC_RETURN_(code) /* next token must be ; */
 144 #else
 145 #define CMSGC_ONLY(x)
 146 #define CMSGC_ONLY_ARG(x)
 147 #define NOT_CMSGC(x) x
 148 #define NOT_CMSGC_RETURN        {}
 149 #define NOT_CMSGC_RETURN_(code) { return code; }
 150 #endif // INCLUDE_CMSGC
 151 
 152 #ifndef INCLUDE_G1GC
 153 #define INCLUDE_G1GC 1
 154 #endif // INCLUDE_G1GC
 155 
 156 #if INCLUDE_G1GC
 157 #define G1GC_ONLY(x) x
 158 #define G1GC_ONLY_ARG(arg) arg,
 159 #define NOT_G1GC(x)
 160 #define NOT_G1GC_RETURN        /* next token must be ; */
 161 #define NOT_G1GC_RETURN_(code) /* next token must be ; */
 162 #else
 163 #define G1GC_ONLY(x)
 164 #define G1GC_ONLY_ARG(arg)
 165 #define NOT_G1GC(x) x
 166 #define NOT_G1GC_RETURN        {}
 167 #define NOT_G1GC_RETURN_(code) { return code; }
 168 #endif // INCLUDE_G1GC
 169 
 170 #ifndef INCLUDE_PARALLELGC
 171 #define INCLUDE_PARALLELGC 1
 172 #endif // INCLUDE_PARALLELGC
 173 
 174 #if INCLUDE_PARALLELGC
 175 #define PARALLELGC_ONLY(x) x
 176 #define PARALLELGC_ONLY_ARG(arg) arg,
 177 #define NOT_PARALLELGC(x)
 178 #define NOT_PARALLELGC_RETURN        /* next token must be ; */
 179 #define NOT_PARALLELGC_RETURN_(code) /* next token must be ; */
 180 #else
 181 #define PARALLELGC_ONLY(x)
 182 #define PARALLELGC_ONLY_ARG(arg)
 183 #define NOT_PARALLELGC(x) x
 184 #define NOT_PARALLELGC_RETURN        {}
 185 #define NOT_PARALLELGC_RETURN_(code) { return code; }
 186 #endif // INCLUDE_PARALLELGC
 187 
 188 #ifndef INCLUDE_SERIALGC
 189 #define INCLUDE_SERIALGC 1
 190 #endif // INCLUDE_SERIALGC
 191 
 192 #if INCLUDE_SERIALGC
 193 #define SERIALGC_ONLY(x) x
 194 #define SERIALGC_ONLY_ARG(arg) arg,
 195 #define NOT_SERIALGC(x)
 196 #define NOT_SERIALGC_RETURN        /* next token must be ; */
 197 #define NOT_SERIALGC_RETURN_(code) /* next token must be ; */
 198 #else
 199 #define SERIALGC_ONLY(x)
 200 #define SERIALGC_ONLY_ARG(arg)
 201 #define NOT_SERIALGC(x) x
 202 #define NOT_SERIALGC_RETURN        {}
 203 #define NOT_SERIALGC_RETURN_(code) { return code; }
 204 #endif // INCLUDE_SERIALGC
 205 
 206 #if INCLUDE_CMSGC || INCLUDE_G1GC || INCLUDE_PARALLELGC
 207 #define INCLUDE_NOT_ONLY_SERIALGC 1
 208 #else
 209 #define INCLUDE_NOT_ONLY_SERIALGC 0
 210 #endif
 211 
 212 #define INCLUDE_OOP_OOP_ITERATE_BACKWARDS INCLUDE_NOT_ONLY_SERIALGC
 213 
 214 #ifndef INCLUDE_NMT
 215 #define INCLUDE_NMT 1
 216 #endif // INCLUDE_NMT
 217 
 218 #if INCLUDE_NMT
 219 #define NOT_NMT_RETURN        /* next token must be ; */
 220 #define NOT_NMT_RETURN_(code) /* next token must be ; */
 221 #else
 222 #define NOT_NMT_RETURN        {}
 223 #define NOT_NMT_RETURN_(code) { return code; }
 224 #endif // INCLUDE_NMT
 225 
 226 #ifndef INCLUDE_TRACE
 227 #define INCLUDE_TRACE 1
 228 #endif // INCLUDE_TRACE
 229 
 230 #ifndef INCLUDE_JVMCI
 231 #define INCLUDE_JVMCI 1
 232 #endif


 566 // To use Atomic::inc(jshort* dest) and Atomic::dec(jshort* dest), the address must be specially
 567 // aligned, such that (*dest) occupies the upper 16 bits of an aligned 32-bit word. The best way to
 568 // achieve is to place your short value next to another short value, which doesn't need atomic ops.
 569 //
 570 // Example
 571 //  ATOMIC_SHORT_PAIR(
 572 //    volatile short _refcount,  // needs atomic operation
 573 //    unsigned short _length     // number of UTF8 characters in the symbol (does not need atomic op)
 574 //  );
 575 
 576 #ifdef VM_LITTLE_ENDIAN
 577   #define ATOMIC_SHORT_PAIR(atomic_decl, non_atomic_decl)  \
 578     non_atomic_decl;                                       \
 579     atomic_decl
 580 #else
 581   #define ATOMIC_SHORT_PAIR(atomic_decl, non_atomic_decl)  \
 582     atomic_decl;                                           \
 583     non_atomic_decl
 584 #endif
 585 
 586 #if INCLUDE_CDS && INCLUDE_G1GC && defined(_LP64) && !defined(_WINDOWS)
 587 #define INCLUDE_CDS_JAVA_HEAP 1
 588 #define CDS_JAVA_HEAP_ONLY(x) x
 589 #define NOT_CDS_JAVA_HEAP(x)
 590 #define NOT_CDS_JAVA_HEAP_RETURN
 591 #define NOT_CDS_JAVA_HEAP_RETURN_(code)
 592 #else
 593 #define INCLUDE_CDS_JAVA_HEAP 0
 594 #define CDS_JAVA_HEAP_ONLY(x)
 595 #define NOT_CDS_JAVA_HEAP(x) x
 596 #define NOT_CDS_JAVA_HEAP_RETURN        {}
 597 #define NOT_CDS_JAVA_HEAP_RETURN_(code) { return code; }
 598 #endif
 599 
 600 #endif // SHARE_VM_UTILITIES_MACROS_HPP
< prev index next >