src/share/vm/utilities/globalDefinitions.hpp

Print this page
rev 4773 : 8005849: JEP 167: Event-Based JVM Tracing
Reviewed-by: acorn, coleenp, sla
Contributed-by: Karen Kinnear <karen.kinnear@oracle.com>, Bengt Rutisson <bengt.rutisson@oracle.com>, Calvin Cheung <calvin.cheung@oracle.com>, Erik Gahlin <erik.gahlin@oracle.com>, Erik Helin <erik.helin@oracle.com>, Jesper Wilhelmsson <jesper.wilhelmsson@oracle.com>, Keith McGuigan <keith.mcguigan@oracle.com>, Mattias Tobiasson <mattias.tobiasson@oracle.com>, Markus Gronlund <markus.gronlund@oracle.com>, Mikael Auno <mikael.auno@oracle.com>, Nils Eliasson <nils.eliasson@oracle.com>, Nils Loodin <nils.loodin@oracle.com>, Rickard Backman <rickard.backman@oracle.com>, Staffan Larsen <staffan.larsen@oracle.com>, Stefan Karlsson <stefan.karlsson@oracle.com>, Yekaterina Kantserova <yekaterina.kantserova@oracle.com>


 746     //case ztos: return T_BOOLEAN;//FIXME
 747     case btos : return T_BYTE;
 748     case ctos : return T_CHAR;
 749     case stos : return T_SHORT;
 750     case itos : return T_INT;
 751     case ltos : return T_LONG;
 752     case ftos : return T_FLOAT;
 753     case dtos : return T_DOUBLE;
 754     case atos : return T_OBJECT;
 755     case vtos : return T_VOID;
 756   }
 757   return T_ILLEGAL;
 758 }
 759 
 760 
 761 // Helper function to convert BasicType info into TosState
 762 // Note: Cannot define here as it uses global constant at the time being.
 763 TosState as_TosState(BasicType type);
 764 
 765 
 766 // ReferenceType is used to distinguish between java/lang/ref/Reference subclasses
 767 
 768 enum ReferenceType {
 769  REF_NONE,      // Regular class
 770  REF_OTHER,     // Subclass of java/lang/ref/Reference, but not subclass of one of the classes below
 771  REF_SOFT,      // Subclass of java/lang/ref/SoftReference
 772  REF_WEAK,      // Subclass of java/lang/ref/WeakReference
 773  REF_FINAL,     // Subclass of java/lang/ref/FinalReference
 774  REF_PHANTOM    // Subclass of java/lang/ref/PhantomReference
 775 };
 776 
 777 
 778 // JavaThreadState keeps track of which part of the code a thread is executing in. This
 779 // information is needed by the safepoint code.
 780 //
 781 // There are 4 essential states:
 782 //
 783 //  _thread_new         : Just started, but not executed init. code yet (most likely still in OS init code)
 784 //  _thread_in_native   : In native code. This is a safepoint region, since all oops will be in jobject handles
 785 //  _thread_in_vm       : Executing in the vm
 786 //  _thread_in_Java     : Executing either interpreted or compiled Java code (or could be in a stub)
 787 //
 788 // Each state has an associated xxxx_trans state, which is an intermediate state used when a thread is in
 789 // a transition from one state to another. These extra states makes it possible for the safepoint code to
 790 // handle certain thread_states without having to suspend the thread - making the safepoint code faster.
 791 //
 792 // Given a state, the xxx_trans state can always be found by adding 1.
 793 //
 794 enum JavaThreadState {
 795   _thread_uninitialized     =  0, // should never happen (missing initialization)
 796   _thread_new               =  2, // just starting up, i.e., in process of being initialized
 797   _thread_new_trans         =  3, // corresponding transition state (not used, included for completness)




 746     //case ztos: return T_BOOLEAN;//FIXME
 747     case btos : return T_BYTE;
 748     case ctos : return T_CHAR;
 749     case stos : return T_SHORT;
 750     case itos : return T_INT;
 751     case ltos : return T_LONG;
 752     case ftos : return T_FLOAT;
 753     case dtos : return T_DOUBLE;
 754     case atos : return T_OBJECT;
 755     case vtos : return T_VOID;
 756   }
 757   return T_ILLEGAL;
 758 }
 759 
 760 
 761 // Helper function to convert BasicType info into TosState
 762 // Note: Cannot define here as it uses global constant at the time being.
 763 TosState as_TosState(BasicType type);
 764 
 765 












 766 // JavaThreadState keeps track of which part of the code a thread is executing in. This
 767 // information is needed by the safepoint code.
 768 //
 769 // There are 4 essential states:
 770 //
 771 //  _thread_new         : Just started, but not executed init. code yet (most likely still in OS init code)
 772 //  _thread_in_native   : In native code. This is a safepoint region, since all oops will be in jobject handles
 773 //  _thread_in_vm       : Executing in the vm
 774 //  _thread_in_Java     : Executing either interpreted or compiled Java code (or could be in a stub)
 775 //
 776 // Each state has an associated xxxx_trans state, which is an intermediate state used when a thread is in
 777 // a transition from one state to another. These extra states makes it possible for the safepoint code to
 778 // handle certain thread_states without having to suspend the thread - making the safepoint code faster.
 779 //
 780 // Given a state, the xxx_trans state can always be found by adding 1.
 781 //
 782 enum JavaThreadState {
 783   _thread_uninitialized     =  0, // should never happen (missing initialization)
 784   _thread_new               =  2, // just starting up, i.e., in process of being initialized
 785   _thread_new_trans         =  3, // corresponding transition state (not used, included for completness)