src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp
changeset 54981 0b56fc0448ec
parent 54956 43340a79840d
child 55076 785a12e0f89b
--- a/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp	Wed May 22 13:19:04 2019 +0200
+++ b/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp	Wed May 22 07:12:18 2019 -0400
@@ -1505,10 +1505,14 @@
   if (!cancelled_gc()) {
     concurrent_mark()->finish_mark_from_roots(/* full_gc = */ false);
 
-    // Degen may be caused by failed evacuation of roots
-    if (is_degenerated_gc_in_progress() && has_forwarded_objects()) {
-      concurrent_mark()->update_roots(ShenandoahPhaseTimings::degen_gc_update_roots);
-    }
+    if (has_forwarded_objects()) {
+      // Degen may be caused by failed evacuation of roots
+      if (is_degenerated_gc_in_progress()) {
+        concurrent_mark()->update_roots(ShenandoahPhaseTimings::degen_gc_update_roots);
+      } else {
+        concurrent_mark()->update_thread_roots(ShenandoahPhaseTimings::update_roots);
+      }
+   }
 
     if (ShenandoahVerify) {
       verifier()->verify_roots_no_forwarded();