changeset 1105:cf9a9a50e763

Merge
author jmasa
date Thu, 17 Dec 2009 07:02:39 -0800
parents 27f9477e879b (diff) 6dc5471e0f66 (current diff)
children 22e4972db0a6 1ea456c6f2b7 cc0ca4f00e89
files
diffstat 1 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/g1/collectionSetChooser.cpp	Tue Dec 15 17:19:40 2009 -0800
+++ b/src/share/vm/gc_implementation/g1/collectionSetChooser.cpp	Thu Dec 17 07:02:39 2009 -0800
@@ -351,9 +351,16 @@
 CollectionSetChooser::printSortedHeapRegions() {
   gclog_or_tty->print_cr("Printing %d Heap Regions sorted by amount of known garbage",
                 _numMarkedRegions);
+
+  DEBUG_ONLY(int marked_count = 0;)
   for (int i = 0; i < _markedRegions.length(); i++) {
-    printHeapRegion(_markedRegions.at(i));
+    HeapRegion* r = _markedRegions.at(i);
+    if (r != NULL) {
+      printHeapRegion(r);
+      DEBUG_ONLY(marked_count++;)
+    }
   }
+  assert(marked_count == _numMarkedRegions, "must be");
   gclog_or_tty->print_cr("Done sorted heap region print");
 }