8246622: Remove CollectedHeap::print_gc_threads_on()
Reviewed-by: stefank, tschatzl, sjohanss
This commit is contained in:
parent
c66bef0289
commit
06e47d05b6
@ -117,7 +117,6 @@ public:
|
||||
bool block_is_obj(const HeapWord* addr) const { return false; }
|
||||
|
||||
// No GC threads
|
||||
virtual void print_gc_threads_on(outputStream* st) const {}
|
||||
virtual void gc_threads_do(ThreadClosure* tc) const {}
|
||||
|
||||
// No nmethod handling
|
||||
|
@ -2567,18 +2567,6 @@ void G1CollectedHeap::print_on_error(outputStream* st) const {
|
||||
}
|
||||
}
|
||||
|
||||
void G1CollectedHeap::print_gc_threads_on(outputStream* st) const {
|
||||
workers()->print_worker_threads_on(st);
|
||||
_cm_thread->print_on(st);
|
||||
st->cr();
|
||||
_cm->print_worker_threads_on(st);
|
||||
_cr->print_threads_on(st);
|
||||
_young_gen_sampling_thread->print_on(st);
|
||||
if (G1StringDedup::is_enabled()) {
|
||||
G1StringDedup::print_worker_threads_on(st);
|
||||
}
|
||||
}
|
||||
|
||||
void G1CollectedHeap::gc_threads_do(ThreadClosure* tc) const {
|
||||
workers()->threads_do(tc);
|
||||
tc->do_thread(_cm_thread);
|
||||
|
@ -1454,7 +1454,6 @@ public:
|
||||
virtual void print_extended_on(outputStream* st) const;
|
||||
virtual void print_on_error(outputStream* st) const;
|
||||
|
||||
virtual void print_gc_threads_on(outputStream* st) const;
|
||||
virtual void gc_threads_do(ThreadClosure* tc) const;
|
||||
|
||||
// Override
|
||||
|
@ -2026,10 +2026,6 @@ void G1ConcurrentMark::print_summary_info() {
|
||||
cm_thread()->vtime_accum(), cm_thread()->vtime_mark_accum());
|
||||
}
|
||||
|
||||
void G1ConcurrentMark::print_worker_threads_on(outputStream* st) const {
|
||||
_concurrent_workers->print_worker_threads_on(st);
|
||||
}
|
||||
|
||||
void G1ConcurrentMark::threads_do(ThreadClosure* tc) const {
|
||||
_concurrent_workers->threads_do(tc);
|
||||
}
|
||||
|
@ -583,7 +583,6 @@ public:
|
||||
|
||||
void print_summary_info();
|
||||
|
||||
void print_worker_threads_on(outputStream* st) const;
|
||||
void threads_do(ThreadClosure* tc) const;
|
||||
|
||||
void print_on_error(outputStream* st) const;
|
||||
|
@ -114,15 +114,6 @@ void G1ConcurrentRefineThreadControl::maybe_activate_next(uint cur_worker_id) {
|
||||
}
|
||||
}
|
||||
|
||||
void G1ConcurrentRefineThreadControl::print_on(outputStream* st) const {
|
||||
for (uint i = 0; i < _num_max_threads; ++i) {
|
||||
if (_threads[i] != NULL) {
|
||||
_threads[i]->print_on(st);
|
||||
st->cr();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void G1ConcurrentRefineThreadControl::worker_threads_do(ThreadClosure* tc) {
|
||||
for (uint i = 0; i < _num_max_threads; i++) {
|
||||
if (_threads[i] != NULL) {
|
||||
@ -318,10 +309,6 @@ uint G1ConcurrentRefine::max_num_threads() {
|
||||
return G1ConcRefinementThreads;
|
||||
}
|
||||
|
||||
void G1ConcurrentRefine::print_threads_on(outputStream* st) const {
|
||||
_thread_control.print_on(st);
|
||||
}
|
||||
|
||||
static size_t calc_new_green_zone(size_t green,
|
||||
double logged_cards_scan_time,
|
||||
size_t processed_logged_cards,
|
||||
|
@ -57,7 +57,6 @@ public:
|
||||
// activate it.
|
||||
void maybe_activate_next(uint cur_worker_id);
|
||||
|
||||
void print_on(outputStream* st) const;
|
||||
void worker_threads_do(ThreadClosure* tc);
|
||||
void stop();
|
||||
};
|
||||
@ -139,8 +138,6 @@ public:
|
||||
// Maximum number of refinement threads.
|
||||
static uint max_num_threads();
|
||||
|
||||
void print_threads_on(outputStream* st) const;
|
||||
|
||||
// Cards in the dirty card queue set.
|
||||
size_t green_zone() const { return _green_zone; }
|
||||
size_t yellow_zone() const { return _yellow_zone; }
|
||||
|
@ -615,10 +615,6 @@ void ParallelScavengeHeap::gc_threads_do(ThreadClosure* tc) const {
|
||||
ParallelScavengeHeap::heap()->workers().threads_do(tc);
|
||||
}
|
||||
|
||||
void ParallelScavengeHeap::print_gc_threads_on(outputStream* st) const {
|
||||
ParallelScavengeHeap::heap()->workers().print_worker_threads_on(st);
|
||||
}
|
||||
|
||||
void ParallelScavengeHeap::print_tracing_info() const {
|
||||
AdaptiveSizePolicyOutput::print();
|
||||
log_debug(gc, heap, exit)("Accumulated young generation GC time %3.7f secs", PSScavenge::accumulated_time()->seconds());
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2001, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2001, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -217,7 +217,6 @@ class ParallelScavengeHeap : public CollectedHeap {
|
||||
PSHeapSummary create_ps_heap_summary();
|
||||
virtual void print_on(outputStream* st) const;
|
||||
virtual void print_on_error(outputStream* st) const;
|
||||
virtual void print_gc_threads_on(outputStream* st) const;
|
||||
virtual void gc_threads_do(ThreadClosure* tc) const;
|
||||
virtual void print_tracing_info() const;
|
||||
|
||||
|
@ -429,13 +429,6 @@ class CollectedHeap : public CHeapObj<mtInternal> {
|
||||
// Used to print information about locations in the hs_err file.
|
||||
virtual bool print_location(outputStream* st, void* addr) const = 0;
|
||||
|
||||
// Print all GC threads (other than the VM thread)
|
||||
// used by this heap.
|
||||
virtual void print_gc_threads_on(outputStream* st) const = 0;
|
||||
// The default behavior is to call print_gc_threads_on() on tty.
|
||||
void print_gc_threads() {
|
||||
print_gc_threads_on(tty);
|
||||
}
|
||||
// Iterator for all GC threads (other than VM thread)
|
||||
virtual void gc_threads_do(ThreadClosure* tc) const = 0;
|
||||
|
||||
|
@ -1237,9 +1237,6 @@ void GenCollectedHeap::print_on(outputStream* st) const {
|
||||
void GenCollectedHeap::gc_threads_do(ThreadClosure* tc) const {
|
||||
}
|
||||
|
||||
void GenCollectedHeap::print_gc_threads_on(outputStream* st) const {
|
||||
}
|
||||
|
||||
bool GenCollectedHeap::print_location(outputStream* st, void* addr) const {
|
||||
return BlockLocationPrinter<GenCollectedHeap>::print_location(st, addr);
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -331,7 +331,6 @@ public:
|
||||
|
||||
// Override.
|
||||
virtual void print_on(outputStream* st) const;
|
||||
virtual void print_gc_threads_on(outputStream* st) const;
|
||||
virtual void gc_threads_do(ThreadClosure* tc) const;
|
||||
virtual void print_tracing_info() const;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -65,12 +65,6 @@ void StringDedup::threads_do(ThreadClosure* tc) {
|
||||
tc->do_thread(StringDedupThread::thread());
|
||||
}
|
||||
|
||||
void StringDedup::print_worker_threads_on(outputStream* st) {
|
||||
assert(is_enabled(), "String deduplication not enabled");
|
||||
StringDedupThread::thread()->print_on(st);
|
||||
st->cr();
|
||||
}
|
||||
|
||||
void StringDedup::verify() {
|
||||
assert(is_enabled(), "String deduplication not enabled");
|
||||
StringDedupQueue::verify();
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -95,7 +95,7 @@ public:
|
||||
static void parallel_unlink(StringDedupUnlinkOrOopsDoClosure* unlink, uint worker_id);
|
||||
|
||||
static void threads_do(ThreadClosure* tc);
|
||||
static void print_worker_threads_on(outputStream* st);
|
||||
|
||||
static void verify();
|
||||
|
||||
// GC support
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2001, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2001, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -86,14 +86,6 @@ AbstractGangWorker* AbstractWorkGang::worker(uint i) const {
|
||||
return result;
|
||||
}
|
||||
|
||||
void AbstractWorkGang::print_worker_threads_on(outputStream* st) const {
|
||||
uint workers = created_workers();
|
||||
for (uint i = 0; i < workers; i++) {
|
||||
worker(i)->print_on(st);
|
||||
st->cr();
|
||||
}
|
||||
}
|
||||
|
||||
void AbstractWorkGang::threads_do(ThreadClosure* tc) const {
|
||||
assert(tc != NULL, "Null ThreadClosure");
|
||||
uint workers = created_workers();
|
||||
|
@ -188,12 +188,6 @@ class AbstractWorkGang : public CHeapObj<mtInternal> {
|
||||
// Debugging.
|
||||
const char* name() const { return _name; }
|
||||
|
||||
// Printing
|
||||
void print_worker_threads_on(outputStream *st) const;
|
||||
void print_worker_threads() const {
|
||||
print_worker_threads_on(tty);
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual AbstractGangWorker* allocate_worker(uint which) = 0;
|
||||
};
|
||||
|
@ -1178,13 +1178,6 @@ void ShenandoahHeap::prepare_for_verify() {
|
||||
}
|
||||
}
|
||||
|
||||
void ShenandoahHeap::print_gc_threads_on(outputStream* st) const {
|
||||
workers()->print_worker_threads_on(st);
|
||||
if (ShenandoahStringDedup::is_enabled()) {
|
||||
ShenandoahStringDedup::print_worker_threads_on(st);
|
||||
}
|
||||
}
|
||||
|
||||
void ShenandoahHeap::gc_threads_do(ThreadClosure* tcl) const {
|
||||
workers()->threads_do(tcl);
|
||||
if (_safepoint_workers != NULL) {
|
||||
|
@ -160,7 +160,6 @@ public:
|
||||
void print_on(outputStream* st) const;
|
||||
void print_extended_on(outputStream *st) const;
|
||||
void print_tracing_info() const;
|
||||
void print_gc_threads_on(outputStream* st) const;
|
||||
void print_heap_regions_on(outputStream* st) const;
|
||||
|
||||
void stop();
|
||||
|
@ -329,19 +329,6 @@ void ZCollectedHeap::print_extended_on(outputStream* st) const {
|
||||
_heap.print_extended_on(st);
|
||||
}
|
||||
|
||||
void ZCollectedHeap::print_gc_threads_on(outputStream* st) const {
|
||||
_director->print_on(st);
|
||||
st->cr();
|
||||
_driver->print_on(st);
|
||||
st->cr();
|
||||
_uncommitter->print_on(st);
|
||||
st->cr();
|
||||
_stat->print_on(st);
|
||||
st->cr();
|
||||
_heap.print_worker_threads_on(st);
|
||||
_runtime_workers.print_threads_on(st);
|
||||
}
|
||||
|
||||
void ZCollectedHeap::print_tracing_info() const {
|
||||
// Does nothing
|
||||
}
|
||||
|
@ -120,7 +120,6 @@ public:
|
||||
virtual void print_on(outputStream* st) const;
|
||||
virtual void print_on_error(outputStream* st) const;
|
||||
virtual void print_extended_on(outputStream* st) const;
|
||||
virtual void print_gc_threads_on(outputStream* st) const;
|
||||
virtual void print_tracing_info() const;
|
||||
virtual bool print_location(outputStream* st, void* addr) const;
|
||||
|
||||
|
@ -202,10 +202,6 @@ void ZHeap::worker_threads_do(ThreadClosure* tc) const {
|
||||
_workers.threads_do(tc);
|
||||
}
|
||||
|
||||
void ZHeap::print_worker_threads_on(outputStream* st) const {
|
||||
_workers.print_threads_on(st);
|
||||
}
|
||||
|
||||
void ZHeap::out_of_memory() {
|
||||
ResourceMark rm;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -104,7 +104,6 @@ public:
|
||||
uint nconcurrent_no_boost_worker_threads() const;
|
||||
void set_boost_worker_threads(bool boost);
|
||||
void worker_threads_do(ThreadClosure* tc) const;
|
||||
void print_worker_threads_on(outputStream* st) const;
|
||||
|
||||
// Reference processing
|
||||
ReferenceDiscoverer* reference_discoverer();
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -94,7 +94,3 @@ WorkGang* ZRuntimeWorkers::workers() {
|
||||
void ZRuntimeWorkers::threads_do(ThreadClosure* tc) const {
|
||||
_workers.threads_do(tc);
|
||||
}
|
||||
|
||||
void ZRuntimeWorkers::print_threads_on(outputStream* st) const {
|
||||
_workers.print_worker_threads_on(st);
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -40,7 +40,6 @@ public:
|
||||
WorkGang* workers();
|
||||
|
||||
void threads_do(ThreadClosure* tc) const;
|
||||
void print_threads_on(outputStream* st) const;
|
||||
};
|
||||
|
||||
#endif // SHARE_GC_Z_ZRUNTIMEWORKERS_HPP
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -111,7 +111,3 @@ void ZWorkers::run_concurrent(ZTask* task) {
|
||||
void ZWorkers::threads_do(ThreadClosure* tc) const {
|
||||
_workers.threads_do(tc);
|
||||
}
|
||||
|
||||
void ZWorkers::print_threads_on(outputStream* st) const {
|
||||
_workers.print_worker_threads_on(st);
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -52,7 +52,6 @@ public:
|
||||
void run_concurrent(ZTask* task);
|
||||
|
||||
void threads_do(ThreadClosure* tc) const;
|
||||
void print_threads_on(outputStream* st) const;
|
||||
};
|
||||
|
||||
#endif // SHARE_GC_Z_ZWORKERS_HPP
|
||||
|
@ -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…
Reference in New Issue
Block a user