< prev index next >

src/share/vm/gc/g1/concurrentMarkThread.cpp

Print this page

        

@@ -139,13 +139,15 @@
       // have been scanned. If we did then it's possible that a
       // subsequent GC could block us from joining the STS and proceed
       // without the root regions have been scanned which would be a
       // correctness issue.
 
+      if (_cm->root_regions()->scan_in_progress()) {
       assert(!cm()->has_aborted(), "Aborting before root region scanning is finished not supported.");
       GCConcPhaseTimer(_cm, "Concurrent Root Region Scanning");
       _cm->scanRootRegions();
+      }
 
       // It would be nice to use the GCTraceConcTime class here but
       // the "end" logging is inside the loop and not at the end of
       // a scope. Mimicking the same log output as GCTraceConcTime instead.
       jlong mark_start = os::elapsed_counter();
< prev index next >