8243495: Shenandoah: print root statistics for concurrent weak/strong root phases
Reviewed-by: rkennke
This commit is contained in:
parent
38e6f3665c
commit
7f877f6384
@ -2882,6 +2882,7 @@ void ShenandoahHeap::entry_weak_roots() {
|
||||
EventMark em("%s", msg);
|
||||
|
||||
ShenandoahGCPhase phase(ShenandoahPhaseTimings::conc_weak_roots);
|
||||
ShenandoahGCWorkerPhase worker_phase(ShenandoahPhaseTimings::conc_weak_roots);
|
||||
|
||||
ShenandoahWorkerScope scope(workers(),
|
||||
ShenandoahWorkerPolicy::calc_workers_for_conc_root_processing(),
|
||||
@ -2912,6 +2913,7 @@ void ShenandoahHeap::entry_strong_roots() {
|
||||
EventMark em("%s", msg);
|
||||
|
||||
ShenandoahGCPhase phase(ShenandoahPhaseTimings::conc_strong_roots);
|
||||
ShenandoahGCWorkerPhase worker_phase(ShenandoahPhaseTimings::conc_strong_roots);
|
||||
|
||||
ShenandoahWorkerScope scope(workers(),
|
||||
ShenandoahWorkerPolicy::calc_workers_for_conc_root_processing(),
|
||||
|
@ -107,6 +107,8 @@ bool ShenandoahPhaseTimings::is_worker_phase(Phase phase) {
|
||||
case purge_class_unload:
|
||||
case purge_weak_par:
|
||||
case heap_iteration_roots:
|
||||
case conc_weak_roots:
|
||||
case conc_strong_roots:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
|
@ -91,9 +91,11 @@ class outputStream;
|
||||
SHENANDOAH_PAR_PHASE_DO(evac_, " E: ", f) \
|
||||
\
|
||||
f(conc_weak_roots, "Concurrent Weak Roots") \
|
||||
SHENANDOAH_PAR_PHASE_DO(conc_weak_roots_, " CWR: ", f) \
|
||||
f(conc_cleanup_early, "Concurrent Cleanup") \
|
||||
f(conc_class_unloading, "Concurrent Class Unloading") \
|
||||
f(conc_strong_roots, "Concurrent Strong Roots") \
|
||||
SHENANDOAH_PAR_PHASE_DO(conc_strong_roots_, " CSR: ", f) \
|
||||
f(conc_evac, "Concurrent Evacuation") \
|
||||
\
|
||||
f(init_update_refs_gross, "Pause Init Update Refs (G)") \
|
||||
|
@ -48,12 +48,8 @@ inline ShenandoahVMRoot<CONCURRENT>::ShenandoahVMRoot(OopStorage* storage,
|
||||
template <bool CONCURRENT>
|
||||
template <typename Closure>
|
||||
inline void ShenandoahVMRoot<CONCURRENT>::oops_do(Closure* cl, uint worker_id) {
|
||||
if (CONCURRENT) {
|
||||
_itr.oops_do(cl);
|
||||
} else {
|
||||
ShenandoahWorkerTimingsTracker timer(_phase, _par_phase, worker_id);
|
||||
_itr.oops_do(cl);
|
||||
}
|
||||
ShenandoahWorkerTimingsTracker timer(_phase, _par_phase, worker_id);
|
||||
_itr.oops_do(cl);
|
||||
}
|
||||
|
||||
template <bool CONCURRENT>
|
||||
@ -149,11 +145,9 @@ void ShenandoahClassLoaderDataRoots<CONCURRENT, SINGLE_THREADED>::always_strong_
|
||||
assert(SafepointSynchronize::is_at_safepoint(), "Must be at a safepoint");
|
||||
assert(Thread::current()->is_VM_thread(), "Single threaded CLDG iteration can only be done by VM thread");
|
||||
ClassLoaderDataGraph::always_strong_cld_do(clds);
|
||||
} else if (CONCURRENT) {
|
||||
ClassLoaderDataGraph::always_strong_cld_do(clds);
|
||||
} else {
|
||||
ShenandoahWorkerTimingsTracker timer(_phase, ShenandoahPhaseTimings::CLDGRoots, worker_id);
|
||||
ClassLoaderDataGraph::always_strong_cld_do(clds);
|
||||
ShenandoahWorkerTimingsTracker timer(_phase, ShenandoahPhaseTimings::CLDGRoots, worker_id);
|
||||
ClassLoaderDataGraph::always_strong_cld_do(clds);
|
||||
}
|
||||
}
|
||||
|
||||
@ -163,9 +157,7 @@ void ShenandoahClassLoaderDataRoots<CONCURRENT, SINGLE_THREADED>::cld_do(CLDClos
|
||||
assert(SafepointSynchronize::is_at_safepoint(), "Must be at a safepoint");
|
||||
assert(Thread::current()->is_VM_thread(), "Single threaded CLDG iteration can only be done by VM thread");
|
||||
ClassLoaderDataGraph::cld_do(clds);
|
||||
} else if (CONCURRENT) {
|
||||
ClassLoaderDataGraph::cld_do(clds);
|
||||
} else {
|
||||
} else {
|
||||
ShenandoahWorkerTimingsTracker timer(_phase, ShenandoahPhaseTimings::CLDGRoots, worker_id);
|
||||
ClassLoaderDataGraph::cld_do(clds);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user