comparison 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
comparison
equal deleted inserted replaced
3777:e8b0b0392037 3778:5f6f2615433a
1652 true /* par */); 1652 true /* par */);
1653 { 1653 {
1654 MutexLockerEx x(ParGCRareEvent_lock, Mutex::_no_safepoint_check_flag); 1654 MutexLockerEx x(ParGCRareEvent_lock, Mutex::_no_safepoint_check_flag);
1655 _max_live_bytes += g1_note_end.max_live_bytes(); 1655 _max_live_bytes += g1_note_end.max_live_bytes();
1656 _freed_bytes += g1_note_end.freed_bytes(); 1656 _freed_bytes += g1_note_end.freed_bytes();
1657
1658 // If we iterate over the global cleanup list at the end of
1659 // cleanup to do this printing we will not guarantee to only
1660 // generate output for the newly-reclaimed regions (the list
1661 // might not be empty at the beginning of cleanup; we might
1662 // still be working on its previous contents). So we do the
1663 // printing here, before we append the new regions to the global
1664 // cleanup list.
1665
1666 G1HRPrinter* hr_printer = _g1h->hr_printer();
1667 if (hr_printer->is_active()) {
1668 HeapRegionLinkedListIterator iter(&local_cleanup_list);
1669 while (iter.more_available()) {
1670 HeapRegion* hr = iter.get_next();
1671 hr_printer->cleanup(hr);
1672 }
1673 }
1657 1674
1658 _cleanup_list->add_as_tail(&local_cleanup_list); 1675 _cleanup_list->add_as_tail(&local_cleanup_list);
1659 assert(local_cleanup_list.is_empty(), "post-condition"); 1676 assert(local_cleanup_list.is_empty(), "post-condition");
1660 1677
1661 HeapRegionRemSet::finish_cleanup_task(&hrrs_cleanup_task); 1678 HeapRegionRemSet::finish_cleanup_task(&hrrs_cleanup_task);