Skip to content
Permalink
Browse files

8244243: Shenandoah: Cleanup Shenandoah phase timing tracking and JFR…

… event supporting

Reviewed-by: shade
  • Loading branch information
zhengyu123 committed May 7, 2020
1 parent 61864c2 commit 88722a82ed2c1d7495ff4f49286782db8b47d8c1
@@ -194,6 +194,7 @@ class ShenandoahDisarmNMethodsTask : public AbstractGangTask {
ShenandoahDisarmNMethodsTask() :
AbstractGangTask("ShenandoahDisarmNMethodsTask"),
_iterator(ShenandoahCodeRoots::table()) {
assert(SafepointSynchronize::is_at_safepoint(), "Only at a safepoint");
MutexLocker mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
_iterator.nmethods_do_begin();
}
@@ -204,6 +205,7 @@ class ShenandoahDisarmNMethodsTask : public AbstractGangTask {
}

virtual void work(uint worker_id) {
ShenandoahParallelWorkerSession worker_session(worker_id);
_iterator.nmethods_do(&_cl);
}
};
@@ -351,6 +351,7 @@ class ShenandoahUpdateThreadRootsTask : public AbstractGangTask {
_worker_phase(phase) {}

void work(uint worker_id) {
ShenandoahParallelWorkerSession worker_session(worker_id);
ShenandoahUpdateRefsClosure cl;
_thread_roots.oops_do(&cl, NULL, worker_id);
}
@@ -588,6 +589,7 @@ class ShenandoahRefProcTaskProxy : public AbstractGangTask {
HandleMark hm;
assert(ShenandoahSafepoint::is_at_shenandoah_safepoint(), "Must be at a safepoint");
ShenandoahHeap* heap = ShenandoahHeap::heap();
ShenandoahParallelWorkerSession worker_session(worker_id);
ShenandoahCMDrainMarkingStackClosure complete_gc(worker_id, _terminator);
if (heap->has_forwarded_objects()) {
ShenandoahForwardedIsAliveClosure is_alive;
@@ -682,7 +684,11 @@ void ShenandoahConcurrentMark::weak_refs_work_doit(bool full_gc) {
ReferenceProcessorPhaseTimes pt(_heap->gc_timer(), rp->num_queues());

{
ShenandoahGCPhase phase(phase_process);
// Note: Don't emit JFR event for this phase, to avoid overflow nesting phase level.
// Reference Processor emits 2 levels JFR event, that can get us over the JFR
// event nesting level limits, in case of degenerated GC gets upgraded to
// full GC.
ShenandoahTimingsTracker phase_timing(phase_process);

if (_heap->has_forwarded_objects()) {
ShenandoahCMKeepAliveUpdateClosure keep_alive(get_queue(serial_worker_id));

0 comments on commit 88722a8

Please sign in to comment.
You can’t perform that action at this time.