< prev index next >

src/share/vm/gc/g1/g1DefaultPolicy.hpp

Print this page
rev 11552 : imported patch 8159978-collection-set-as-array


  72   uint _young_list_max_length;
  73 
  74   // SurvRateGroups below must be initialized after the predictor because they
  75   // indirectly use it through this object passed to their constructor.
  76   SurvRateGroup* _short_lived_surv_rate_group;
  77   SurvRateGroup* _survivor_surv_rate_group;
  78 
  79   double _reserve_factor;
  80   // This will be set when the heap is expanded
  81   // for the first time during initialization.
  82   uint   _reserve_regions;
  83 
  84   G1YoungGenSizer _young_gen_sizer;
  85 
  86   uint _free_regions_at_end_of_collection;
  87 
  88   size_t _max_rs_lengths;
  89 
  90   size_t _rs_lengths_prediction;
  91 
  92 #ifndef PRODUCT
  93   bool verify_young_ages(HeapRegion* head, SurvRateGroup *surv_rate_group);
  94 #endif // PRODUCT
  95 
  96   size_t _pending_cards;
  97 
  98   // The amount of allocated bytes in old gen during the last mutator and the following
  99   // young GC phase.
 100   size_t _bytes_allocated_in_old_since_last_gc;
 101 
 102   G1InitialMarkToMixedTimeTracker _initial_mark_to_mixed;
 103 public:
 104   const G1Predictions& predictor() const { return _predictor; }
 105   const G1Analytics* analytics()   const { return const_cast<const G1Analytics*>(_analytics); }
 106 
 107   void add_bytes_allocated_in_old_since_last_gc(size_t bytes) { _bytes_allocated_in_old_since_last_gc += bytes; }
 108 
 109   void set_region_eden(HeapRegion* hr) {
 110     hr->set_eden();
 111     hr->install_surv_rate_group(_short_lived_surv_rate_group);
 112   }
 113 
 114   void set_region_survivor(HeapRegion* hr) {
 115     assert(hr->is_survivor(), "pre-condition");
 116     hr->install_surv_rate_group(_survivor_surv_rate_group);
 117   }
 118 
 119 #ifndef PRODUCT
 120   bool verify_young_ages();
 121 #endif // PRODUCT
 122 
 123   void record_max_rs_lengths(size_t rs_lengths) {
 124     _max_rs_lengths = rs_lengths;
 125   }
 126 
 127 
 128   double predict_base_elapsed_time_ms(size_t pending_cards) const;
 129   double predict_base_elapsed_time_ms(size_t pending_cards,
 130                                       size_t scanned_cards) const;
 131   size_t predict_bytes_to_copy(HeapRegion* hr) const;
 132   double predict_region_elapsed_time_ms(HeapRegion* hr, bool for_young_gc) const;
 133 
 134   double predict_survivor_regions_evac_time() const;
 135 
 136   bool should_update_surv_rate_group_predictors() {
 137     return collector_state()->last_gc_was_young() && !collector_state()->in_marking_window();
 138   }
 139 
 140   void cset_regions_freed() {
 141     bool update = should_update_surv_rate_group_predictors();




  72   uint _young_list_max_length;
  73 
  74   // SurvRateGroups below must be initialized after the predictor because they
  75   // indirectly use it through this object passed to their constructor.
  76   SurvRateGroup* _short_lived_surv_rate_group;
  77   SurvRateGroup* _survivor_surv_rate_group;
  78 
  79   double _reserve_factor;
  80   // This will be set when the heap is expanded
  81   // for the first time during initialization.
  82   uint   _reserve_regions;
  83 
  84   G1YoungGenSizer _young_gen_sizer;
  85 
  86   uint _free_regions_at_end_of_collection;
  87 
  88   size_t _max_rs_lengths;
  89 
  90   size_t _rs_lengths_prediction;
  91 




  92   size_t _pending_cards;
  93 
  94   // The amount of allocated bytes in old gen during the last mutator and the following
  95   // young GC phase.
  96   size_t _bytes_allocated_in_old_since_last_gc;
  97 
  98   G1InitialMarkToMixedTimeTracker _initial_mark_to_mixed;
  99 public:
 100   const G1Predictions& predictor() const { return _predictor; }
 101   const G1Analytics* analytics()   const { return const_cast<const G1Analytics*>(_analytics); }
 102 
 103   void add_bytes_allocated_in_old_since_last_gc(size_t bytes) { _bytes_allocated_in_old_since_last_gc += bytes; }
 104 
 105   void set_region_eden(HeapRegion* hr) {
 106     hr->set_eden();
 107     hr->install_surv_rate_group(_short_lived_surv_rate_group);
 108   }
 109 
 110   void set_region_survivor(HeapRegion* hr) {
 111     assert(hr->is_survivor(), "pre-condition");
 112     hr->install_surv_rate_group(_survivor_surv_rate_group);
 113   }




 114 
 115   void record_max_rs_lengths(size_t rs_lengths) {
 116     _max_rs_lengths = rs_lengths;
 117   }
 118 
 119 
 120   double predict_base_elapsed_time_ms(size_t pending_cards) const;
 121   double predict_base_elapsed_time_ms(size_t pending_cards,
 122                                       size_t scanned_cards) const;
 123   size_t predict_bytes_to_copy(HeapRegion* hr) const;
 124   double predict_region_elapsed_time_ms(HeapRegion* hr, bool for_young_gc) const;
 125 
 126   double predict_survivor_regions_evac_time() const;
 127 
 128   bool should_update_surv_rate_group_predictors() {
 129     return collector_state()->last_gc_was_young() && !collector_state()->in_marking_window();
 130   }
 131 
 132   void cset_regions_freed() {
 133     bool update = should_update_surv_rate_group_predictors();


< prev index next >