7089625: G1: policy for how many old regions to add to the CSet (when young gen is fixed) is broken

Tue, 13 Sep 2011 12:40:14 -0400

author
tonyp
date
Tue, 13 Sep 2011 12:40:14 -0400
changeset 3126
f1b4e0e0bdad
parent 3125
140317da459a
child 3127
0a63380c8ac8

7089625: G1: policy for how many old regions to add to the CSet (when young gen is fixed) is broken
Summary: When refactoring the code for a previous fix, a condition was not correctly negated which prevents the G1 policy from adding the correct number of old regions to the CSet when the young gen size is fixed. The changeset also fixes a small syntactical issue in g1ErgoVerbose.hpp which is causing compiler warnings.
Reviewed-by: brutisso, ysr

src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp file | annotate | diff | comparison | revisions
src/share/vm/gc_implementation/g1/g1ErgoVerbose.hpp file | annotate | diff | comparison | revisions
     1.1 --- a/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp	Fri Sep 09 16:33:13 2011 -0700
     1.2 +++ b/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp	Tue Sep 13 12:40:14 2011 -0400
     1.3 @@ -3042,10 +3042,10 @@
     1.4              should_continue = false;
     1.5            }
     1.6          } else {
     1.7 -          if (_collection_set_size < _young_list_fixed_length) {
     1.8 +          if (_collection_set_size >= _young_list_fixed_length) {
     1.9              ergo_verbose2(ErgoCSetConstruction,
    1.10                            "stop adding old regions to CSet",
    1.11 -                          ergo_format_reason("CSet length lower than target")
    1.12 +                          ergo_format_reason("CSet length reached target")
    1.13                            ergo_format_region("CSet")
    1.14                            ergo_format_region("young target"),
    1.15                            _collection_set_size, _young_list_fixed_length);
     2.1 --- a/src/share/vm/gc_implementation/g1/g1ErgoVerbose.hpp	Fri Sep 09 16:33:13 2011 -0700
     2.2 +++ b/src/share/vm/gc_implementation/g1/g1ErgoVerbose.hpp	Tue Sep 13 12:40:14 2011 -0400
     2.3 @@ -58,7 +58,7 @@
     2.4    // ErgoLow is 0 so that we don't have to explicitly or a heuristic
     2.5    // id with ErgoLow to keep its use simpler.
     2.6    ErgoLow = 0,
     2.7 -  ErgoHigh = 1 << ErgoLevelShift,
     2.8 +  ErgoHigh = 1 << ErgoLevelShift
     2.9  } ErgoLevel;
    2.10  
    2.11  // The available heuristics.

mercurial