116 static bool is_vm_complete() { return _vm_complete; }
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 count of Java threads that are waiting to enter or re-enter the specified monitor.
133 static GrowableArray<JavaThread*>* get_pending_threads(ThreadsList * t_list,
134 int count, address monitor);
135
136 // Get owning Java thread from the monitor's owner field.
137 static JavaThread *owning_thread_from_monitor_owner(ThreadsList * t_list,
138 address owner);
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
|
116 static bool is_vm_complete() { return _vm_complete; }
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 count of Java threads that are waiting to enter or re-enter the specified monitor.
133 static GrowableArray<JavaThread*>* get_pending_threads(ThreadsList * t_list,
134 int count, address monitor);
135
136 // Get owning Java thread from the basicLock address.
137 static JavaThread *owning_thread_from_stacklock(ThreadsList * t_list, address basicLock);
138
139 static JavaThread* owning_thread_from_object(ThreadsList* t_list, oop obj);
140 static JavaThread* owning_thread_from_monitor(ThreadsList* t_list, ObjectMonitor* owner);
141
142 // Number of threads on the active threads list
143 static int number_of_threads() { return _number_of_threads; }
144 // Number of non-daemon threads on the active threads list
145 static int number_of_non_daemon_threads() { return _number_of_non_daemon_threads; }
146
147 struct Test; // For private gtest access.
148 };
149
150 #endif // SHARE_RUNTIME_THREADS_HPP
|