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

changeset 1829
1316cec51b4d
parent 1456
1f19207eefc2
child 1907
c18cbe5936b8
     1.1 --- a/src/share/vm/gc_implementation/g1/heapRegion.hpp	Mon Apr 19 05:40:21 2010 -0700
     1.2 +++ b/src/share/vm/gc_implementation/g1/heapRegion.hpp	Thu Apr 22 10:02:38 2010 -0700
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright 2001-2009 Sun Microsystems, Inc.  All Rights Reserved.
     1.6 + * Copyright 2001-2010 Sun Microsystems, Inc.  All Rights Reserved.
     1.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8   *
     1.9   * This code is free software; you can redistribute it and/or modify it
    1.10 @@ -247,7 +247,6 @@
    1.11  
    1.12    enum YoungType {
    1.13      NotYoung,                   // a region is not young
    1.14 -    ScanOnly,                   // a region is young and scan-only
    1.15      Young,                      // a region is young
    1.16      Survivor                    // a region is young and it contains
    1.17                                  // survivor
    1.18 @@ -292,6 +291,20 @@
    1.19      _young_type = new_type;
    1.20    }
    1.21  
    1.22 +  // Cached attributes used in the collection set policy information
    1.23 +
    1.24 +  // The RSet length that was added to the total value
    1.25 +  // for the collection set.
    1.26 +  size_t _recorded_rs_length;
    1.27 +
    1.28 +  // The predicted elapsed time that was added to total value
    1.29 +  // for the collection set.
    1.30 +  double _predicted_elapsed_time_ms;
    1.31 +
    1.32 +  // The predicted number of bytes to copy that was added to
    1.33 +  // the total value for the collection set.
    1.34 +  size_t _predicted_bytes_to_copy;
    1.35 +
    1.36   public:
    1.37    // If "is_zeroed" is "true", the region "mr" can be assumed to contain zeros.
    1.38    HeapRegion(G1BlockOffsetSharedArray* sharedOffsetArray,
    1.39 @@ -614,7 +627,6 @@
    1.40    // </PREDICTION>
    1.41  
    1.42    bool is_young() const     { return _young_type != NotYoung; }
    1.43 -  bool is_scan_only() const { return _young_type == ScanOnly; }
    1.44    bool is_survivor() const  { return _young_type == Survivor; }
    1.45  
    1.46    int  young_index_in_cset() const { return _young_index_in_cset; }
    1.47 @@ -629,12 +641,6 @@
    1.48      return _surv_rate_group->age_in_group(_age_index);
    1.49    }
    1.50  
    1.51 -  void recalculate_age_in_surv_rate_group() {
    1.52 -    assert( _surv_rate_group != NULL, "pre-condition" );
    1.53 -    assert( _age_index > -1, "pre-condition" );
    1.54 -    _age_index = _surv_rate_group->recalculate_age_index(_age_index);
    1.55 -  }
    1.56 -
    1.57    void record_surv_words_in_group(size_t words_survived) {
    1.58      assert( _surv_rate_group != NULL, "pre-condition" );
    1.59      assert( _age_index > -1, "pre-condition" );
    1.60 @@ -676,8 +682,6 @@
    1.61  
    1.62    void set_young() { set_young_type(Young); }
    1.63  
    1.64 -  void set_scan_only() { set_young_type(ScanOnly); }
    1.65 -
    1.66    void set_survivor() { set_young_type(Survivor); }
    1.67  
    1.68    void set_not_young() { set_young_type(NotYoung); }
    1.69 @@ -775,6 +779,22 @@
    1.70      _zero_filler = NULL;
    1.71    }
    1.72  
    1.73 +  size_t recorded_rs_length() const        { return _recorded_rs_length; }
    1.74 +  double predicted_elapsed_time_ms() const { return _predicted_elapsed_time_ms; }
    1.75 +  size_t predicted_bytes_to_copy() const   { return _predicted_bytes_to_copy; }
    1.76 +
    1.77 +  void set_recorded_rs_length(size_t rs_length) {
    1.78 +    _recorded_rs_length = rs_length;
    1.79 +  }
    1.80 +
    1.81 +  void set_predicted_elapsed_time_ms(double ms) {
    1.82 +    _predicted_elapsed_time_ms = ms;
    1.83 +  }
    1.84 +
    1.85 +  void set_predicted_bytes_to_copy(size_t bytes) {
    1.86 +    _predicted_bytes_to_copy = bytes;
    1.87 +  }
    1.88 +
    1.89  #define HeapRegion_OOP_SINCE_SAVE_MARKS_DECL(OopClosureType, nv_suffix)  \
    1.90    virtual void oop_since_save_marks_iterate##nv_suffix(OopClosureType* cl);
    1.91    SPECIALIZED_SINCE_SAVE_MARKS_CLOSURES(HeapRegion_OOP_SINCE_SAVE_MARKS_DECL)

mercurial