Skip to content

Commit

Permalink
8246622: Remove CollectedHeap::print_gc_threads_on()
Browse files Browse the repository at this point in the history
Reviewed-by: stefank, tschatzl, sjohanss
  • Loading branch information
pliden committed Jun 5, 2020
1 parent c66bef0 commit 06e47d0
Show file tree
Hide file tree
Showing 27 changed files with 31 additions and 127 deletions.
1 change: 0 additions & 1 deletion src/hotspot/share/gc/epsilon/epsilonHeap.hpp
Expand Up @@ -117,7 +117,6 @@ class EpsilonHeap : public CollectedHeap {
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
Expand Down
12 changes: 0 additions & 12 deletions src/hotspot/share/gc/g1/g1CollectedHeap.cpp
Expand Up @@ -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);
Expand Down
1 change: 0 additions & 1 deletion src/hotspot/share/gc/g1/g1CollectedHeap.hpp
Expand Up @@ -1454,7 +1454,6 @@ class G1CollectedHeap : public CollectedHeap {
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
Expand Down
4 changes: 0 additions & 4 deletions src/hotspot/share/gc/g1/g1ConcurrentMark.cpp
Expand Up @@ -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);
}
Expand Down
1 change: 0 additions & 1 deletion src/hotspot/share/gc/g1/g1ConcurrentMark.hpp
Expand Up @@ -583,7 +583,6 @@ class G1ConcurrentMark : public CHeapObj<mtGC> {

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;
Expand Down
13 changes: 0 additions & 13 deletions src/hotspot/share/gc/g1/g1ConcurrentRefine.cpp
Expand Up @@ -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) {
Expand Down Expand Up @@ -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,
Expand Down
3 changes: 0 additions & 3 deletions src/hotspot/share/gc/g1/g1ConcurrentRefine.hpp
Expand Up @@ -57,7 +57,6 @@ class G1ConcurrentRefineThreadControl {
// activate it.
void maybe_activate_next(uint cur_worker_id);

void print_on(outputStream* st) const;
void worker_threads_do(ThreadClosure* tc);
void stop();
};
Expand Down Expand Up @@ -139,8 +138,6 @@ class G1ConcurrentRefine : public CHeapObj<mtGC> {
// 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; }
Expand Down
4 changes: 0 additions & 4 deletions src/hotspot/share/gc/parallel/parallelScavengeHeap.cpp
Expand Up @@ -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());
Expand Down
3 changes: 1 addition & 2 deletions src/hotspot/share/gc/parallel/parallelScavengeHeap.hpp
@@ -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
Expand Down Expand Up @@ -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;

Expand Down
7 changes: 0 additions & 7 deletions src/hotspot/share/gc/shared/collectedHeap.hpp
Expand Up @@ -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;

Expand Down
3 changes: 0 additions & 3 deletions src/hotspot/share/gc/shared/genCollectedHeap.cpp
Expand Up @@ -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);
}
Expand Down
3 changes: 1 addition & 2 deletions src/hotspot/share/gc/shared/genCollectedHeap.hpp
@@ -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
Expand Down Expand Up @@ -331,7 +331,6 @@ class GenCollectedHeap : public CollectedHeap {

// 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;

Expand Down
8 changes: 1 addition & 7 deletions src/hotspot/share/gc/shared/stringdedup/stringDedup.cpp
@@ -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
Expand Down Expand Up @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions src/hotspot/share/gc/shared/stringdedup/stringDedup.hpp
@@ -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
Expand Down Expand Up @@ -95,7 +95,7 @@ class StringDedup : public AllStatic {
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
Expand Down
10 changes: 1 addition & 9 deletions src/hotspot/share/gc/shared/workgroup.cpp
@@ -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
Expand Down Expand Up @@ -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();
Expand Down
6 changes: 0 additions & 6 deletions src/hotspot/share/gc/shared/workgroup.hpp
Expand Up @@ -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;
};
Expand Down
7 changes: 0 additions & 7 deletions src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp
Expand Up @@ -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) {
Expand Down
1 change: 0 additions & 1 deletion src/hotspot/share/gc/shenandoah/shenandoahHeap.hpp
Expand Up @@ -160,7 +160,6 @@ class ShenandoahHeap : public CollectedHeap {
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();
Expand Down
13 changes: 0 additions & 13 deletions src/hotspot/share/gc/z/zCollectedHeap.cpp
Expand Up @@ -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
}
Expand Down
1 change: 0 additions & 1 deletion src/hotspot/share/gc/z/zCollectedHeap.hpp
Expand Up @@ -120,7 +120,6 @@ class ZCollectedHeap : public CollectedHeap {
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;

Expand Down
4 changes: 0 additions & 4 deletions src/hotspot/share/gc/z/zHeap.cpp
Expand Up @@ -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;

Expand Down
3 changes: 1 addition & 2 deletions src/hotspot/share/gc/z/zHeap.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
Expand Down Expand Up @@ -104,7 +104,6 @@ class ZHeap {
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();
Expand Down
6 changes: 1 addition & 5 deletions src/hotspot/share/gc/z/zRuntimeWorkers.cpp
@@ -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
Expand Down Expand Up @@ -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);
}
3 changes: 1 addition & 2 deletions src/hotspot/share/gc/z/zRuntimeWorkers.hpp
@@ -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
Expand Down Expand Up @@ -40,7 +40,6 @@ class ZRuntimeWorkers {
WorkGang* workers();

void threads_do(ThreadClosure* tc) const;
void print_threads_on(outputStream* st) const;
};

#endif // SHARE_GC_Z_ZRUNTIMEWORKERS_HPP
6 changes: 1 addition & 5 deletions src/hotspot/share/gc/z/zWorkers.cpp
@@ -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
Expand Down Expand Up @@ -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);
}
3 changes: 1 addition & 2 deletions src/hotspot/share/gc/z/zWorkers.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
Expand Down Expand Up @@ -52,7 +52,6 @@ class ZWorkers {
void run_concurrent(ZTask* task);

void threads_do(ThreadClosure* tc) const;
void print_threads_on(outputStream* st) const;
};

#endif // SHARE_GC_Z_ZWORKERS_HPP

0 comments on commit 06e47d0

Please sign in to comment.