< prev index next >

src/hotspot/share/runtime/thread.hpp

Print this page
rev 50307 : [mq]: cont


 963   volatile bool         _suspend_equivalent;     // Suspend equivalent condition
 964   jint                  _in_deopt_handler;       // count of deoptimization
 965                                                  // handlers thread is in
 966   volatile bool         _doing_unsafe_access;    // Thread may fault due to unsafe access
 967   bool                  _do_not_unlock_if_synchronized;  // Do not unlock the receiver of a synchronized method (since it was
 968                                                          // never locked) when throwing an exception. Used by interpreter only.
 969 
 970   // JNI attach states:
 971   enum JNIAttachStates {
 972     _not_attaching_via_jni = 1,  // thread is not attaching via JNI
 973     _attaching_via_jni,          // thread is attaching via JNI
 974     _attached_via_jni            // thread has attached via JNI
 975   };
 976 
 977   // A regular JavaThread's _jni_attach_state is _not_attaching_via_jni.
 978   // A native thread that is attaching via JNI starts with a value
 979   // of _attaching_via_jni and transitions to _attached_via_jni.
 980   volatile JNIAttachStates _jni_attach_state;
 981 
 982  public:



 983   // State of the stack guard pages for this thread.
 984   enum StackGuardState {
 985     stack_guard_unused,         // not needed
 986     stack_guard_reserved_disabled,
 987     stack_guard_yellow_reserved_disabled,// disabled (temporarily) after stack overflow
 988     stack_guard_enabled         // enabled
 989   };
 990 
 991  private:
 992 
 993 #if INCLUDE_JVMCI
 994   // The _pending_* fields below are used to communicate extra information
 995   // from an uncommon trap in JVMCI compiled code to the uncommon trap handler.
 996 
 997   // Communicates the DeoptReason and DeoptAction of the uncommon trap
 998   int       _pending_deoptimization;
 999 
1000   // Specifies whether the uncommon trap is to bci 0 of a synchronized method
1001   // before the monitor has been acquired.
1002   bool      _pending_monitorenter;


1636 #endif // PRODUCT
1637   static ByteSize jni_environment_offset()       { return byte_offset_of(JavaThread, _jni_environment); }
1638   static ByteSize pending_jni_exception_check_fn_offset() {
1639     return byte_offset_of(JavaThread, _pending_jni_exception_check_fn);
1640   }
1641   static ByteSize last_Java_sp_offset() {
1642     return byte_offset_of(JavaThread, _anchor) + JavaFrameAnchor::last_Java_sp_offset();
1643   }
1644   static ByteSize last_Java_pc_offset() {
1645     return byte_offset_of(JavaThread, _anchor) + JavaFrameAnchor::last_Java_pc_offset();
1646   }
1647   static ByteSize frame_anchor_offset() {
1648     return byte_offset_of(JavaThread, _anchor);
1649   }
1650   static ByteSize callee_target_offset()         { return byte_offset_of(JavaThread, _callee_target); }
1651   static ByteSize vm_result_offset()             { return byte_offset_of(JavaThread, _vm_result); }
1652   static ByteSize vm_result_2_offset()           { return byte_offset_of(JavaThread, _vm_result_2); }
1653   static ByteSize thread_state_offset()          { return byte_offset_of(JavaThread, _thread_state); }
1654   static ByteSize saved_exception_pc_offset()    { return byte_offset_of(JavaThread, _saved_exception_pc); }
1655   static ByteSize osthread_offset()              { return byte_offset_of(JavaThread, _osthread); }

