< prev index next >

src/hotspot/share/gc/g1/g1EvacFailure.cpp

Print this page




 203     _g1h(G1CollectedHeap::heap()),
 204     _dcq(&_g1h->dirty_card_queue_set()),
 205     _update_rset_cl(&_dcq),
 206     _worker_id(worker_id),
 207     _hrclaimer(hrclaimer) {
 208   }
 209 
 210   size_t remove_self_forward_ptr_by_walking_hr(HeapRegion* hr,
 211                                                bool during_initial_mark) {
 212     RemoveSelfForwardPtrObjClosure rspc(hr,
 213                                         &_update_rset_cl,
 214                                         during_initial_mark,
 215                                         _worker_id);
 216     hr->object_iterate(&rspc);
 217     // Need to zap the remainder area of the processed region.
 218     rspc.zap_remainder();
 219 
 220     return rspc.marked_bytes();
 221   }
 222 
 223   bool do_heap_region(HeapRegion *hr) {
 224     assert(!hr->is_pinned(), "Unexpected pinned region at index %u", hr->hrm_index());
 225     assert(hr->in_collection_set(), "bad CS");
 226 
 227     if (_hrclaimer->claim_region(hr->hrm_index())) {
 228       if (hr->evacuation_failed()) {
 229         bool during_initial_mark = _g1h->collector_state()->during_initial_mark_pause();
 230         bool during_conc_mark = _g1h->collector_state()->mark_in_progress();
 231 
 232         hr->note_self_forwarding_removal_start(during_initial_mark,
 233                                                during_conc_mark);
 234         _g1h->verifier()->check_bitmaps("Self-Forwarding Ptr Removal", hr);
 235 
 236         hr->reset_bot();
 237 
 238         size_t live_bytes = remove_self_forward_ptr_by_walking_hr(hr, during_initial_mark);
 239 
 240         hr->rem_set()->clean_strong_code_roots(hr);
 241 
 242         hr->note_self_forwarding_removal_end(live_bytes);
 243       }


 203     _g1h(G1CollectedHeap::heap()),
 204     _dcq(&_g1h->dirty_card_queue_set()),
 205     _update_rset_cl(&_dcq),
 206     _worker_id(worker_id),
 207     _hrclaimer(hrclaimer) {
 208   }
 209 
 210   size_t remove_self_forward_ptr_by_walking_hr(HeapRegion* hr,
 211                                                bool during_initial_mark) {
 212     RemoveSelfForwardPtrObjClosure rspc(hr,
 213                                         &_update_rset_cl,
 214                                         during_initial_mark,
 215                                         _worker_id);
 216     hr->object_iterate(&rspc);
 217     // Need to zap the remainder area of the processed region.
 218     rspc.zap_remainder();
 219 
 220     return rspc.marked_bytes();
 221   }
 222 
 223   bool doHeapRegion(HeapRegion *hr) {
 224     assert(!hr->is_pinned(), "Unexpected pinned region at index %u", hr->hrm_index());
 225     assert(hr->in_collection_set(), "bad CS");
 226 
 227     if (_hrclaimer->claim_region(hr->hrm_index())) {
 228       if (hr->evacuation_failed()) {
 229         bool during_initial_mark = _g1h->collector_state()->during_initial_mark_pause();
 230         bool during_conc_mark = _g1h->collector_state()->mark_in_progress();
 231 
 232         hr->note_self_forwarding_removal_start(during_initial_mark,
 233                                                during_conc_mark);
 234         _g1h->verifier()->check_bitmaps("Self-Forwarding Ptr Removal", hr);
 235 
 236         hr->reset_bot();
 237 
 238         size_t live_bytes = remove_self_forward_ptr_by_walking_hr(hr, during_initial_mark);
 239 
 240         hr->rem_set()->clean_strong_code_roots(hr);
 241 
 242         hr->note_self_forwarding_removal_end(live_bytes);
 243       }
< prev index next >