comparison src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp @ 3919:4f41766176cf

7084509: G1: fix inconsistencies and mistakes in the young list target length calculations Summary: Fixed inconsistencies and mistakes in the young list target length calculations so that a) the calculated target length is optimal (before, it was not), b) other parameters like max survivor size and max gc locker eden expansion are always consistent with the calculated target length (before, they were not always), and c) the resulting target length was always bound by desired min and max values (before, it was not). Reviewed-by: brutisso, johnc
author tonyp
date Thu, 08 Sep 2011 05:16:49 -0400
parents 05550041d664
children af2ab04e0038
comparison
equal deleted inserted replaced
3918:a6128a8ed624 3919:4f41766176cf
1680 _hr_printer.commit(curr, curr_end); 1680 _hr_printer.commit(curr, curr_end);
1681 curr = curr_end; 1681 curr = curr_end;
1682 } 1682 }
1683 assert(curr == mr.end(), "post-condition"); 1683 assert(curr == mr.end(), "post-condition");
1684 } 1684 }
1685 g1_policy()->calculate_reserve(n_regions());
1685 } else { 1686 } else {
1686 ergo_verbose0(ErgoHeapSizing, 1687 ergo_verbose0(ErgoHeapSizing,
1687 "did not expand the heap", 1688 "did not expand the heap",
1688 ergo_format_reason("heap expansion operation failed")); 1689 ergo_format_reason("heap expansion operation failed"));
1689 // The expansion of the virtual storage space was unsuccessful. 1690 // The expansion of the virtual storage space was unsuccessful.
1730 assert(mr.start() == new_end, "post-condition"); 1731 assert(mr.start() == new_end, "post-condition");
1731 1732
1732 _expansion_regions += num_regions_deleted; 1733 _expansion_regions += num_regions_deleted;
1733 update_committed_space(old_end, new_end); 1734 update_committed_space(old_end, new_end);
1734 HeapRegionRemSet::shrink_heap(n_regions()); 1735 HeapRegionRemSet::shrink_heap(n_regions());
1736 g1_policy()->calculate_reserve(n_regions());
1735 } else { 1737 } else {
1736 ergo_verbose0(ErgoHeapSizing, 1738 ergo_verbose0(ErgoHeapSizing,
1737 "did not shrink the heap", 1739 "did not shrink the heap",
1738 ergo_format_reason("heap shrinking operation failed")); 1740 ergo_format_reason("heap shrinking operation failed"));
1739 } 1741 }