Skip to content
Permalink
Browse files

8246622: Remove CollectedHeap::print_gc_threads_on()

Reviewed-by: stefank, tschatzl, sjohanss
  • Loading branch information
pliden committed Jun 5, 2020
1 parent c66bef0 commit 06e47d05b646b99894cc57a1a26e295d1dbabe8d
Showing with 31 additions and 127 deletions.
  1. +0 −1 src/hotspot/share/gc/epsilon/epsilonHeap.hpp
  2. +0 −12 src/hotspot/share/gc/g1/g1CollectedHeap.cpp
  3. +0 −1 src/hotspot/share/gc/g1/g1CollectedHeap.hpp
  4. +0 −4 src/hotspot/share/gc/g1/g1ConcurrentMark.cpp
  5. +0 −1 src/hotspot/share/gc/g1/g1ConcurrentMark.hpp
  6. +0 −13 src/hotspot/share/gc/g1/g1ConcurrentRefine.cpp
  7. +0 −3 src/hotspot/share/gc/g1/g1ConcurrentRefine.hpp
  8. +0 −4 src/hotspot/share/gc/parallel/parallelScavengeHeap.cpp
  9. +1 −2 src/hotspot/share/gc/parallel/parallelScavengeHeap.hpp
  10. +0 −7 src/hotspot/share/gc/shared/collectedHeap.hpp
  11. +0 −3 src/hotspot/share/gc/shared/genCollectedHeap.cpp
  12. +1 −2 src/hotspot/share/gc/shared/genCollectedHeap.hpp
  13. +1 −7 src/hotspot/share/gc/shared/stringdedup/stringDedup.cpp
  14. +2 −2 src/hotspot/share/gc/shared/stringdedup/stringDedup.hpp
  15. +1 −9 src/hotspot/share/gc/shared/workgroup.cpp
  16. +0 −6 src/hotspot/share/gc/shared/workgroup.hpp
  17. +0 −7 src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp
  18. +0 −1 src/hotspot/share/gc/shenandoah/shenandoahHeap.hpp
  19. +0 −13 src/hotspot/share/gc/z/zCollectedHeap.cpp
  20. +0 −1 src/hotspot/share/gc/z/zCollectedHeap.hpp
  21. +0 −4 src/hotspot/share/gc/z/zHeap.cpp
  22. +1 −2 src/hotspot/share/gc/z/zHeap.hpp
  23. +1 −5 src/hotspot/share/gc/z/zRuntimeWorkers.cpp
  24. +1 −2 src/hotspot/share/gc/z/zRuntimeWorkers.hpp
  25. +1 −5 src/hotspot/share/gc/z/zWorkers.cpp
  26. +1 −2 src/hotspot/share/gc/z/zWorkers.hpp
  27. +20 −8 src/hotspot/share/runtime/thread.cpp
@@ -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
@@ -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 @@ 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
@@ -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 @@ 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;
@@ -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 @@ 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();
};
@@ -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; }
@@ -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 @@ 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;

@@ -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 @@ 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
@@ -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 @@ 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();
@@ -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 @@ 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;

@@ -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 @@ 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();
@@ -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 @@ class ZRuntimeWorkers {
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 @@ 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.
You can’t perform that action at this time.