206 _worker_id);
207 _update_rset_cl.set_region(hr);
208 hr->object_iterate(&rspc);
209 // Need to zap the remainder area of the processed region.
210 rspc.zap_remainder();
211
212 return rspc.marked_bytes();
213 }
214
215 bool doHeapRegion(HeapRegion *hr) {
216 bool during_initial_mark = _g1h->collector_state()->during_initial_mark_pause();
217 bool during_conc_mark = _g1h->collector_state()->mark_in_progress();
218
219 assert(!hr->is_pinned(), "Unexpected pinned region at index %u", hr->hrm_index());
220 assert(hr->in_collection_set(), "bad CS");
221
222 if (_hrclaimer->claim_region(hr->hrm_index())) {
223 if (hr->evacuation_failed()) {
224 hr->note_self_forwarding_removal_start(during_initial_mark,
225 during_conc_mark);
226 _g1h->check_bitmaps("Self-Forwarding Ptr Removal", hr);
227
228 // In the common case (i.e. when there is no evacuation
229 // failure) we make sure that the following is done when
230 // the region is freed so that it is "ready-to-go" when it's
231 // re-allocated. However, when evacuation failure happens, a
232 // region will remain in the heap and might ultimately be added
233 // to a CSet in the future. So we have to be careful here and
234 // make sure the region's RSet is ready for parallel iteration
235 // whenever this might be required in the future.
236 hr->rem_set()->reset_for_par_iteration();
237 hr->reset_bot();
238
239 size_t live_bytes = remove_self_forward_ptr_by_walking_hr(hr, during_initial_mark);
240
241 hr->rem_set()->clean_strong_code_roots(hr);
242
243 hr->note_self_forwarding_removal_end(during_initial_mark,
244 during_conc_mark,
245 live_bytes);
246 }
|
206 _worker_id);
207 _update_rset_cl.set_region(hr);
208 hr->object_iterate(&rspc);
209 // Need to zap the remainder area of the processed region.
210 rspc.zap_remainder();
211
212 return rspc.marked_bytes();
213 }
214
215 bool doHeapRegion(HeapRegion *hr) {
216 bool during_initial_mark = _g1h->collector_state()->during_initial_mark_pause();
217 bool during_conc_mark = _g1h->collector_state()->mark_in_progress();
218
219 assert(!hr->is_pinned(), "Unexpected pinned region at index %u", hr->hrm_index());
220 assert(hr->in_collection_set(), "bad CS");
221
222 if (_hrclaimer->claim_region(hr->hrm_index())) {
223 if (hr->evacuation_failed()) {
224 hr->note_self_forwarding_removal_start(during_initial_mark,
225 during_conc_mark);
226 _g1h->verifier()->check_bitmaps("Self-Forwarding Ptr Removal", hr);
227
228 // In the common case (i.e. when there is no evacuation
229 // failure) we make sure that the following is done when
230 // the region is freed so that it is "ready-to-go" when it's
231 // re-allocated. However, when evacuation failure happens, a
232 // region will remain in the heap and might ultimately be added
233 // to a CSet in the future. So we have to be careful here and
234 // make sure the region's RSet is ready for parallel iteration
235 // whenever this might be required in the future.
236 hr->rem_set()->reset_for_par_iteration();
237 hr->reset_bot();
238
239 size_t live_bytes = remove_self_forward_ptr_by_walking_hr(hr, during_initial_mark);
240
241 hr->rem_set()->clean_strong_code_roots(hr);
242
243 hr->note_self_forwarding_removal_end(during_initial_mark,
244 during_conc_mark,
245 live_bytes);
246 }
|