mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8240671: Shenandoah: refactor ShenandoahPhaseTimings
Reviewed-by: rkennke, zgu
This commit is contained in:
parent
c92adf4158
commit
d8bded6fb4
11 changed files with 202 additions and 540 deletions
|
@ -34,7 +34,6 @@
|
|||
#include "gc/shenandoah/shenandoahHeap.hpp"
|
||||
#include "gc/shenandoah/shenandoahPhaseTimings.hpp"
|
||||
#include "gc/shenandoah/shenandoahStringDedup.hpp"
|
||||
#include "gc/shenandoah/shenandoahTimingTracker.hpp"
|
||||
#include "gc/shenandoah/shenandoahVMOperations.hpp"
|
||||
#include "jfr/jfr.hpp"
|
||||
#include "memory/iterator.hpp"
|
||||
|
@ -49,8 +48,7 @@ ShenandoahSerialRoot::ShenandoahSerialRoot(ShenandoahSerialRoot::OopsDo oops_do,
|
|||
|
||||
void ShenandoahSerialRoot::oops_do(OopClosure* cl, uint worker_id) {
|
||||
if (_claimed.try_set()) {
|
||||
ShenandoahWorkerTimings* worker_times = ShenandoahHeap::heap()->phase_timings()->worker_times();
|
||||
ShenandoahWorkerTimingsTracker timer(worker_times, _phase, worker_id);
|
||||
ShenandoahWorkerTimingsTracker timer(_phase, worker_id);
|
||||
_oops_do(cl);
|
||||
}
|
||||
}
|
||||
|
@ -82,8 +80,7 @@ ShenandoahWeakSerialRoot::ShenandoahWeakSerialRoot(ShenandoahWeakSerialRoot::Wea
|
|||
|
||||
void ShenandoahWeakSerialRoot::weak_oops_do(BoolObjectClosure* is_alive, OopClosure* keep_alive, uint worker_id) {
|
||||
if (_claimed.try_set()) {
|
||||
ShenandoahWorkerTimings* worker_times = ShenandoahHeap::heap()->phase_timings()->worker_times();
|
||||
ShenandoahWorkerTimingsTracker timer(worker_times, _phase, worker_id);
|
||||
ShenandoahWorkerTimingsTracker timer(_phase, worker_id);
|
||||
_weak_oops_do(is_alive, keep_alive);
|
||||
}
|
||||
}
|
||||
|
@ -115,15 +112,13 @@ ShenandoahThreadRoots::ShenandoahThreadRoots(bool is_par) : _is_par(is_par) {
|
|||
}
|
||||
|
||||
void ShenandoahThreadRoots::oops_do(OopClosure* oops_cl, CodeBlobClosure* code_cl, uint worker_id) {
|
||||
ShenandoahWorkerTimings* worker_times = ShenandoahHeap::heap()->phase_timings()->worker_times();
|
||||
ShenandoahWorkerTimingsTracker timer(worker_times, ShenandoahPhaseTimings::ThreadRoots, worker_id);
|
||||
ShenandoahWorkerTimingsTracker timer(ShenandoahPhaseTimings::ThreadRoots, worker_id);
|
||||
ResourceMark rm;
|
||||
Threads::possibly_parallel_oops_do(_is_par, oops_cl, code_cl);
|
||||
}
|
||||
|
||||
void ShenandoahThreadRoots::threads_do(ThreadClosure* tc, uint worker_id) {
|
||||
ShenandoahWorkerTimings* worker_times = ShenandoahHeap::heap()->phase_timings()->worker_times();
|
||||
ShenandoahWorkerTimingsTracker timer(worker_times, ShenandoahPhaseTimings::ThreadRoots, worker_id);
|
||||
ShenandoahWorkerTimingsTracker timer(ShenandoahPhaseTimings::ThreadRoots, worker_id);
|
||||
ResourceMark rm;
|
||||
Threads::possibly_parallel_threads_do(_is_par, tc);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue