8232205: Shenandoah: missing "Update References" -> "Update Roots" tracing
authorshade
Tue, 15 Oct 2019 19:38:59 +0200
changeset 58604 791217cdc433
parent 58603 2312d1a04c49
child 58605 10db6989907f
8232205: Shenandoah: missing "Update References" -> "Update Roots" tracing Reviewed-by: rkennke, zgu
src/hotspot/share/gc/shenandoah/shenandoahConcurrentMark.cpp
--- a/src/hotspot/share/gc/shenandoah/shenandoahConcurrentMark.cpp	Tue Oct 15 09:25:59 2019 -0700
+++ b/src/hotspot/share/gc/shenandoah/shenandoahConcurrentMark.cpp	Tue Oct 15 19:38:59 2019 +0200
@@ -319,13 +319,20 @@
 };
 
 void ShenandoahConcurrentMark::update_thread_roots(ShenandoahPhaseTimings::Phase root_phase) {
-  WorkGang* workers = _heap->workers();
-  bool is_par = workers->active_workers() > 1;
+  assert(ShenandoahSafepoint::is_at_shenandoah_safepoint(), "Must be at a safepoint");
+
+  ShenandoahGCPhase phase(root_phase);
+
 #if COMPILER2_OR_JVMCI
   DerivedPointerTable::clear();
 #endif
+
+  WorkGang* workers = _heap->workers();
+  bool is_par = workers->active_workers() > 1;
+
   ShenandoahUpdateThreadRootsTask task(is_par, root_phase);
   workers->run_task(&task);
+
 #if COMPILER2_OR_JVMCI
   DerivedPointerTable::update_pointers();
 #endif