Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8340408: Shenandoah: Remove redundant task stats printing code in ShenandoahTaskQueue #21077

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/hotspot/share/gc/shenandoah/shenandoahConcurrentMark.cpp
Original file line number Diff line number Diff line change
@@ -225,8 +225,7 @@ void ShenandoahConcurrentMark::finish_mark() {
assert(Thread::current()->is_VM_thread(), "Must by VM Thread");
finish_mark_work();
assert(task_queues()->is_empty(), "Should be empty");
TASKQUEUE_STATS_ONLY(task_queues()->print_taskqueue_stats());
TASKQUEUE_STATS_ONLY(task_queues()->reset_taskqueue_stats());
TASKQUEUE_STATS_ONLY(task_queues()->print_and_reset_taskqueue_stats(""));

ShenandoahHeap* const heap = ShenandoahHeap::heap();
heap->set_concurrent_mark_in_progress(false);
3 changes: 1 addition & 2 deletions src/hotspot/share/gc/shenandoah/shenandoahSTWMark.cpp
Original file line number Diff line number Diff line change
@@ -133,8 +133,7 @@ void ShenandoahSTWMark::mark() {
ShenandoahCodeRoots::disarm_nmethods();

assert(task_queues()->is_empty(), "Should be empty");
TASKQUEUE_STATS_ONLY(task_queues()->print_taskqueue_stats());
TASKQUEUE_STATS_ONLY(task_queues()->reset_taskqueue_stats());
TASKQUEUE_STATS_ONLY(task_queues()->print_and_reset_taskqueue_stats(""));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we pass "Mark" for the label here?

}

void ShenandoahSTWMark::mark_roots(uint worker_id) {
39 changes: 0 additions & 39 deletions src/hotspot/share/gc/shenandoah/shenandoahTaskqueue.cpp
Original file line number Diff line number Diff line change
@@ -51,45 +51,6 @@ bool ShenandoahObjToScanQueueSet::is_empty() {
return true;
}

#if TASKQUEUE_STATS
void ShenandoahObjToScanQueueSet::print_taskqueue_stats_hdr(outputStream* const st) {
st->print_raw_cr("GC Task Stats");
st->print_raw("thr "); TaskQueueStats::print_header(1, st); st->cr();
st->print_raw("--- "); TaskQueueStats::print_header(2, st); st->cr();
}

void ShenandoahObjToScanQueueSet::print_taskqueue_stats() const {
if (!log_develop_is_enabled(Trace, gc, task, stats)) {
return;
}
Log(gc, task, stats) log;
ResourceMark rm;
LogStream ls(log.trace());
outputStream* st = &ls;
print_taskqueue_stats_hdr(st);

ShenandoahObjToScanQueueSet* queues = const_cast<ShenandoahObjToScanQueueSet*>(this);
TaskQueueStats totals;
const uint n = size();
for (uint i = 0; i < n; ++i) {
st->print(UINT32_FORMAT_W(3), i);
queues->queue(i)->stats.print(st);
st->cr();
totals += queues->queue(i)->stats;
}
st->print("tot "); totals.print(st); st->cr();
DEBUG_ONLY(totals.verify());

}

void ShenandoahObjToScanQueueSet::reset_taskqueue_stats() {
const uint n = size();
for (uint i = 0; i < n; ++i) {
queue(i)->stats.reset();
}
}
#endif // TASKQUEUE_STATS

bool ShenandoahTerminatorTerminator::should_exit_termination() {
return _heap->cancelled_gc();
}
6 changes: 0 additions & 6 deletions src/hotspot/share/gc/shenandoah/shenandoahTaskqueue.hpp
Original file line number Diff line number Diff line change
@@ -354,12 +354,6 @@ class ShenandoahObjToScanQueueSet: public ParallelClaimableQueueSet<ShenandoahOb

bool is_empty();
void clear();

#if TASKQUEUE_STATS
static void print_taskqueue_stats_hdr(outputStream* const st);
void print_taskqueue_stats() const;
void reset_taskqueue_stats();
#endif // TASKQUEUE_STATS
};

class ShenandoahTerminatorTerminator : public TerminatorTerminator {