changeset 3741:4202510ee0fe

8000831: Heap verification output incorrect/incomplete Summary: Restore non-silent output of heap verification. Reviewed-by: ysr, brutisso, jmasa
author johnc
date Mon, 15 Oct 2012 10:02:42 -0700
parents dd2b66d09ccd
children 633ba56cb013
files src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp src/share/vm/gc_implementation/concurrentMarkSweep/vmCMSOperations.cpp src/share/vm/gc_implementation/g1/concurrentMark.cpp src/share/vm/gc_implementation/parallelScavenge/psMarkSweep.cpp src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp src/share/vm/memory/genCollectedHeap.cpp src/share/vm/memory/universe.hpp src/share/vm/utilities/debug.cpp
diffstat 9 files changed, 34 insertions(+), 28 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp	Tue Oct 09 22:12:25 2012 +0200
+++ b/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp	Mon Oct 15 10:02:42 2012 -0700
@@ -2395,7 +2395,7 @@
 
   if (VerifyBeforeGC &&
       GenCollectedHeap::heap()->total_collections() >= VerifyGCStartAt) {
-    Universe::verify(true);
+    Universe::verify();
   }
 
   // Snapshot the soft reference policy to be used in this collection cycle.
@@ -2419,7 +2419,7 @@
         if (VerifyDuringGC &&
             GenCollectedHeap::heap()->total_collections() >= VerifyGCStartAt) {
           gclog_or_tty->print("Verify before initial mark: ");
-          Universe::verify(true);
+          Universe::verify();
         }
         {
           bool res = markFromRoots(false);
@@ -2431,7 +2431,7 @@
         if (VerifyDuringGC &&
             GenCollectedHeap::heap()->total_collections() >= VerifyGCStartAt) {
           gclog_or_tty->print("Verify before re-mark: ");
-          Universe::verify(true);
+          Universe::verify();
         }
         checkpointRootsFinal(false, clear_all_soft_refs,
                              init_mark_was_synchronous);
@@ -2443,7 +2443,7 @@
         if (VerifyDuringGC &&
             GenCollectedHeap::heap()->total_collections() >= VerifyGCStartAt) {
           gclog_or_tty->print("Verify before sweep: ");
-          Universe::verify(true);
+          Universe::verify();
         }
         sweep(false);
         assert(_collectorState == Resizing, "Incorrect state");
@@ -2459,7 +2459,7 @@
         if (VerifyDuringGC &&
             GenCollectedHeap::heap()->total_collections() >= VerifyGCStartAt) {
           gclog_or_tty->print("Verify before reset: ");
-          Universe::verify(true);
+          Universe::verify();
         }
         reset(false);
         assert(_collectorState == Idling, "Collector state should "
@@ -2486,7 +2486,7 @@
 
   if (VerifyAfterGC &&
       GenCollectedHeap::heap()->total_collections() >= VerifyGCStartAt) {
-    Universe::verify(true);
+    Universe::verify();
   }
   if (TraceCMSState) {
     gclog_or_tty->print_cr("CMS Thread " INTPTR_FORMAT
@@ -5668,7 +5668,7 @@
   if (VerifyDuringGC &&
       GenCollectedHeap::heap()->total_collections() >= VerifyGCStartAt) {
     HandleMark hm;  // Discard invalid handles created during verification
-    Universe::verify(true);
+    Universe::verify();
   }
   {
     TraceTime t("root rescan", PrintGCDetails, false, gclog_or_tty);
--- a/src/share/vm/gc_implementation/concurrentMarkSweep/vmCMSOperations.cpp	Tue Oct 09 22:12:25 2012 +0200
+++ b/src/share/vm/gc_implementation/concurrentMarkSweep/vmCMSOperations.cpp	Mon Oct 15 10:02:42 2012 -0700
@@ -64,7 +64,7 @@
     FreelistLocker x(_collector);
     MutexLockerEx  y(_collector->bitMapLock(), Mutex::_no_safepoint_check_flag);
     Universe::heap()->prepare_for_verify();
-    Universe::verify(true);
+    Universe::verify();
   }
 }
 
@@ -74,7 +74,7 @@
     HandleMark hm;
     FreelistLocker x(_collector);
     MutexLockerEx  y(_collector->bitMapLock(), Mutex::_no_safepoint_check_flag);
-    Universe::verify(true);
+    Universe::verify();
   }
 }
 
--- a/src/share/vm/gc_implementation/g1/concurrentMark.cpp	Tue Oct 09 22:12:25 2012 +0200
+++ b/src/share/vm/gc_implementation/g1/concurrentMark.cpp	Mon Oct 15 10:02:42 2012 -0700
@@ -1120,8 +1120,8 @@
     HandleMark hm;  // handle scope
     gclog_or_tty->print(" VerifyDuringGC:(before)");
     Universe::heap()->prepare_for_verify();
-    Universe::verify(/* silent      */ false,
-                     /* option      */ VerifyOption_G1UsePrevMarking);
+    Universe::verify(/* silent */ false,
+                     /* option */ VerifyOption_G1UsePrevMarking);
   }
 
   G1CollectorPolicy* g1p = g1h->g1_policy();
@@ -1159,8 +1159,8 @@
       HandleMark hm;  // handle scope
       gclog_or_tty->print(" VerifyDuringGC:(after)");
       Universe::heap()->prepare_for_verify();
-      Universe::verify(/* silent      */ false,
-                       /* option      */ VerifyOption_G1UseNextMarking);
+      Universe::verify(/* silent */ false,
+                       /* option */ VerifyOption_G1UseNextMarking);
     }
     assert(!restart_for_overflow(), "sanity");
   }
@@ -1811,8 +1811,8 @@
     HandleMark hm;  // handle scope
     gclog_or_tty->print(" VerifyDuringGC:(before)");
     Universe::heap()->prepare_for_verify();
