184 size_t _inc_bytes_used_before;
185
186 // The RSet lengths recorded for regions in the CSet. It is updated
187 // by the thread that adds a new region to the CSet. We assume that
188 // only one thread can be allocating a new CSet region (currently,
189 // it does so after taking the Heap_lock) hence no need to
190 // synchronize updates to this field.
191 size_t _inc_recorded_rs_length;
192
193 // A concurrent refinement thread periodically samples the young
194 // region RSets and needs to update _inc_recorded_rs_length as
195 // the RSets grow. Instead of having to synchronize updates to that
196 // field we accumulate them in this field and add it to
197 // _inc_recorded_rs_length_diff at the start of a GC.
198 size_t _inc_recorded_rs_length_diff;
199
200 // The predicted elapsed time it will take to collect the regions in
201 // the CSet. This is updated by the thread that adds a new region to
202 // the CSet. See the comment for _inc_recorded_rs_length about
203 // MT-safety assumptions.
204 double _inc_predicted_elapsed_time_ms;
205
206 // See the comment for _inc_recorded_rs_length_diff.
207 double _inc_predicted_elapsed_time_ms_diff;
208
209 void set_recorded_rs_length(size_t rs_length);
210
211 G1CollectorState* collector_state();
212 G1GCPhaseTimes* phase_times();
213
214 void verify_young_cset_indices() const NOT_DEBUG_RETURN;
215
216 double predict_region_elapsed_time_ms(HeapRegion* hr);
217
218 // Update the incremental collection set information when adding a region.
219 void add_young_region_common(HeapRegion* hr);
220
221 // Add old region "hr" to the collection set.
222 void add_old_region(HeapRegion* hr);
223 void free_optional_regions();
224
225 // Add old region "hr" to optional collection set.
226 void add_optional_region(HeapRegion* hr);
227
228 void move_candidates_to_collection_set(uint num_regions);
229
230 // Finalize the young part of the initial collection set. Relabel survivor regions
231 // as Eden and calculate a prediction on how long the evacuation of all young regions
232 // will take.
233 double finalize_young_part(double target_pause_time_ms, G1SurvivorRegions* survivors);
234 // Perform any final calculations on the incremental collection set fields before we
235 // can use them.
236 void finalize_incremental_building();
|
184 size_t _inc_bytes_used_before;
185
186 // The RSet lengths recorded for regions in the CSet. It is updated
187 // by the thread that adds a new region to the CSet. We assume that
188 // only one thread can be allocating a new CSet region (currently,
189 // it does so after taking the Heap_lock) hence no need to
190 // synchronize updates to this field.
191 size_t _inc_recorded_rs_length;
192
193 // A concurrent refinement thread periodically samples the young
194 // region RSets and needs to update _inc_recorded_rs_length as
195 // the RSets grow. Instead of having to synchronize updates to that
196 // field we accumulate them in this field and add it to
197 // _inc_recorded_rs_length_diff at the start of a GC.
198 size_t _inc_recorded_rs_length_diff;
199
200 // The predicted elapsed time it will take to collect the regions in
201 // the CSet. This is updated by the thread that adds a new region to
202 // the CSet. See the comment for _inc_recorded_rs_length about
203 // MT-safety assumptions.
204 double _inc_predicted_non_copy_time_ms;
205
206 // See the comment for _inc_recorded_rs_length_diff.
207 double _inc_predicted_non_copy_time_ms_diff;
208
209 void set_recorded_rs_length(size_t rs_length);
210
211 G1CollectorState* collector_state() const;
212 G1GCPhaseTimes* phase_times();
213
214 void verify_young_cset_indices() const NOT_DEBUG_RETURN;
215
216 double predict_region_non_copy_time_ms(HeapRegion* hr) const;
217
218 // Update the incremental collection set information when adding a region.
219 void add_young_region_common(HeapRegion* hr);
220
221 // Add old region "hr" to the collection set.
222 void add_old_region(HeapRegion* hr);
223 void free_optional_regions();
224
225 // Add old region "hr" to optional collection set.
226 void add_optional_region(HeapRegion* hr);
227
228 void move_candidates_to_collection_set(uint num_regions);
229
230 // Finalize the young part of the initial collection set. Relabel survivor regions
231 // as Eden and calculate a prediction on how long the evacuation of all young regions
232 // will take.
233 double finalize_young_part(double target_pause_time_ms, G1SurvivorRegions* survivors);
234 // Perform any final calculations on the incremental collection set fields before we
235 // can use them.
236 void finalize_incremental_building();
|