src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp

Print this page
rev 4466 : 8010463: G1: Crashes with -UseTLAB and heap verification
Summary: Some parts of the G1 heap can only be walked during a safepoint. Skip verifying these parts of the heap when verifying during JVM startup.
Reviewed-by: brutisso, tschatzl

@@ -3355,11 +3355,11 @@
   verify(silent, VerifyOption_G1UsePrevMarking);
 }
 
 void G1CollectedHeap::verify(bool silent,
                              VerifyOption vo) {
-  if (SafepointSynchronize::is_at_safepoint() || ! UseTLAB) {
+  if (SafepointSynchronize::is_at_safepoint()) {
     if (!silent) { gclog_or_tty->print("Roots (excluding permgen) "); }
     VerifyRootsClosure rootsCl(vo);
 
     assert(Thread::current()->is_VM_thread(),
       "Expected to be executed serially by the VM thread at this point");

@@ -3453,11 +3453,12 @@
 #endif
       gclog_or_tty->flush();
     }
     guarantee(!failures, "there should not have been any failures");
   } else {
-    if (!silent) gclog_or_tty->print("(SKIPPING roots, heapRegions, remset) ");
+    if (!silent)
+      gclog_or_tty->print("(SKIPPING roots, heapRegionSets, heapRegions, remset) ");
   }
 }
 
 class PrintRegionClosure: public HeapRegionClosure {
   outputStream* _st;