< prev index next >

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

Print this page
rev 54081 : imported patch 8220301-remove-jbyte-use-cardtable
rev 54087 : imported patch 8218668-reorganize-collection-set


 211 
 212   size_t remove_self_forward_ptr_by_walking_hr(HeapRegion* hr,
 213                                                bool during_initial_mark) {
 214     RemoveSelfForwardPtrObjClosure rspc(hr,
 215                                         &_update_rset_cl,
 216                                         during_initial_mark,
 217                                         _worker_id);
 218     hr->object_iterate(&rspc);
 219     // Need to zap the remainder area of the processed region.
 220     rspc.zap_remainder();
 221 
 222     return rspc.marked_bytes();
 223   }
 224 
 225   bool do_heap_region(HeapRegion *hr) {
 226     assert(!hr->is_pinned(), "Unexpected pinned region at index %u", hr->hrm_index());
 227     assert(hr->in_collection_set(), "bad CS");
 228 
 229     if (_hrclaimer->claim_region(hr->hrm_index())) {
 230       if (hr->evacuation_failed()) {


 231         bool during_initial_mark = _g1h->collector_state()->in_initial_mark_gc();
 232         bool during_conc_mark = _g1h->collector_state()->mark_or_rebuild_in_progress();
 233 
 234         hr->note_self_forwarding_removal_start(during_initial_mark,
 235                                                during_conc_mark);
 236         _g1h->verifier()->check_bitmaps("Self-Forwarding Ptr Removal", hr);
 237 
 238         hr->reset_bot();
 239 
 240         size_t live_bytes = remove_self_forward_ptr_by_walking_hr(hr, during_initial_mark);
 241 
 242         hr->rem_set()->clean_strong_code_roots(hr);
 243         hr->rem_set()->clear_locked(true);
 244 
 245         hr->note_self_forwarding_removal_end(live_bytes);
 246       }
 247     }
 248     return false;
 249   }
 250 };


 211 
 212   size_t remove_self_forward_ptr_by_walking_hr(HeapRegion* hr,
 213                                                bool during_initial_mark) {
 214     RemoveSelfForwardPtrObjClosure rspc(hr,
 215                                         &_update_rset_cl,
 216                                         during_initial_mark,
 217                                         _worker_id);
 218     hr->object_iterate(&rspc);
 219     // Need to zap the remainder area of the processed region.
 220     rspc.zap_remainder();
 221 
 222     return rspc.marked_bytes();
 223   }
 224 
 225   bool do_heap_region(HeapRegion *hr) {
 226     assert(!hr->is_pinned(), "Unexpected pinned region at index %u", hr->hrm_index());
 227     assert(hr->in_collection_set(), "bad CS");
 228 
 229     if (_hrclaimer->claim_region(hr->hrm_index())) {
 230       if (hr->evacuation_failed()) {
 231         hr->clear_index_in_opt_cset();
 232 
 233         bool during_initial_mark = _g1h->collector_state()->in_initial_mark_gc();
 234         bool during_conc_mark = _g1h->collector_state()->mark_or_rebuild_in_progress();
 235 
 236         hr->note_self_forwarding_removal_start(during_initial_mark,
 237                                                during_conc_mark);
 238         _g1h->verifier()->check_bitmaps("Self-Forwarding Ptr Removal", hr);
 239 
 240         hr->reset_bot();
 241 
 242         size_t live_bytes = remove_self_forward_ptr_by_walking_hr(hr, during_initial_mark);
 243 
 244         hr->rem_set()->clean_strong_code_roots(hr);
 245         hr->rem_set()->clear_locked(true);
 246 
 247         hr->note_self_forwarding_removal_end(live_bytes);
 248       }
 249     }
 250     return false;
 251   }
 252 };
< prev index next >