src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp

changeset 2333
016a3628c885
parent 2315
631f79e71e90
child 2712
5c0b591e1074
     1.1 --- a/src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp	Thu Dec 02 13:20:39 2010 -0500
     1.2 +++ b/src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp	Tue Dec 07 16:47:42 2010 -0500
     1.3 @@ -196,6 +196,10 @@
     1.4    size_t _young_list_target_length;
     1.5    size_t _young_list_fixed_length;
     1.6  
     1.7 +  // The max number of regions we can extend the eden by while the GC
     1.8 +  // locker is active. This should be >= _young_list_target_length;
     1.9 +  size_t _young_list_max_length;
    1.10 +
    1.11    size_t _young_cset_length;
    1.12    bool   _last_young_gc_full;
    1.13  
    1.14 @@ -1113,13 +1117,22 @@
    1.15  
    1.16    bool is_young_list_full() {
    1.17      size_t young_list_length = _g1->young_list()->length();
    1.18 -    size_t young_list_max_length = _young_list_target_length;
    1.19 +    size_t young_list_target_length = _young_list_target_length;
    1.20 +    if (G1FixedEdenSize) {
    1.21 +      young_list_target_length -= _max_survivor_regions;
    1.22 +    }
    1.23 +    return young_list_length >= young_list_target_length;
    1.24 +  }
    1.25 +
    1.26 +  bool can_expand_young_list() {
    1.27 +    size_t young_list_length = _g1->young_list()->length();
    1.28 +    size_t young_list_max_length = _young_list_max_length;
    1.29      if (G1FixedEdenSize) {
    1.30        young_list_max_length -= _max_survivor_regions;
    1.31      }
    1.32 +    return young_list_length < young_list_max_length;
    1.33 +  }
    1.34  
    1.35 -    return young_list_length >= young_list_max_length;
    1.36 -  }
    1.37    void update_region_num(bool young);
    1.38  
    1.39    bool in_young_gc_mode() {
    1.40 @@ -1231,6 +1244,8 @@
    1.41      _survivors_age_table.merge_par(age_table);
    1.42    }
    1.43  
    1.44 +  void calculate_max_gc_locker_expansion();
    1.45 +
    1.46    // Calculates survivor space parameters.
    1.47    void calculate_survivors_policy();
    1.48  

mercurial