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

changeset 7651
c132be0fb74d
parent 7369
b840813adfcc
child 7994
04ff2f6cd0eb
child 9796
65749db89e61
child 9858
b985cbb00e68
     1.1 --- a/src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp	Wed Mar 25 15:50:17 2015 +0100
     1.2 +++ b/src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp	Fri Dec 19 09:21:06 2014 +0100
     1.3 @@ -877,28 +877,20 @@
     1.4  public:
     1.5    uint tenuring_threshold() const { return _tenuring_threshold; }
     1.6  
     1.7 -  inline GCAllocPurpose
     1.8 -    evacuation_destination(HeapRegion* src_region, uint age, size_t word_sz) {
     1.9 -      if (age < _tenuring_threshold && src_region->is_young()) {
    1.10 -        return GCAllocForSurvived;
    1.11 -      } else {
    1.12 -        return GCAllocForTenured;
    1.13 -      }
    1.14 -  }
    1.15 -
    1.16 -  inline bool track_object_age(GCAllocPurpose purpose) {
    1.17 -    return purpose == GCAllocForSurvived;
    1.18 -  }
    1.19 -
    1.20    static const uint REGIONS_UNLIMITED = (uint) -1;
    1.21  
    1.22 -  uint max_regions(int purpose);
    1.23 -
    1.24 -  // The limit on regions for a particular purpose is reached.
    1.25 -  void note_alloc_region_limit_reached(int purpose) {
    1.26 -    if (purpose == GCAllocForSurvived) {
    1.27 -      _tenuring_threshold = 0;
    1.28 +  uint max_regions(InCSetState dest) {
    1.29 +    switch (dest.value()) {
    1.30 +      case InCSetState::Young:
    1.31 +        return _max_survivor_regions;
    1.32 +      case InCSetState::Old:
    1.33 +        return REGIONS_UNLIMITED;
    1.34 +      default:
    1.35 +        assert(false, err_msg("Unknown dest state: " CSETSTATE_FORMAT, dest.value()));
    1.36 +        break;
    1.37      }
    1.38 +    // keep some compilers happy
    1.39 +    return 0;
    1.40    }
    1.41  
    1.42    void note_start_adding_survivor_regions() {

mercurial