-    Universe::verify(/* silent      */ false,
-                     /* option      */ VerifyOption_G1UsePrevMarking);
+    Universe::verify(/* silent */ false,
+                     /* option */ VerifyOption_G1UsePrevMarking);
   }
 
   G1CollectorPolicy* g1p = G1CollectedHeap::heap()->g1_policy();
@@ -1966,8 +1966,8 @@
     HandleMark hm;  // handle scope
     gclog_or_tty->print(" VerifyDuringGC:(after)");
     Universe::heap()->prepare_for_verify();
-    Universe::verify(/* silent      */ false,
-                     /* option      */ VerifyOption_G1UsePrevMarking);
+    Universe::verify(/* silent */ false,
+                     /* option */ VerifyOption_G1UsePrevMarking);
   }
 
   g1h->verify_region_sets_optional();
--- a/src/share/vm/gc_implementation/parallelScavenge/psMarkSweep.cpp	Tue Oct 09 22:12:25 2012 +0200
+++ b/src/share/vm/gc_implementation/parallelScavenge/psMarkSweep.cpp	Mon Oct 15 10:02:42 2012 -0700
@@ -139,7 +139,7 @@
   if (VerifyBeforeGC && heap->total_collections() >= VerifyGCStartAt) {
     HandleMark hm;  // Discard invalid handles created during verification
     gclog_or_tty->print(" VerifyBeforeGC:");
-    Universe::verify(true);
+    Universe::verify();
   }
 
   // Verify object start arrays
@@ -341,7 +341,7 @@
   if (VerifyAfterGC && heap->total_collections() >= VerifyGCStartAt) {
     HandleMark hm;  // Discard invalid handles created during verification
     gclog_or_tty->print(" VerifyAfterGC:");
-    Universe::verify(false);
+    Universe::verify();
   }
 
   // Re-verify object start arrays
--- a/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp	Tue Oct 09 22:12:25 2012 +0200
+++ b/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp	Mon Oct 15 10:02:42 2012 -0700
@@ -983,7 +983,7 @@
   if (VerifyBeforeGC && heap->total_collections() >= VerifyGCStartAt) {
     HandleMark hm;  // Discard invalid handles created during verification
     gclog_or_tty->print(" VerifyBeforeGC:");
-    Universe::verify(true);
+    Universe::verify();
   }
 
   // Verify object start arrays
@@ -2184,7 +2184,7 @@
   if (VerifyAfterGC && heap->total_collections() >= VerifyGCStartAt) {
     HandleMark hm;  // Discard invalid handles created during verification
     gclog_or_tty->print(" VerifyAfterGC:");
-    Universe::verify(false);
+    Universe::verify();
   }
 
   // Re-verify object start arrays
--- a/src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp	Tue Oct 09 22:12:25 2012 +0200
+++ b/src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp	Mon Oct 15 10:02:42 2012 -0700
@@ -315,7 +315,7 @@
   if (VerifyBeforeGC && heap->total_collections() >= VerifyGCStartAt) {
     HandleMark hm;  // Discard invalid handles created during verification
     gclog_or_tty->print(" VerifyBeforeGC:");
-    Universe::verify(true);
+    Universe::verify();
   }
 
   {
@@ -639,7 +639,7 @@
   if (VerifyAfterGC && heap->total_collections() >= VerifyGCStartAt) {
     HandleMark hm;  // Discard invalid handles created during verification
     gclog_or_tty->print(" VerifyAfterGC:");
-    Universe::verify(false);
+    Universe::verify();
   }
 
   heap->print_heap_after_gc();
--- a/src/share/vm/memory/genCollectedHeap.cpp	Tue Oct 09 22:12:25 2012 +0200
+++ b/src/share/vm/memory/genCollectedHeap.cpp	Mon Oct 15 10:02:42 2012 -0700
@@ -447,7 +447,7 @@
             prepared_for_verification = true;
           }
           gclog_or_tty->print(" VerifyBeforeGC:");
-          Universe::verify(true);
+          Universe::verify();
         }
         COMPILER2_PRESENT(DerivedPointerTable::clear());
 
@@ -519,7 +519,7 @@
             total_collections() >= VerifyGCStartAt) {
           HandleMark hm;  // Discard invalid handles created during verification
           gclog_or_tty->print(" VerifyAfterGC:");
-          Universe::verify(false);
+          Universe::verify();
         }
 
         if (PrintGCDetails) {
--- a/src/share/vm/memory/universe.hpp	Tue Oct 09 22:12:25 2012 +0200
+++ b/src/share/vm/memory/universe.hpp	Mon Oct 15 10:02:42 2012 -0700
@@ -403,8 +403,14 @@
 
   // Debugging
   static bool verify_in_progress() { return _verify_in_progress; }
-  static void verify(bool silent = false,
-                     VerifyOption option = VerifyOption_Default );
+  static void verify(bool silent, VerifyOption option);
+  static void verify(bool silent) {
+    verify(silent, VerifyOption_Default /* option */);
+  }
+  static void verify() {
+    verify(false /* silent */);
+  }
+
   static int  verify_count()       { return _verify_count; }
   // The default behavior is to call print_on() on gclog_or_tty.
   static void print();
--- a/src/share/vm/utilities/debug.cpp	Tue Oct 09 22:12:25 2012 +0200
+++ b/src/share/vm/utilities/debug.cpp	Mon Oct 15 10:02:42 2012 -0700
@@ -477,7 +477,7 @@
   }
   // Ensure Eden top is correct before verification
   Universe::heap()->prepare_for_verify();
-  Universe::verify(true);
+  Universe::verify();
   if (!safe) SafepointSynchronize::set_is_not_at_safepoint();
 }