< prev index next >

src/hotspot/share/gc/g1/g1Analytics.hpp

Print this page
rev 57223 : imported patch 8225484-changes-to-survivor-calculation


  58   TruncatedSeq* _mixed_cost_per_card_scan_ms_seq;
  59 
  60   // The cost to merge a card during young-only and mixed gcs in ms.
  61   TruncatedSeq* _young_cost_per_card_merge_ms_seq;
  62   TruncatedSeq* _mixed_cost_per_card_merge_ms_seq;
  63 
  64   // The cost to copy a byte in ms.
  65   TruncatedSeq* _copy_cost_per_byte_ms_seq;
  66   TruncatedSeq* _constant_other_time_ms_seq;
  67   TruncatedSeq* _young_other_cost_per_region_ms_seq;
  68   TruncatedSeq* _non_young_other_cost_per_region_ms_seq;
  69 
  70   TruncatedSeq* _pending_cards_seq;
  71   TruncatedSeq* _rs_length_seq;
  72 
  73   TruncatedSeq* _cost_per_byte_ms_during_cm_seq;
  74 
  75   // Statistics kept per GC stoppage, pause or full.
  76   TruncatedSeq* _recent_prev_end_times_for_all_gcs_sec;
  77 


  78   // The ratio of gc time to elapsed time, computed over recent pauses,
  79   // and the ratio for just the last pause.
  80   double _recent_avg_pause_time_ratio;
  81   double _last_pause_time_ratio;
  82 
  83   // Returns whether the sequence have enough samples to get a "good" prediction.
  84   // The constant used is random but "small".
  85   bool enough_samples_available(TruncatedSeq const* seq) const;
  86 
  87   double predict_in_unit_interval(TruncatedSeq const* seq) const;
  88   size_t predict_size(TruncatedSeq const* seq) const;
  89   double predict_zero_bounded(TruncatedSeq const* seq) const;
  90 
  91 public:
  92   G1Analytics(const G1Predictions* predictor);
  93 
  94   double prev_collection_pause_end_ms() const {
  95     return _prev_collection_pause_end_ms;
  96   }
  97 


 109 
 110   void append_prev_collection_pause_end_ms(double ms) {
 111     _prev_collection_pause_end_ms += ms;
 112   }
 113 
 114   void report_concurrent_mark_remark_times_ms(double ms);
 115   void report_concurrent_mark_cleanup_times_ms(double ms);
 116   void report_alloc_rate_ms(double alloc_rate);
 117   void report_concurrent_refine_rate_ms(double cards_per_ms);
 118   void report_logged_cards_rate_ms(double cards_per_ms);
 119   void report_cost_per_card_scan_ms(double cost_per_remset_card_ms, bool for_young_gc);
 120   void report_cost_per_card_merge_ms(double cost_per_card_ms, bool for_young_gc);
 121   void report_card_merge_to_scan_ratio(double cards_per_entry_ratio, bool for_young_gc);
 122   void report_rs_length_diff(double rs_length_diff);
 123   void report_cost_per_byte_ms(double cost_per_byte_ms, bool mark_or_rebuild_in_progress);
 124   void report_young_other_cost_per_region_ms(double other_cost_per_region_ms);
 125   void report_non_young_other_cost_per_region_ms(double other_cost_per_region_ms);
 126   void report_constant_other_time_ms(double constant_other_time_ms);
 127   void report_pending_cards(double pending_cards);
 128   void report_rs_length(double rs_length);

 129 
 130   double predict_alloc_rate_ms() const;
 131   int num_alloc_rate_ms() const;
 132 
 133   double predict_concurrent_refine_rate_ms() const;
 134   double predict_logged_cards_rate_ms() const;
 135   double predict_young_card_merge_to_scan_ratio() const;
 136 
 137   double predict_mixed_card_merge_to_scan_ratio() const;
 138 
 139   size_t predict_scan_card_num(size_t rs_length, bool for_young_gc) const;
 140 
 141   double predict_card_merge_time_ms(size_t card_num, bool for_young_gc) const;
 142   double predict_card_scan_time_ms(size_t card_num, bool for_young_gc) const;
 143 
 144   double predict_object_copy_time_ms_during_cm(size_t bytes_to_copy) const;
 145 
 146   double predict_object_copy_time_ms(size_t bytes_to_copy, bool during_concurrent_mark) const;
 147 
 148   double predict_constant_other_time_ms() const;
 149 
 150   double predict_young_other_time_ms(size_t young_num) const;
 151 
 152   double predict_non_young_other_time_ms(size_t non_young_num) const;
 153 
 154   double predict_remark_time_ms() const;
 155 
 156   double predict_cleanup_time_ms() const;
 157 
 158   size_t predict_rs_length() const;
 159   size_t predict_pending_cards() const;


 160 
 161   // Add a new GC of the given duration and end time to the record.
 162   void update_recent_gc_times(double end_time_sec, double elapsed_ms);
 163   void compute_pause_time_ratio(double interval_ms, double pause_time_ms);
 164 
 165   double last_known_gc_end_time_sec() const;
 166 };
 167 
 168 #endif // SHARE_GC_G1_G1ANALYTICS_HPP


  58   TruncatedSeq* _mixed_cost_per_card_scan_ms_seq;
  59 
  60   // The cost to merge a card during young-only and mixed gcs in ms.
  61   TruncatedSeq* _young_cost_per_card_merge_ms_seq;
  62   TruncatedSeq* _mixed_cost_per_card_merge_ms_seq;
  63 
  64   // The cost to copy a byte in ms.
  65   TruncatedSeq* _copy_cost_per_byte_ms_seq;
  66   TruncatedSeq* _constant_other_time_ms_seq;
  67   TruncatedSeq* _young_other_cost_per_region_ms_seq;
  68   TruncatedSeq* _non_young_other_cost_per_region_ms_seq;
  69 
  70   TruncatedSeq* _pending_cards_seq;
  71   TruncatedSeq* _rs_length_seq;
  72 
  73   TruncatedSeq* _cost_per_byte_ms_during_cm_seq;
  74 
  75   // Statistics kept per GC stoppage, pause or full.
  76   TruncatedSeq* _recent_prev_end_times_for_all_gcs_sec;
  77 
  78   TruncatedSeq* _survivor_ratio;
  79 
  80   // The ratio of gc time to elapsed time, computed over recent pauses,
  81   // and the ratio for just the last pause.
  82   double _recent_avg_pause_time_ratio;
  83   double _last_pause_time_ratio;
  84 
  85   // Returns whether the sequence have enough samples to get a "good" prediction.
  86   // The constant used is random but "small".
  87   bool enough_samples_available(TruncatedSeq const* seq) const;
  88 
  89   double predict_in_unit_interval(TruncatedSeq const* seq) const;
  90   size_t predict_size(TruncatedSeq const* seq) const;
  91   double predict_zero_bounded(TruncatedSeq const* seq) const;
  92 
  93 public:
  94   G1Analytics(const G1Predictions* predictor);
  95 
  96   double prev_collection_pause_end_ms() const {
  97     return _prev_collection_pause_end_ms;
  98   }
  99 


 111 
 112   void append_prev_collection_pause_end_ms(double ms) {
 113     _prev_collection_pause_end_ms += ms;
 114   }
 115 
 116   void report_concurrent_mark_remark_times_ms(double ms);
 117   void report_concurrent_mark_cleanup_times_ms(double ms);
 118   void report_alloc_rate_ms(double alloc_rate);
 119   void report_concurrent_refine_rate_ms(double cards_per_ms);
 120   void report_logged_cards_rate_ms(double cards_per_ms);
 121   void report_cost_per_card_scan_ms(double cost_per_remset_card_ms, bool for_young_gc);
 122   void report_cost_per_card_merge_ms(double cost_per_card_ms, bool for_young_gc);
 123   void report_card_merge_to_scan_ratio(double cards_per_entry_ratio, bool for_young_gc);
 124   void report_rs_length_diff(double rs_length_diff);
 125   void report_cost_per_byte_ms(double cost_per_byte_ms, bool mark_or_rebuild_in_progress);
 126   void report_young_other_cost_per_region_ms(double other_cost_per_region_ms);
 127   void report_non_young_other_cost_per_region_ms(double other_cost_per_region_ms);
 128   void report_constant_other_time_ms(double constant_other_time_ms);
 129   void report_pending_cards(double pending_cards);
 130   void report_rs_length(double rs_length);
 131   void report_survivor_ratio(double ratio);
 132 
 133   double predict_alloc_rate_ms() const;
 134   int num_alloc_rate_ms() const;
 135 
 136   double predict_concurrent_refine_rate_ms() const;
 137   double predict_logged_cards_rate_ms() const;
 138   double predict_young_card_merge_to_scan_ratio() const;
 139 
 140   double predict_mixed_card_merge_to_scan_ratio() const;
 141 
 142   size_t predict_scan_card_num(size_t rs_length, bool for_young_gc) const;
 143 
 144   double predict_card_merge_time_ms(size_t card_num, bool for_young_gc) const;
 145   double predict_card_scan_time_ms(size_t card_num, bool for_young_gc) const;
 146 
 147   double predict_object_copy_time_ms_during_cm(size_t bytes_to_copy) const;
 148 
 149   double predict_object_copy_time_ms(size_t bytes_to_copy, bool during_concurrent_mark) const;
 150 
 151   double predict_constant_other_time_ms() const;
 152 
 153   double predict_young_other_time_ms(size_t young_num) const;
 154 
 155   double predict_non_young_other_time_ms(size_t non_young_num) const;
 156 
 157   double predict_remark_time_ms() const;
 158 
 159   double predict_cleanup_time_ms() const;
 160 
 161   size_t predict_rs_length() const;
 162   size_t predict_pending_cards() const;
 163 
 164   double predict_survivor_ratio() const;  
 165 
 166   // Add a new GC of the given duration and end time to the record.
 167   void update_recent_gc_times(double end_time_sec, double elapsed_ms);
 168   void compute_pause_time_ratio(double interval_ms, double pause_time_ms);
 169 
 170   double last_known_gc_end_time_sec() const;
 171 };
 172 
 173 #endif // SHARE_GC_G1_G1ANALYTICS_HPP
< prev index next >