< prev index next >
src/hotspot/share/gc/shenandoah/shenandoahConcurrentMark.cpp
Print this page
rev 59188 : 8244243: Shenandoah: Cleanup Shenandoah phase timing tracking and JFR event supporting
@@ -349,10 +349,11 @@
_thread_roots(phase, is_par),
_phase(phase),
_worker_phase(phase) {}
void work(uint worker_id) {
+ ShenandoahParallelWorkerSession worker_session(worker_id);
ShenandoahUpdateRefsClosure cl;
_thread_roots.oops_do(&cl, NULL, worker_id);
}
};
@@ -586,10 +587,11 @@
void work(uint worker_id) {
ResourceMark rm;
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;
ShenandoahCMKeepAliveUpdateClosure keep_alive(heap->concurrent_mark()->get_queue(worker_id));
_proc_task.work(worker_id, is_alive, keep_alive, complete_gc);
@@ -680,11 +682,15 @@
ShenandoahRefProcTaskExecutor executor(workers);
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));
const ReferenceProcessorStats& stats =
rp->process_discovered_references(is_alive.is_alive_closure(), &keep_alive,
< prev index next >