< prev index next >

src/hotspot/share/runtime/thread.hpp

Print this page
rev 47674 : Port 09.17.Thread_SMR_logging_update from JDK9 to JDK10
rev 47676 : eosterlund, stefank CR - refactor code into threadSMR.cpp and threadSMR.hpp
rev 47677 : eosterlund CR - need more inline fixes.
rev 47680 : Rebase to 2017.10.25 PIT snapshot.


2081   // Get/set the thread's current task
2082   CompileTask* task()                      { return _task; }
2083   void         set_task(CompileTask* task) { _task = task; }
2084 };
2085 
2086 inline CompilerThread* CompilerThread::current() {
2087   return JavaThread::current()->as_CompilerThread();
2088 }
2089 
2090 // The active thread queue. It also keeps track of the current used
2091 // thread priorities.
2092 class Threads: AllStatic {
2093   friend class VMStructs;
2094  private:
2095   // Safe Memory Reclamation (SMR) support:
2096   static Monitor*              _smr_delete_lock;
2097   // The '_cnt', '_max' and '_times" fields are enabled via
2098   // -XX:+EnableThreadSMRStatistics:
2099   static uint                  _smr_delete_lock_wait_cnt;
2100   static uint                  _smr_delete_lock_wait_max;
2101   static volatile int          _smr_delete_notify;
2102   static volatile jint         _smr_deleted_thread_cnt;
2103   static volatile jint         _smr_deleted_thread_time_max;
2104   static volatile jint         _smr_deleted_thread_times;
2105   static ThreadsList* volatile _smr_java_thread_list;
2106   static ThreadsList*          get_smr_java_thread_list();
2107   static ThreadsList*          xchg_smr_java_thread_list(ThreadsList* new_list);
2108   static long                  _smr_java_thread_list_alloc_cnt;
2109   static long                  _smr_java_thread_list_free_cnt;
2110   static uint                  _smr_java_thread_list_max;
2111   static uint                  _smr_nested_thread_list_max;
2112   static volatile jint         _smr_tlh_cnt;
2113   static volatile jint         _smr_tlh_time_max;
2114   static volatile jint         _smr_tlh_times;
2115   static ThreadsList*          _smr_to_delete_list;
2116   static uint                  _smr_to_delete_list_cnt;
2117   static uint                  _smr_to_delete_list_max;
2118 
2119   static JavaThread*           _thread_list;
2120   static int                   _number_of_threads;
2121   static int                   _number_of_non_daemon_threads;




2081   // Get/set the thread's current task
2082   CompileTask* task()                      { return _task; }
2083   void         set_task(CompileTask* task) { _task = task; }
2084 };
2085 
2086 inline CompilerThread* CompilerThread::current() {
2087   return JavaThread::current()->as_CompilerThread();
2088 }
2089 
2090 // The active thread queue. It also keeps track of the current used
2091 // thread priorities.
2092 class Threads: AllStatic {
2093   friend class VMStructs;
2094  private:
2095   // Safe Memory Reclamation (SMR) support:
2096   static Monitor*              _smr_delete_lock;
2097   // The '_cnt', '_max' and '_times" fields are enabled via
2098   // -XX:+EnableThreadSMRStatistics:
2099   static uint                  _smr_delete_lock_wait_cnt;
2100   static uint                  _smr_delete_lock_wait_max;
2101   static volatile jint         _smr_delete_notify;
2102   static volatile jint         _smr_deleted_thread_cnt;
2103   static volatile jint         _smr_deleted_thread_time_max;
2104   static volatile jint         _smr_deleted_thread_times;
2105   static ThreadsList* volatile _smr_java_thread_list;
2106   static ThreadsList*          get_smr_java_thread_list();
2107   static ThreadsList*          xchg_smr_java_thread_list(ThreadsList* new_list);
2108   static long                  _smr_java_thread_list_alloc_cnt;
2109   static long                  _smr_java_thread_list_free_cnt;
2110   static uint                  _smr_java_thread_list_max;
2111   static uint                  _smr_nested_thread_list_max;
2112   static volatile jint         _smr_tlh_cnt;
2113   static volatile jint         _smr_tlh_time_max;
2114   static volatile jint         _smr_tlh_times;
2115   static ThreadsList*          _smr_to_delete_list;
2116   static uint                  _smr_to_delete_list_cnt;
2117   static uint                  _smr_to_delete_list_max;
2118 
2119   static JavaThread*           _thread_list;
2120   static int                   _number_of_threads;
2121   static int                   _number_of_non_daemon_threads;


< prev index next >