< prev index next >

src/hotspot/share/utilities/globalDefinitions.hpp

Print this page

 947 // a transition from one state to another. These extra states makes it possible for the safepoint code to
 948 // handle certain thread_states without having to suspend the thread - making the safepoint code faster.
 949 //
 950 // Given a state, the xxxx_trans state can always be found by adding 1.
 951 //
 952 enum JavaThreadState {
 953   _thread_uninitialized     =  0, // should never happen (missing initialization)
 954   _thread_new               =  2, // just starting up, i.e., in process of being initialized
 955   _thread_new_trans         =  3, // corresponding transition state (not used, included for completness)
 956   _thread_in_native         =  4, // running in native code
 957   _thread_in_native_trans   =  5, // corresponding transition state
 958   _thread_in_vm             =  6, // running in VM
 959   _thread_in_vm_trans       =  7, // corresponding transition state
 960   _thread_in_Java           =  8, // running in Java or in stub code
 961   _thread_in_Java_trans     =  9, // corresponding transition state (not used, included for completness)
 962   _thread_blocked           = 10, // blocked in vm
 963   _thread_blocked_trans     = 11, // corresponding transition state
 964   _thread_max_state         = 12  // maximum thread state+1 - used for statistics allocation
 965 };
 966 









 967 //----------------------------------------------------------------------------------------------------
 968 // Special constants for debugging
 969 
 970 const jint     badInt           = -3;                       // generic "bad int" value
 971 const intptr_t badAddressVal    = -2;                       // generic "bad address" value
 972 const intptr_t badOopVal        = -1;                       // generic "bad oop" value
 973 const intptr_t badHeapOopVal    = (intptr_t) CONST64(0x2BAD4B0BBAADBABE); // value used to zap heap after GC
 974 const int      badStackSegVal   = 0xCA;                     // value used to zap stack segments
 975 const int      badHandleValue   = 0xBC;                     // value used to zap vm handle area
 976 const int      badResourceValue = 0xAB;                     // value used to zap resource area
 977 const int      freeBlockPad     = 0xBA;                     // value used to pad freed blocks.
 978 const int      uninitBlockPad   = 0xF1;                     // value used to zap newly malloc'd blocks.
 979 const juint    uninitMetaWordVal= 0xf7f7f7f7;               // value used to zap newly allocated metachunk
 980 const juint    badHeapWordVal   = 0xBAADBABE;               // value used to zap heap after GC
 981 const juint    badMetaWordVal   = 0xBAADFADE;               // value used to zap metadata heap after GC
 982 const int      badCodeHeapNewVal= 0xCC;                     // value used to zap Code heap at allocation
 983 const int      badCodeHeapFreeVal = 0xDD;                   // value used to zap Code heap at deallocation
 984 
 985 
 986 // (These must be implemented as #defines because C++ compilers are

 947 // a transition from one state to another. These extra states makes it possible for the safepoint code to
 948 // handle certain thread_states without having to suspend the thread - making the safepoint code faster.
 949 //
 950 // Given a state, the xxxx_trans state can always be found by adding 1.
 951 //
 952 enum JavaThreadState {
 953   _thread_uninitialized     =  0, // should never happen (missing initialization)
 954   _thread_new               =  2, // just starting up, i.e., in process of being initialized
 955   _thread_new_trans         =  3, // corresponding transition state (not used, included for completness)
 956   _thread_in_native         =  4, // running in native code
 957   _thread_in_native_trans   =  5, // corresponding transition state
 958   _thread_in_vm             =  6, // running in VM
 959   _thread_in_vm_trans       =  7, // corresponding transition state
 960   _thread_in_Java           =  8, // running in Java or in stub code
 961   _thread_in_Java_trans     =  9, // corresponding transition state (not used, included for completness)
 962   _thread_blocked           = 10, // blocked in vm
 963   _thread_blocked_trans     = 11, // corresponding transition state
 964   _thread_max_state         = 12  // maximum thread state+1 - used for statistics allocation
 965 };
 966 
 967 enum LockingMode {
 968   // Use only heavy monitors for locking
 969   LM_MONITOR     = 0,
 970   // Legacy stack-locking, with monitors as 2nd tier
 971   LM_LEGACY      = 1,
 972   // New lightweight locking, with monitors as 2nd tier
 973   LM_LIGHTWEIGHT = 2
 974 };
 975 
 976 //----------------------------------------------------------------------------------------------------
 977 // Special constants for debugging
 978 
 979 const jint     badInt           = -3;                       // generic "bad int" value
 980 const intptr_t badAddressVal    = -2;                       // generic "bad address" value
 981 const intptr_t badOopVal        = -1;                       // generic "bad oop" value
 982 const intptr_t badHeapOopVal    = (intptr_t) CONST64(0x2BAD4B0BBAADBABE); // value used to zap heap after GC
 983 const int      badStackSegVal   = 0xCA;                     // value used to zap stack segments
 984 const int      badHandleValue   = 0xBC;                     // value used to zap vm handle area
 985 const int      badResourceValue = 0xAB;                     // value used to zap resource area
 986 const int      freeBlockPad     = 0xBA;                     // value used to pad freed blocks.
 987 const int      uninitBlockPad   = 0xF1;                     // value used to zap newly malloc'd blocks.
 988 const juint    uninitMetaWordVal= 0xf7f7f7f7;               // value used to zap newly allocated metachunk
 989 const juint    badHeapWordVal   = 0xBAADBABE;               // value used to zap heap after GC
 990 const juint    badMetaWordVal   = 0xBAADFADE;               // value used to zap metadata heap after GC
 991 const int      badCodeHeapNewVal= 0xCC;                     // value used to zap Code heap at allocation
 992 const int      badCodeHeapFreeVal = 0xDD;                   // value used to zap Code heap at deallocation
 993 
 994 
 995 // (These must be implemented as #defines because C++ compilers are
< prev index next >