< prev index next >

src/hotspot/share/runtime/threadSMR.hpp

Print this page




 112   static uint64_t              _java_thread_list_free_cnt;
 113   static uint                  _java_thread_list_max;
 114   static uint                  _nested_thread_list_max;
 115   static volatile uint         _tlh_cnt;
 116   static volatile uint         _tlh_time_max;
 117   static volatile uint         _tlh_times;
 118   static ThreadsList*          _to_delete_list;
 119   static uint                  _to_delete_list_cnt;
 120   static uint                  _to_delete_list_max;
 121 
 122   static ThreadsList *acquire_stable_list_fast_path(Thread *self);
 123   static ThreadsList *acquire_stable_list_nested_path(Thread *self);
 124   static void add_deleted_thread_times(uint add_value);
 125   static void add_tlh_times(uint add_value);
 126   static void clear_delete_notify();
 127   static bool delete_notify();
 128   static void free_list(ThreadsList* threads);
 129   static void inc_deleted_thread_cnt();
 130   static void inc_java_thread_list_alloc_cnt();
 131   static void inc_tlh_cnt();
 132   static bool is_a_protected_JavaThread(JavaThread *thread);
 133   static void release_stable_list_wake_up(bool is_nested);
 134   static void set_delete_notify();
 135   static void threads_do(ThreadClosure *tc);
 136   static void threads_do(ThreadClosure *tc, ThreadsList *list);
 137   static void update_deleted_thread_time_max(uint new_value);
 138   static void update_java_thread_list_max(uint new_value);
 139   static void update_tlh_time_max(uint new_value);
 140   static void verify_hazard_ptr_scanned(Thread *self, ThreadsList *threads);
 141   static ThreadsList* xchg_java_thread_list(ThreadsList* new_list);
 142 
 143  public:
 144   static void add_thread(JavaThread *thread);
 145   static ThreadsList* get_java_thread_list();
 146   static bool is_a_protected_JavaThread_with_lock(JavaThread *thread, bool skiplock = false);

 147   static bool is_bootstrap_list(ThreadsList* list);
 148   static void remove_thread(JavaThread *thread);
 149   static void smr_delete(JavaThread *thread);
 150   static void update_tlh_stats(uint millis);
 151 
 152   // Logging and printing support:
 153   static void log_statistics();
 154   static void print_info_elements_on(outputStream* st, ThreadsList* t_list);
 155   static void print_info_on(outputStream* st);
 156   static void print_info_on(const Thread* thread, outputStream* st);
 157 };
 158 
 159 // A fast list of JavaThreads.
 160 //
 161 class ThreadsList : public CHeapObj<mtThread> {
 162   friend class VMStructs;
 163   friend class SafeThreadsListPtr;  // for {dec,inc}_nested_handle_cnt() access
 164   friend class ThreadsSMRSupport;  // for _nested_handle_cnt, {add,remove}_thread(), {,set_}next_list() access
 165 
 166   const uint _length;




 112   static uint64_t              _java_thread_list_free_cnt;
 113   static uint                  _java_thread_list_max;
 114   static uint                  _nested_thread_list_max;
 115   static volatile uint         _tlh_cnt;
 116   static volatile uint         _tlh_time_max;
 117   static volatile uint         _tlh_times;
 118   static ThreadsList*          _to_delete_list;
 119   static uint                  _to_delete_list_cnt;
 120   static uint                  _to_delete_list_max;
 121 
 122   static ThreadsList *acquire_stable_list_fast_path(Thread *self);
 123   static ThreadsList *acquire_stable_list_nested_path(Thread *self);
 124   static void add_deleted_thread_times(uint add_value);
 125   static void add_tlh_times(uint add_value);
 126   static void clear_delete_notify();
 127   static bool delete_notify();
 128   static void free_list(ThreadsList* threads);
 129   static void inc_deleted_thread_cnt();
 130   static void inc_java_thread_list_alloc_cnt();
 131   static void inc_tlh_cnt();

 132   static void release_stable_list_wake_up(bool is_nested);
 133   static void set_delete_notify();
 134   static void threads_do(ThreadClosure *tc);
 135   static void threads_do(ThreadClosure *tc, ThreadsList *list);
 136   static void update_deleted_thread_time_max(uint new_value);
 137   static void update_java_thread_list_max(uint new_value);
 138   static void update_tlh_time_max(uint new_value);
 139   static void verify_hazard_ptr_scanned(Thread *self, ThreadsList *threads);
 140   static ThreadsList* xchg_java_thread_list(ThreadsList* new_list);
 141 
 142  public:
 143   static void add_thread(JavaThread *thread);
 144   static ThreadsList* get_java_thread_list();
 145   static bool is_a_protected_JavaThread(JavaThread *thread);
 146   static bool is_a_protected_JavaThread_with_lock(JavaThread *thread);
 147   static bool is_bootstrap_list(ThreadsList* list);
 148   static void remove_thread(JavaThread *thread);
 149   static void smr_delete(JavaThread *thread);
 150   static void update_tlh_stats(uint millis);
 151 
 152   // Logging and printing support:
 153   static void log_statistics();
 154   static void print_info_elements_on(outputStream* st, ThreadsList* t_list);
 155   static void print_info_on(outputStream* st);
 156   static void print_info_on(const Thread* thread, outputStream* st);
 157 };
 158 
 159 // A fast list of JavaThreads.
 160 //
 161 class ThreadsList : public CHeapObj<mtThread> {
 162   friend class VMStructs;
 163   friend class SafeThreadsListPtr;  // for {dec,inc}_nested_handle_cnt() access
 164   friend class ThreadsSMRSupport;  // for _nested_handle_cnt, {add,remove}_thread(), {,set_}next_list() access
 165 
 166   const uint _length;


< prev index next >