diff 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
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp	Wed Sep 07 18:58:33 2011 -0700
+++ b/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp	Thu Sep 08 05:16:49 2011 -0400
@@ -1682,6 +1682,7 @@
       }
       assert(curr == mr.end(), "post-condition");
     }
+    g1_policy()->calculate_reserve(n_regions());
   } else {
     ergo_verbose0(ErgoHeapSizing,
                   "did not expand the heap",
@@ -1732,6 +1733,7 @@
     _expansion_regions += num_regions_deleted;
     update_committed_space(old_end, new_end);
     HeapRegionRemSet::shrink_heap(n_regions());
+    g1_policy()->calculate_reserve(n_regions());
   } else {
     ergo_verbose0(ErgoHeapSizing,
                   "did not shrink the heap",