< prev index next > src/hotspot/share/gc/shenandoah/shenandoahTaskqueue.cpp
Print this page
}
}
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();
}
< prev index next >