Mercurial > hg > truffle
diff src/share/vm/gc_implementation/g1/concurrentMark.cpp @ 3778:5f6f2615433a
7049999: G1: Make the G1PrintHeapRegions output consistent and complete
Summary: Extend and make more consistent the output from the G1PrintHeapRegions flag.
Reviewed-by: johnc, jmasa
author | tonyp |
---|---|
date | Fri, 24 Jun 2011 12:38:49 -0400 |
parents | 23d434c6290d |
children | ff53346271fe |
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/g1/concurrentMark.cpp Tue Jun 21 15:23:07 2011 -0400 +++ b/src/share/vm/gc_implementation/g1/concurrentMark.cpp Fri Jun 24 12:38:49 2011 -0400 @@ -1655,6 +1655,23 @@ _max_live_bytes += g1_note_end.max_live_bytes(); _freed_bytes += g1_note_end.freed_bytes(); + // If we iterate over the global cleanup list at the end of + // cleanup to do this printing we will not guarantee to only + // generate output for the newly-reclaimed regions (the list + // might not be empty at the beginning of cleanup; we might + // still be working on its previous contents). So we do the + // printing here, before we append the new regions to the global + // cleanup list. + + G1HRPrinter* hr_printer = _g1h->hr_printer(); + if (hr_printer->is_active()) { + HeapRegionLinkedListIterator iter(&local_cleanup_list); + while (iter.more_available()) { + HeapRegion* hr = iter.get_next(); + hr_printer->cleanup(hr); + } + } + _cleanup_list->add_as_tail(&local_cleanup_list); assert(local_cleanup_list.is_empty(), "post-condition");