src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp
changeset 54882 b99e97bc5040
parent 54786 ebf733a324d4
child 54890 f2f11d7f7f4e
--- a/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp	Wed May 15 14:30:22 2019 +0200
+++ b/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp	Wed May 15 08:58:23 2019 -0400
@@ -2145,6 +2145,9 @@
   retire_and_reset_gclabs();
 
   if (ShenandoahVerify) {
+    if (!is_degenerated_gc_in_progress()) {
+      verifier()->verify_roots_no_forwarded_except(ShenandoahRootVerifier::ThreadRoots);
+    }
     verifier()->verify_before_updaterefs();
   }
 
@@ -2182,6 +2185,10 @@
   }
   assert(!cancelled_gc(), "Should have been done right before");
 
+  if (ShenandoahVerify && !is_degenerated_gc_in_progress()) {
+    verifier()->verify_roots_no_forwarded_except(ShenandoahRootVerifier::ThreadRoots);
+  }
+
   concurrent_mark()->update_roots(is_degenerated_gc_in_progress() ?
                                   ShenandoahPhaseTimings::degen_gc_update_roots:
                                   ShenandoahPhaseTimings::final_update_refs_roots);