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

changeset 1538
9dc2adf2cbe0
parent 1279
bd02caa94611
child 1907
c18cbe5936b8
     1.1 --- a/src/share/vm/gc_implementation/g1/collectionSetChooser.cpp	Tue Dec 08 15:12:17 2009 -0800
     1.2 +++ b/src/share/vm/gc_implementation/g1/collectionSetChooser.cpp	Wed Dec 09 23:51:38 2009 -0800
     1.3 @@ -351,9 +351,16 @@
     1.4  CollectionSetChooser::printSortedHeapRegions() {
     1.5    gclog_or_tty->print_cr("Printing %d Heap Regions sorted by amount of known garbage",
     1.6                  _numMarkedRegions);
     1.7 +
     1.8 +  DEBUG_ONLY(int marked_count = 0;)
     1.9    for (int i = 0; i < _markedRegions.length(); i++) {
    1.10 -    printHeapRegion(_markedRegions.at(i));
    1.11 +    HeapRegion* r = _markedRegions.at(i);
    1.12 +    if (r != NULL) {
    1.13 +      printHeapRegion(r);
    1.14 +      DEBUG_ONLY(marked_count++;)
    1.15 +    }
    1.16    }
    1.17 +  assert(marked_count == _numMarkedRegions, "must be");
    1.18    gclog_or_tty->print_cr("Done sorted heap region print");
    1.19  }
    1.20  

mercurial