1656 #if INCLUDE_JVMCI
1657   static ByteSize pending_deoptimization_offset() { return byte_offset_of(JavaThread, _pending_deoptimization); }
1658   static ByteSize pending_monitorenter_offset()  { return byte_offset_of(JavaThread, _pending_monitorenter); }
1659   static ByteSize pending_failed_speculation_offset() { return byte_offset_of(JavaThread, _pending_failed_speculation); }
1660   static ByteSize jvmci_alternate_call_target_offset() { return byte_offset_of(JavaThread, _jvmci._alternate_call_target); }
1661   static ByteSize jvmci_implicit_exception_pc_offset() { return byte_offset_of(JavaThread, _jvmci._implicit_exception_pc); }
1662   static ByteSize jvmci_counters_offset()        { return byte_offset_of(JavaThread, _jvmci_counters); }
1663 #endif // INCLUDE_JVMCI
1664   static ByteSize exception_oop_offset()         { return byte_offset_of(JavaThread, _exception_oop); }
1665   static ByteSize exception_pc_offset()          { return byte_offset_of(JavaThread, _exception_pc); }
1666   static ByteSize exception_handler_pc_offset()  { return byte_offset_of(JavaThread, _exception_handler_pc); }
1667   static ByteSize stack_overflow_limit_offset()  { return byte_offset_of(JavaThread, _stack_overflow_limit); }
1668   static ByteSize is_method_handle_return_offset() { return byte_offset_of(JavaThread, _is_method_handle_return); }
1669   static ByteSize stack_guard_state_offset()     { return byte_offset_of(JavaThread, _stack_guard_state); }
1670   static ByteSize reserved_stack_activation_offset() { return byte_offset_of(JavaThread, _reserved_stack_activation); }
1671   static ByteSize suspend_flags_offset()         { return byte_offset_of(JavaThread, _suspend_flags); }
1672 
1673   static ByteSize do_not_unlock_if_synchronized_offset() { return byte_offset_of(JavaThread, _do_not_unlock_if_synchronized); }
1674   static ByteSize should_post_on_exceptions_flag_offset() {
1675     return byte_offset_of(JavaThread, _should_post_on_exceptions_flag);




 963   volatile bool         _suspend_equivalent;     // Suspend equivalent condition
 964   jint                  _in_deopt_handler;       // count of deoptimization
 965                                                  // handlers thread is in
 966   volatile bool         _doing_unsafe_access;    // Thread may fault due to unsafe access
 967   bool                  _do_not_unlock_if_synchronized;  // Do not unlock the receiver of a synchronized method (since it was
 968                                                          // never locked) when throwing an exception. Used by interpreter only.
 969 
 970   // JNI attach states:
 971   enum JNIAttachStates {
 972     _not_attaching_via_jni = 1,  // thread is not attaching via JNI
 973     _attaching_via_jni,          // thread is attaching via JNI
 974     _attached_via_jni            // thread has attached via JNI
 975   };
 976 
 977   // A regular JavaThread's _jni_attach_state is _not_attaching_via_jni.
 978   // A native thread that is attaching via JNI starts with a value
 979   // of _attaching_via_jni and transitions to _attached_via_jni.
 980   volatile JNIAttachStates _jni_attach_state;
 981 
 982  public:
 983 
 984   DEBUG_ONLY(oopDesc* _continuation;)
 985 
 986   // State of the stack guard pages for this thread.
 987   enum StackGuardState {
 988     stack_guard_unused,         // not needed
 989     stack_guard_reserved_disabled,
 990     stack_guard_yellow_reserved_disabled,// disabled (temporarily) after stack overflow
 991     stack_guard_enabled         // enabled
 992   };
 993 
 994  private:
 995 
 996 #if INCLUDE_JVMCI
 997   // The _pending_* fields below are used to communicate extra information
 998   // from an uncommon trap in JVMCI compiled code to the uncommon trap handler.
 999 
1000   // Communicates the DeoptReason and DeoptAction of the uncommon trap
1001   int       _pending_deoptimization;
1002 
1003   // Specifies whether the uncommon trap is to bci 0 of a synchronized method
1004   // before the monitor has been acquired.
1005   bool      _pending_monitorenter;


1639 #endif // PRODUCT
1640   static ByteSize jni_environment_offset()       { return byte_offset_of(JavaThread, _jni_environment); }
1641   static ByteSize pending_jni_exception_check_fn_offset() {
1642     return byte_offset_of(JavaThread, _pending_jni_exception_check_fn);
1643   }
1644   static ByteSize last_Java_sp_offset() {
1645     return byte_offset_of(JavaThread, _anchor) + JavaFrameAnchor::last_Java_sp_offset();
1646   }
1647   static ByteSize last_Java_pc_offset() {
1648     return byte_offset_of(JavaThread, _anchor) + JavaFrameAnchor::last_Java_pc_offset();
1649   }
1650   static ByteSize frame_anchor_offset() {
1651     return byte_offset_of(JavaThread, _anchor);
1652   }
1653   static ByteSize callee_target_offset()         { return byte_offset_of(JavaThread, _callee_target); }
1654   static ByteSize vm_result_offset()             { return byte_offset_of(JavaThread, _vm_result); }
1655   static ByteSize vm_result_2_offset()           { return byte_offset_of(JavaThread, _vm_result_2); }
1656   static ByteSize thread_state_offset()          { return byte_offset_of(JavaThread, _thread_state); }
1657   static ByteSize saved_exception_pc_offset()    { return byte_offset_of(JavaThread, _saved_exception_pc); }
1658   static ByteSize osthread_offset()              { return byte_offset_of(JavaThread, _osthread); }
1659   DEBUG_ONLY(static ByteSize continuation_offset()          { return byte_offset_of(JavaThread, _continuation); })
1660 #if INCLUDE_JVMCI
1661   static ByteSize pending_deoptimization_offset() { return byte_offset_of(JavaThread, _pending_deoptimization); }
1662   static ByteSize pending_monitorenter_offset()  { return byte_offset_of(JavaThread, _pending_monitorenter); }
1663   static ByteSize pending_failed_speculation_offset() { return byte_offset_of(JavaThread, _pending_failed_speculation); }
1664   static ByteSize jvmci_alternate_call_target_offset() { return byte_offset_of(JavaThread, _jvmci._alternate_call_target); }
1665   static ByteSize jvmci_implicit_exception_pc_offset() { return byte_offset_of(JavaThread, _jvmci._implicit_exception_pc); }
1666   static ByteSize jvmci_counters_offset()        { return byte_offset_of(JavaThread, _jvmci_counters); }
1667 #endif // INCLUDE_JVMCI
1668   static ByteSize exception_oop_offset()         { return byte_offset_of(JavaThread, _exception_oop); }
1669   static ByteSize exception_pc_offset()          { return byte_offset_of(JavaThread, _exception_pc); }
1670   static ByteSize exception_handler_pc_offset()  { return byte_offset_of(JavaThread, _exception_handler_pc); }
1671   static ByteSize stack_overflow_limit_offset()  { return byte_offset_of(JavaThread, _stack_overflow_limit); }
1672   static ByteSize is_method_handle_return_offset() { return byte_offset_of(JavaThread, _is_method_handle_return); }
1673   static ByteSize stack_guard_state_offset()     { return byte_offset_of(JavaThread, _stack_guard_state); }
1674   static ByteSize reserved_stack_activation_offset() { return byte_offset_of(JavaThread, _reserved_stack_activation); }
1675   static ByteSize suspend_flags_offset()         { return byte_offset_of(JavaThread, _suspend_flags); }
1676 
1677   static ByteSize do_not_unlock_if_synchronized_offset() { return byte_offset_of(JavaThread, _do_not_unlock_if_synchronized); }
1678   static ByteSize should_post_on_exceptions_flag_offset() {
1679     return byte_offset_of(JavaThread, _should_post_on_exceptions_flag);


< prev index next >