1.1 --- a/src/share/vm/gc_implementation/g1/concurrentMark.cpp Tue Jun 21 15:23:07 2011 -0400 1.2 +++ b/src/share/vm/gc_implementation/g1/concurrentMark.cpp Fri Jun 24 12:38:49 2011 -0400 1.3 @@ -1655,6 +1655,23 @@ 1.4 _max_live_bytes += g1_note_end.max_live_bytes(); 1.5 _freed_bytes += g1_note_end.freed_bytes(); 1.6 1.7 + // If we iterate over the global cleanup list at the end of 1.8 + // cleanup to do this printing we will not guarantee to only 1.9 + // generate output for the newly-reclaimed regions (the list 1.10 + // might not be empty at the beginning of cleanup; we might 1.11 + // still be working on its previous contents). So we do the 1.12 + // printing here, before we append the new regions to the global 1.13 + // cleanup list. 1.14 + 1.15 + G1HRPrinter* hr_printer = _g1h->hr_printer(); 1.16 + if (hr_printer->is_active()) { 1.17 + HeapRegionLinkedListIterator iter(&local_cleanup_list); 1.18 + while (iter.more_available()) { 1.19 + HeapRegion* hr = iter.get_next(); 1.20 + hr_printer->cleanup(hr); 1.21 + } 1.22 + } 1.23 + 1.24 _cleanup_list->add_as_tail(&local_cleanup_list); 1.25 assert(local_cleanup_list.is_empty(), "post-condition"); 1.26