1062 LM_LIGHTWEIGHT = 2
1063 };
1064
1065 //----------------------------------------------------------------------------------------------------
1066 // Special constants for debugging
1067
1068 const jint badInt = -3; // generic "bad int" value
1069 const intptr_t badAddressVal = -2; // generic "bad address" value
1070 const intptr_t badOopVal = -1; // generic "bad oop" value
1071 const intptr_t badHeapOopVal = (intptr_t) CONST64(0x2BAD4B0BBAADBABE); // value used to zap heap after GC
1072 const int badStackSegVal = 0xCA; // value used to zap stack segments
1073 const int badHandleValue = 0xBC; // value used to zap vm handle area
1074 const int badResourceValue = 0xAB; // value used to zap resource area
1075 const int freeBlockPad = 0xBA; // value used to pad freed blocks.
1076 const int uninitBlockPad = 0xF1; // value used to zap newly malloc'd blocks.
1077 const juint uninitMetaWordVal= 0xf7f7f7f7; // value used to zap newly allocated metachunk
1078 const juint badHeapWordVal = 0xBAADBABE; // value used to zap heap after GC
1079 const juint badMetaWordVal = 0xBAADFADE; // value used to zap metadata heap after GC
1080 const int badCodeHeapNewVal= 0xCC; // value used to zap Code heap at allocation
1081 const int badCodeHeapFreeVal = 0xDD; // value used to zap Code heap at deallocation
1082
1083
1084 // (These must be implemented as #defines because C++ compilers are
1085 // not obligated to inline non-integral constants!)
1086 #define badAddress ((address)::badAddressVal)
1087 #define badHeapWord (::badHeapWordVal)
1088
1089 // Default TaskQueue size is 16K (32-bit) or 128K (64-bit)
1090 #define TASKQUEUE_SIZE (NOT_LP64(1<<14) LP64_ONLY(1<<17))
1091
1092 //----------------------------------------------------------------------------------------------------
1093 // Utility functions for bitfield manipulations
1094
1095 const intptr_t AllBits = ~0; // all bits set in a word
1096 const intptr_t NoBits = 0; // no bits set in a word
1097 const jlong NoLongBits = 0; // no bits set in a long
1098 const intptr_t OneBit = 1; // only right_most bit set in a word
1099
1100 // get a word with the n.th or the right-most or left-most n bits set
1101 // (note: #define used only so that they can be used in enum constant definitions)
1102 #define nth_bit(n) (((n) >= BitsPerWord) ? 0 : (OneBit << (n)))
|
1062 LM_LIGHTWEIGHT = 2
1063 };
1064
1065 //----------------------------------------------------------------------------------------------------
1066 // Special constants for debugging
1067
1068 const jint badInt = -3; // generic "bad int" value
1069 const intptr_t badAddressVal = -2; // generic "bad address" value
1070 const intptr_t badOopVal = -1; // generic "bad oop" value
1071 const intptr_t badHeapOopVal = (intptr_t) CONST64(0x2BAD4B0BBAADBABE); // value used to zap heap after GC
1072 const int badStackSegVal = 0xCA; // value used to zap stack segments
1073 const int badHandleValue = 0xBC; // value used to zap vm handle area
1074 const int badResourceValue = 0xAB; // value used to zap resource area
1075 const int freeBlockPad = 0xBA; // value used to pad freed blocks.
1076 const int uninitBlockPad = 0xF1; // value used to zap newly malloc'd blocks.
1077 const juint uninitMetaWordVal= 0xf7f7f7f7; // value used to zap newly allocated metachunk
1078 const juint badHeapWordVal = 0xBAADBABE; // value used to zap heap after GC
1079 const juint badMetaWordVal = 0xBAADFADE; // value used to zap metadata heap after GC
1080 const int badCodeHeapNewVal= 0xCC; // value used to zap Code heap at allocation
1081 const int badCodeHeapFreeVal = 0xDD; // value used to zap Code heap at deallocation
1082 const intptr_t badDispHeaderDeopt = 0xDE0BD000; // value to fill unused displaced header during deoptimization
1083 const intptr_t badDispHeaderOSR = 0xDEAD05A0; // value to fill unused displaced header during OSR
1084
1085 // (These must be implemented as #defines because C++ compilers are
1086 // not obligated to inline non-integral constants!)
1087 #define badAddress ((address)::badAddressVal)
1088 #define badHeapWord (::badHeapWordVal)
1089
1090 // Default TaskQueue size is 16K (32-bit) or 128K (64-bit)
1091 #define TASKQUEUE_SIZE (NOT_LP64(1<<14) LP64_ONLY(1<<17))
1092
1093 //----------------------------------------------------------------------------------------------------
1094 // Utility functions for bitfield manipulations
1095
1096 const intptr_t AllBits = ~0; // all bits set in a word
1097 const intptr_t NoBits = 0; // no bits set in a word
1098 const jlong NoLongBits = 0; // no bits set in a long
1099 const intptr_t OneBit = 1; // only right_most bit set in a word
1100
1101 // get a word with the n.th or the right-most or left-most n bits set
1102 // (note: #define used only so that they can be used in enum constant definitions)
1103 #define nth_bit(n) (((n) >= BitsPerWord) ? 0 : (OneBit << (n)))
|