mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-17 09:34:38 +02:00
8246622: Remove CollectedHeap::print_gc_threads_on()
Reviewed-by: stefank, tschatzl, sjohanss
This commit is contained in:
parent
c66bef0289
commit
06e47d05b6
27 changed files with 31 additions and 127 deletions
|
@ -4736,6 +4736,22 @@ JavaThread *Threads::owning_thread_from_monitor_owner(ThreadsList * t_list,
|
|||
return the_owner;
|
||||
}
|
||||
|
||||
class PrintOnClosure : public ThreadClosure {
|
||||
private:
|
||||
outputStream* _st;
|
||||
|
||||
public:
|
||||
PrintOnClosure(outputStream* st) :
|
||||
_st(st) {}
|
||||
|
||||
virtual void do_thread(Thread* thread) {
|
||||
if (thread != NULL) {
|
||||
thread->print_on(_st);
|
||||
_st->cr();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// Threads::print_on() is called at safepoint by VM_PrintThreads operation.
|
||||
void Threads::print_on(outputStream* st, bool print_stacks,
|
||||
bool internal_format, bool print_concurrent_locks,
|
||||
|
@ -4778,14 +4794,10 @@ void Threads::print_on(outputStream* st, bool print_stacks,
|
|||
#endif // INCLUDE_SERVICES
|
||||
}
|
||||
|
||||
VMThread::vm_thread()->print_on(st);
|
||||
st->cr();
|
||||
Universe::heap()->print_gc_threads_on(st);
|
||||
WatcherThread* wt = WatcherThread::watcher_thread();
|
||||
if (wt != NULL) {
|
||||
wt->print_on(st);
|
||||
st->cr();
|
||||
}
|
||||
PrintOnClosure cl(st);
|
||||
cl.do_thread(VMThread::vm_thread());
|
||||
Universe::heap()->gc_threads_do(&cl);
|
||||
cl.do_thread(WatcherThread::watcher_thread());
|
||||
|
||||
st->flush();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue