src/hotspot/share/runtime/thread.hpp
changeset 58488 165b193b30dd
parent 58291 a013100f7a35
child 58495 465ba4fefe62
child 58679 9c3209ff7550
child 59132 189f47d990b5
equal deleted inserted replaced
58487:43f63f904bbc 58488:165b193b30dd
    60 class SafeThreadsListPtr;
    60 class SafeThreadsListPtr;
    61 class ThreadSafepointState;
    61 class ThreadSafepointState;
    62 class ThreadsList;
    62 class ThreadsList;
    63 class ThreadsSMRSupport;
    63 class ThreadsSMRSupport;
    64 
    64 
       
    65 class JvmtiRawMonitor;
    65 class JvmtiThreadState;
    66 class JvmtiThreadState;
    66 class ThreadStatistics;
    67 class ThreadStatistics;
    67 class ConcurrentLocksDump;
    68 class ConcurrentLocksDump;
    68 class ParkEvent;
    69 class ParkEvent;
    69 class Parker;
    70 class Parker;
   402   int   _vm_operation_completed_count;          // VM_Operation support
   403   int   _vm_operation_completed_count;          // VM_Operation support
   403 
   404 
   404   ObjectMonitor* _current_pending_monitor;      // ObjectMonitor this thread
   405   ObjectMonitor* _current_pending_monitor;      // ObjectMonitor this thread
   405                                                 // is waiting to lock
   406                                                 // is waiting to lock
   406   bool _current_pending_monitor_is_from_java;   // locking is from Java code
   407   bool _current_pending_monitor_is_from_java;   // locking is from Java code
       
   408   JvmtiRawMonitor* _current_pending_raw_monitor; // JvmtiRawMonitor this thread
       
   409                                                  // is waiting to lock
       
   410 
   407 
   411 
   408   // ObjectMonitor on which this thread called Object.wait()
   412   // ObjectMonitor on which this thread called Object.wait()
   409   ObjectMonitor* _current_waiting_monitor;
   413   ObjectMonitor* _current_waiting_monitor;
   410 
   414 
   411   // Per-thread ObjectMonitor lists:
   415   // Per-thread ObjectMonitor lists:
   638   }
   642   }
   639   void set_current_waiting_monitor(ObjectMonitor* monitor) {
   643   void set_current_waiting_monitor(ObjectMonitor* monitor) {
   640     _current_waiting_monitor = monitor;
   644     _current_waiting_monitor = monitor;
   641   }
   645   }
   642 
   646 
       
   647   // For tracking the Jvmti raw monitor the thread is pending on.
       
   648   JvmtiRawMonitor* current_pending_raw_monitor() {
       
   649     return _current_pending_raw_monitor;
       
   650   }
       
   651   void set_current_pending_raw_monitor(JvmtiRawMonitor* monitor) {
       
   652     _current_pending_raw_monitor = monitor;
       
   653   }
       
   654 
   643   // GC support
   655   // GC support
   644   // Apply "f->do_oop" to all root oops in "this".
   656   // Apply "f->do_oop" to all root oops in "this".
   645   //   Used by JavaThread::oops_do.
   657   //   Used by JavaThread::oops_do.
   646   // Apply "cf->do_code_blob" (if !NULL) to all code blobs active in frames
   658   // Apply "cf->do_code_blob" (if !NULL) to all code blobs active in frames
   647   virtual void oops_do(OopClosure* f, CodeBlobClosure* cf);
   659   virtual void oops_do(OopClosure* f, CodeBlobClosure* cf);
   784   JFR_ONLY(DEFINE_THREAD_LOCAL_OFFSET_JFR;)
   796   JFR_ONLY(DEFINE_THREAD_LOCAL_OFFSET_JFR;)
   785 
   797 
   786  public:
   798  public:
   787   volatile intptr_t _Stalled;
   799   volatile intptr_t _Stalled;
   788   volatile int _TypeTag;
   800   volatile int _TypeTag;
   789   ParkEvent * _ParkEvent;                     // for synchronized()
   801   ParkEvent * _ParkEvent;                     // for Object monitors and JVMTI raw monitors
   790   ParkEvent * _MuxEvent;                      // for low-level muxAcquire-muxRelease
   802   ParkEvent * _MuxEvent;                      // for low-level muxAcquire-muxRelease
   791   int NativeSyncRecursion;                    // diagnostic
   803   int NativeSyncRecursion;                    // diagnostic
   792 
   804 
   793   volatile int _OnTrap;                       // Resume-at IP delta
   805   volatile int _OnTrap;                       // Resume-at IP delta
   794   jint _hashStateW;                           // Marsaglia Shift-XOR thread-local RNG
   806   jint _hashStateW;                           // Marsaglia Shift-XOR thread-local RNG