src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Sdiff src/share/vm/gc_implementation/g1

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

Print this page




  99 // the heap size changes, the limits for the young gen size will be
 100 // recalculated.
 101 //
 102 // If only -XX:NewSize is set we should use the specified value as the
 103 // minimum size for young gen. Still using G1MaxNewSizePercent of the
 104 // heap as maximum.
 105 //
 106 // If only -XX:MaxNewSize is set we should use the specified value as the
 107 // maximum size for young gen. Still using G1NewSizePercent of the heap
 108 // as minimum.
 109 //
 110 // If -XX:NewSize and -XX:MaxNewSize are both specified we use these values.
 111 // No updates when the heap size changes. There is a special case when
 112 // NewSize==MaxNewSize. This is interpreted as "fixed" and will use a
 113 // different heuristic for calculating the collection set when we do mixed
 114 // collection.
 115 //
 116 // If only -XX:NewRatio is set we should use the specified ratio of the heap
 117 // as both min and max. This will be interpreted as "fixed" just like the
 118 // NewSize==MaxNewSize case above. But we will update the min and max
 119 // everytime the heap size changes.
 120 //
 121 // NewSize and MaxNewSize override NewRatio. So, NewRatio is ignored if it is
 122 // combined with either NewSize or MaxNewSize. (A warning message is printed.)
 123 class G1YoungGenSizer : public CHeapObj<mtGC> {
 124 private:
 125   enum SizerKind {
 126     SizerDefaults,
 127     SizerNewSizeOnly,
 128     SizerMaxNewSizeOnly,
 129     SizerMaxAndNewSize,
 130     SizerNewRatio
 131   };
 132   SizerKind _sizer_kind;
 133   uint _min_desired_young_length;
 134   uint _max_desired_young_length;
 135   bool _adaptive_size;
 136   uint calculate_default_min_length(uint new_number_of_heap_regions);
 137   uint calculate_default_max_length(uint new_number_of_heap_regions);
 138 
 139 public:


 200 
 201   bool                  _last_gc_was_young;
 202 
 203   bool                  _during_marking;
 204   bool                  _in_marking_window;
 205   bool                  _in_marking_window_im;
 206 
 207   SurvRateGroup*        _short_lived_surv_rate_group;
 208   SurvRateGroup*        _survivor_surv_rate_group;
 209   // add here any more surv rate groups
 210 
 211   double                _gc_overhead_perc;
 212 
 213   double _reserve_factor;
 214   uint _reserve_regions;
 215 
 216   bool during_marking() {
 217     return _during_marking;
 218   }
 219 
 220 private:
 221   enum PredictionConstants {
 222     TruncatedSeqLength = 10
 223   };
 224 
 225   TruncatedSeq* _alloc_rate_ms_seq;
 226   double        _prev_collection_pause_end_ms;
 227 
 228   TruncatedSeq* _rs_length_diff_seq;
 229   TruncatedSeq* _cost_per_card_ms_seq;
 230   TruncatedSeq* _young_cards_per_entry_ratio_seq;
 231   TruncatedSeq* _mixed_cards_per_entry_ratio_seq;
 232   TruncatedSeq* _cost_per_entry_ms_seq;
 233   TruncatedSeq* _mixed_cost_per_entry_ms_seq;
 234   TruncatedSeq* _cost_per_byte_ms_seq;
 235   TruncatedSeq* _constant_other_time_ms_seq;
 236   TruncatedSeq* _young_other_cost_per_region_ms_seq;
 237   TruncatedSeq* _non_young_other_cost_per_region_ms_seq;
 238 
 239   TruncatedSeq* _pending_cards_seq;
 240   TruncatedSeq* _rs_lengths_seq;




  99 // the heap size changes, the limits for the young gen size will be
 100 // recalculated.
 101 //
 102 // If only -XX:NewSize is set we should use the specified value as the
 103 // minimum size for young gen. Still using G1MaxNewSizePercent of the
 104 // heap as maximum.
 105 //
 106 // If only -XX:MaxNewSize is set we should use the specified value as the
 107 // maximum size for young gen. Still using G1NewSizePercent of the heap
 108 // as minimum.
 109 //
 110 // If -XX:NewSize and -XX:MaxNewSize are both specified we use these values.
 111 // No updates when the heap size changes. There is a special case when
 112 // NewSize==MaxNewSize. This is interpreted as "fixed" and will use a
 113 // different heuristic for calculating the collection set when we do mixed
 114 // collection.
 115 //
 116 // If only -XX:NewRatio is set we should use the specified ratio of the heap
 117 // as both min and max. This will be interpreted as "fixed" just like the
 118 // NewSize==MaxNewSize case above. But we will update the min and max
 119 // every time the heap size changes.
 120 //
 121 // NewSize and MaxNewSize override NewRatio. So, NewRatio is ignored if it is
 122 // combined with either NewSize or MaxNewSize. (A warning message is printed.)
 123 class G1YoungGenSizer : public CHeapObj<mtGC> {
 124 private:
 125   enum SizerKind {
 126     SizerDefaults,
 127     SizerNewSizeOnly,
 128     SizerMaxNewSizeOnly,
 129     SizerMaxAndNewSize,
 130     SizerNewRatio
 131   };
 132   SizerKind _sizer_kind;
 133   uint _min_desired_young_length;
 134   uint _max_desired_young_length;
 135   bool _adaptive_size;
 136   uint calculate_default_min_length(uint new_number_of_heap_regions);
 137   uint calculate_default_max_length(uint new_number_of_heap_regions);
 138 
 139 public:


 200 
 201   bool                  _last_gc_was_young;
 202 
 203   bool                  _during_marking;
 204   bool                  _in_marking_window;
 205   bool                  _in_marking_window_im;
 206 
 207   SurvRateGroup*        _short_lived_surv_rate_group;
 208   SurvRateGroup*        _survivor_surv_rate_group;
 209   // add here any more surv rate groups
 210 
 211   double                _gc_overhead_perc;
 212 
 213   double _reserve_factor;
 214   uint _reserve_regions;
 215 
 216   bool during_marking() {
 217     return _during_marking;
 218   }
 219 

 220   enum PredictionConstants {
 221     TruncatedSeqLength = 10
 222   };
 223 
 224   TruncatedSeq* _alloc_rate_ms_seq;
 225   double        _prev_collection_pause_end_ms;
 226 
 227   TruncatedSeq* _rs_length_diff_seq;
 228   TruncatedSeq* _cost_per_card_ms_seq;
 229   TruncatedSeq* _young_cards_per_entry_ratio_seq;
 230   TruncatedSeq* _mixed_cards_per_entry_ratio_seq;
 231   TruncatedSeq* _cost_per_entry_ms_seq;
 232   TruncatedSeq* _mixed_cost_per_entry_ms_seq;
 233   TruncatedSeq* _cost_per_byte_ms_seq;
 234   TruncatedSeq* _constant_other_time_ms_seq;
 235   TruncatedSeq* _young_other_cost_per_region_ms_seq;
 236   TruncatedSeq* _non_young_other_cost_per_region_ms_seq;
 237 
 238   TruncatedSeq* _pending_cards_seq;
 239   TruncatedSeq* _rs_lengths_seq;


src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File