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

changeset 3998
7383557659bd
parent 3924
3a431b605145
child 4015
bb3f6194fedb
     1.1 --- a/src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp	Tue Aug 21 10:05:57 2012 -0700
     1.2 +++ b/src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp	Tue Aug 21 14:10:39 2012 -0700
     1.3 @@ -228,7 +228,6 @@
     1.4    TruncatedSeq* _alloc_rate_ms_seq;
     1.5    double        _prev_collection_pause_end_ms;
     1.6  
     1.7 -  TruncatedSeq* _pending_card_diff_seq;
     1.8    TruncatedSeq* _rs_length_diff_seq;
     1.9    TruncatedSeq* _cost_per_card_ms_seq;
    1.10    TruncatedSeq* _young_cards_per_entry_ratio_seq;
    1.11 @@ -295,7 +294,6 @@
    1.12    double _pause_time_target_ms;
    1.13  
    1.14    size_t _pending_cards;
    1.15 -  size_t _max_pending_cards;
    1.16  
    1.17  public:
    1.18    // Accessors
    1.19 @@ -325,28 +323,6 @@
    1.20      _max_rs_lengths = rs_lengths;
    1.21    }
    1.22  
    1.23 -  size_t predict_pending_card_diff() {
    1.24 -    double prediction = get_new_neg_prediction(_pending_card_diff_seq);
    1.25 -    if (prediction < 0.00001) {
    1.26 -      return 0;
    1.27 -    } else {
    1.28 -      return (size_t) prediction;
    1.29 -    }
    1.30 -  }
    1.31 -
    1.32 -  size_t predict_pending_cards() {
    1.33 -    size_t max_pending_card_num = _g1->max_pending_card_num();
    1.34 -    size_t diff = predict_pending_card_diff();
    1.35 -    size_t prediction;
    1.36 -    if (diff > max_pending_card_num) {
    1.37 -      prediction = max_pending_card_num;
    1.38 -    } else {
    1.39 -      prediction = max_pending_card_num - diff;
    1.40 -    }
    1.41 -
    1.42 -    return prediction;
    1.43 -  }
    1.44 -
    1.45    size_t predict_rs_length_diff() {
    1.46      return (size_t) get_new_prediction(_rs_length_diff_seq);
    1.47    }
    1.48 @@ -439,7 +415,7 @@
    1.49    double predict_base_elapsed_time_ms(size_t pending_cards,
    1.50                                        size_t scanned_cards);
    1.51    size_t predict_bytes_to_copy(HeapRegion* hr);
    1.52 -  double predict_region_elapsed_time_ms(HeapRegion* hr, bool young);
    1.53 +  double predict_region_elapsed_time_ms(HeapRegion* hr, bool for_young_gc);
    1.54  
    1.55    void set_recorded_rs_lengths(size_t rs_lengths);
    1.56  
    1.57 @@ -495,12 +471,6 @@
    1.58    }
    1.59  
    1.60  private:
    1.61 -  size_t _bytes_in_collection_set_before_gc;
    1.62 -  size_t _bytes_copied_during_gc;
    1.63 -
    1.64 -  // Used to count used bytes in CS.
    1.65 -  friend class CountCSClosure;
    1.66 -
    1.67    // Statistics kept per GC stoppage, pause or full.
    1.68    TruncatedSeq* _recent_prev_end_times_for_all_gcs_sec;
    1.69  
    1.70 @@ -514,9 +484,13 @@
    1.71  
    1.72    // The number of bytes in the collection set before the pause. Set from
    1.73    // the incrementally built collection set at the start of an evacuation
    1.74 -  // pause.
    1.75 +  // pause, and incremented in finalize_cset() when adding old regions
    1.76 +  // (if any) to the collection set.
    1.77    size_t _collection_set_bytes_used_before;
    1.78  
    1.79 +  // The number of bytes copied during the GC.
    1.80 +  size_t _bytes_copied_during_gc;
    1.81 +
    1.82    // The associated information that is maintained while the incremental
    1.83    // collection set is being built with young regions. Used to populate
    1.84    // the recorded info for the evacuation pause.
    1.85 @@ -646,9 +620,6 @@
    1.86    bool predict_will_fit(uint young_length, double base_time_ms,
    1.87                          uint base_free_regions, double target_pause_time_ms);
    1.88  
    1.89 -  // Count the number of bytes used in the CS.
    1.90 -  void count_CS_bytes_used();
    1.91 -
    1.92  public:
    1.93  
    1.94    G1CollectorPolicy();
    1.95 @@ -666,10 +637,6 @@
    1.96    // higher, recalculate the young list target length prediction.
    1.97    void revise_young_list_target_length_if_necessary();
    1.98  
    1.99 -  size_t bytes_in_collection_set() {
   1.100 -    return _bytes_in_collection_set_before_gc;
   1.101 -  }
   1.102 -
   1.103    // This should be called after the heap is resized.
   1.104    void record_new_heap_size(uint new_number_of_regions);
   1.105  

mercurial