< prev index next >

src/hotspot/share/runtime/thread.hpp

Print this page
*** 30,10 ***
--- 30,11 ---
  #include "gc/shared/gcThreadLocalData.hpp"
  #include "gc/shared/threadLocalAllocBuffer.hpp"
  #include "memory/allocation.hpp"
  #include "runtime/atomic.hpp"
  #include "runtime/globals.hpp"
+ #include "runtime/lockStack.hpp"
  #include "runtime/os.hpp"
  #include "runtime/threadHeapSampler.hpp"
  #include "runtime/threadLocalStorage.hpp"
  #include "runtime/threadStatisticalInfo.hpp"
  #include "runtime/unhandledOops.hpp"

*** 605,12 ***
    static ByteSize allocated_bytes_offset()       { return byte_offset_of(Thread, _allocated_bytes); }
  
    JFR_ONLY(DEFINE_THREAD_LOCAL_OFFSET_JFR;)
  
   public:
!   ParkEvent * volatile _ParkEvent;            // for Object monitors, JVMTI raw monitors,
-                                               // and ObjectSynchronizer::read_stable_mark
  
    // Termination indicator used by the signal handler.
    // _ParkEvent is just a convenient field we can NULL out after setting the JavaThread termination state
    // (which can't itself be read from the signal handler if a signal hits during the Thread destructor).
    bool has_terminated()                       { return Atomic::load(&_ParkEvent) == NULL; };
--- 606,11 ---
    static ByteSize allocated_bytes_offset()       { return byte_offset_of(Thread, _allocated_bytes); }
  
    JFR_ONLY(DEFINE_THREAD_LOCAL_OFFSET_JFR;)
  
   public:
!   ParkEvent * volatile _ParkEvent;            // for Object monitors and JVMTI raw monitors
  
    // Termination indicator used by the signal handler.
    // _ParkEvent is just a convenient field we can NULL out after setting the JavaThread termination state
    // (which can't itself be read from the signal handler if a signal hits during the Thread destructor).
    bool has_terminated()                       { return Atomic::load(&_ParkEvent) == NULL; };

*** 618,10 ***
--- 618,20 ---
    jint _hashStateW;                           // Marsaglia Shift-XOR thread-local RNG
    jint _hashStateX;                           // thread-specific hashCode generator state
    jint _hashStateY;
    jint _hashStateZ;
  
+ private:
+   LockStack _lock_stack;
+ 
+ public:
+   LockStack& lock_stack() { return _lock_stack; }
+   const LockStack& lock_stack() const { return _lock_stack; }
+ 
+   static ByteSize lock_stack_current_offset()    { return byte_offset_of(Thread, _lock_stack) + LockStack::current_offset(); }
+   static ByteSize lock_stack_limit_offset()    { return byte_offset_of(Thread, _lock_stack) + LockStack::limit_offset(); }
+ 
    // Low-level leaf-lock primitives used to implement synchronization.
    // Not for general synchronization use.
    static void SpinAcquire(volatile int * Lock, const char * Name);
    static void SpinRelease(volatile int * Lock);
  
< prev index next >