108
109 G1InitialMarkToMixedTimeTracker _initial_mark_to_mixed;
110
111 bool should_update_surv_rate_group_predictors() {
112 return collector_state()->in_young_only_phase() && !collector_state()->mark_or_rebuild_in_progress();
113 }
114 public:
115 const G1Predictions& predictor() const { return _predictor; }
116 const G1Analytics* analytics() const { return const_cast<const G1Analytics*>(_analytics); }
117
118 G1RemSetTrackingPolicy* remset_tracker() { return &_remset_tracker; }
119
120 // Add the given number of bytes to the total number of allocated bytes in the old gen.
121 void add_bytes_allocated_in_old_since_last_gc(size_t bytes) { _bytes_allocated_in_old_since_last_gc += bytes; }
122
123 void set_region_eden(HeapRegion* hr) {
124 hr->set_eden();
125 hr->install_surv_rate_group(_short_lived_surv_rate_group);
126 }
127
128 void set_region_survivor(HeapRegion* hr) {
129 assert(hr->is_survivor(), "pre-condition");
130 hr->install_surv_rate_group(_survivor_surv_rate_group);
131 }
132
133 void record_max_rs_lengths(size_t rs_lengths) {
134 _max_rs_lengths = rs_lengths;
135 }
136
137 double predict_base_elapsed_time_ms(size_t pending_cards) const;
138 double predict_base_elapsed_time_ms(size_t pending_cards,
139 size_t scanned_cards) const;
140 size_t predict_bytes_to_copy(HeapRegion* hr) const;
141 double predict_region_elapsed_time_ms(HeapRegion* hr, bool for_young_gc) const;
142
143 double predict_survivor_regions_evac_time() const;
144
145 void cset_regions_freed() {
146 bool update = should_update_surv_rate_group_predictors();
147
|
108
109 G1InitialMarkToMixedTimeTracker _initial_mark_to_mixed;
110
111 bool should_update_surv_rate_group_predictors() {
112 return collector_state()->in_young_only_phase() && !collector_state()->mark_or_rebuild_in_progress();
113 }
114 public:
115 const G1Predictions& predictor() const { return _predictor; }
116 const G1Analytics* analytics() const { return const_cast<const G1Analytics*>(_analytics); }
117
118 G1RemSetTrackingPolicy* remset_tracker() { return &_remset_tracker; }
119
120 // Add the given number of bytes to the total number of allocated bytes in the old gen.
121 void add_bytes_allocated_in_old_since_last_gc(size_t bytes) { _bytes_allocated_in_old_since_last_gc += bytes; }
122
123 void set_region_eden(HeapRegion* hr) {
124 hr->set_eden();
125 hr->install_surv_rate_group(_short_lived_surv_rate_group);
126 }
127
128 void set_region_eden_from_survivor(HeapRegion* hr) {
129 hr->set_eden_pre_gc();
130
131 // The given heap region does not yet have a survivor surv rate group. So no need
132 // to uninstall it, but need to install eden surv rate group via retained version.
133 hr->install_surv_rate_group_for_retained(_short_lived_surv_rate_group);
134 }
135
136 void set_region_survivor(HeapRegion* hr) {
137 assert(hr->is_survivor(), "pre-condition");
138 hr->install_surv_rate_group(_survivor_surv_rate_group);
139 }
140
141 void record_max_rs_lengths(size_t rs_lengths) {
142 _max_rs_lengths = rs_lengths;
143 }
144
145 double predict_base_elapsed_time_ms(size_t pending_cards) const;
146 double predict_base_elapsed_time_ms(size_t pending_cards,
147 size_t scanned_cards) const;
148 size_t predict_bytes_to_copy(HeapRegion* hr) const;
149 double predict_region_elapsed_time_ms(HeapRegion* hr, bool for_young_gc) const;
150
151 double predict_survivor_regions_evac_time() const;
152
153 void cset_regions_freed() {
154 bool update = should_update_surv_rate_group_predictors();
155
|