< prev index next >

src/hotspot/share/runtime/threads.hpp

Print this page

117 #endif // ASSERT
118 
119   // Verification
120   static void verify();
121   static void print_on(outputStream* st, bool print_stacks, bool internal_format, bool print_concurrent_locks, bool print_extended_info);
122   static void print(bool print_stacks, bool internal_format) {
123     // this function is only used by debug.cpp
124     print_on(tty, print_stacks, internal_format, false /* no concurrent lock printed */, false /* simple format */);
125   }
126   static void print_on_error(outputStream* st, Thread* current, char* buf, int buflen);
127   static void print_on_error(Thread* this_thread, outputStream* st, Thread* current, char* buf,
128                              int buflen, bool* found_current);
129   // Print threads busy compiling, and returns the number of printed threads.
130   static unsigned print_threads_compiling(outputStream* st, char* buf, int buflen, bool short_form = false);
131 
132   // Get Java threads that are waiting to enter or re-enter the specified monitor.
133   // Java threads that are executing mounted virtual threads are not included.
134   static GrowableArray<JavaThread*>* get_pending_threads(ThreadsList * t_list,
135                                                          int count, address monitor);
136 
137   // Get owning Java thread from the monitor's owner field.
138   static JavaThread *owning_thread_from_monitor_owner(ThreadsList * t_list,
139                                                       address owner);
140 
141   static JavaThread* owning_thread_from_object(ThreadsList* t_list, oop obj);
142   static JavaThread* owning_thread_from_monitor(ThreadsList* t_list, ObjectMonitor* owner);
143 
144   // Number of threads on the active threads list
145   static int number_of_threads()                 { return _number_of_threads; }
146   // Number of non-daemon threads on the active threads list
147   static int number_of_non_daemon_threads()      { return _number_of_non_daemon_threads; }
148 
149   struct Test;                  // For private gtest access.
150 };
151 
152 #endif // SHARE_RUNTIME_THREADS_HPP

117 #endif // ASSERT
118 
119   // Verification
120   static void verify();
121   static void print_on(outputStream* st, bool print_stacks, bool internal_format, bool print_concurrent_locks, bool print_extended_info);
122   static void print(bool print_stacks, bool internal_format) {
123     // this function is only used by debug.cpp
124     print_on(tty, print_stacks, internal_format, false /* no concurrent lock printed */, false /* simple format */);
125   }
126   static void print_on_error(outputStream* st, Thread* current, char* buf, int buflen);
127   static void print_on_error(Thread* this_thread, outputStream* st, Thread* current, char* buf,
128                              int buflen, bool* found_current);
129   // Print threads busy compiling, and returns the number of printed threads.
130   static unsigned print_threads_compiling(outputStream* st, char* buf, int buflen, bool short_form = false);
131 
132   // Get Java threads that are waiting to enter or re-enter the specified monitor.
133   // Java threads that are executing mounted virtual threads are not included.
134   static GrowableArray<JavaThread*>* get_pending_threads(ThreadsList * t_list,
135                                                          int count, address monitor);
136 
137   // Get owning Java thread from the basicLock address.
138   static JavaThread *owning_thread_from_stacklock(ThreadsList * t_list, address basicLock);

139 
140   static JavaThread* owning_thread_from_object(ThreadsList* t_list, oop obj);
141   static JavaThread* owning_thread_from_monitor(ThreadsList* t_list, ObjectMonitor* owner);
142 
143   // Number of threads on the active threads list
144   static int number_of_threads()                 { return _number_of_threads; }
145   // Number of non-daemon threads on the active threads list
146   static int number_of_non_daemon_threads()      { return _number_of_non_daemon_threads; }
147 
148   struct Test;                  // For private gtest access.
149 };
150 
151 #endif // SHARE_RUNTIME_THREADS_HPP
< prev index next >