Merge
authorjmasa
Fri, 11 Dec 2009 09:30:48 -0800
changeset 4474 faa140ac71cd
parent 4466 b7fda949ec06 (current diff)
parent 4473 36af0e48d3d1 (diff)
child 4475 428871e8e608
child 4481 de92ec484f5e
Merge
--- a/hotspot/src/share/vm/gc_implementation/g1/collectionSetChooser.cpp	Fri Dec 11 08:39:30 2009 -0800
+++ b/hotspot/src/share/vm/gc_implementation/g1/collectionSetChooser.cpp	Fri Dec 11 09:30:48 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");
 }