< prev index next >

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

Print this page

 77     zap_dead_objects(_last_forwarded_object_end, obj_addr);
 78     // We consider all objects that we find self-forwarded to be
 79     // live. What we'll do is that we'll update the prev marking
 80     // info so that they are all under PTAMS and explicitly marked.
 81     if (!_cm->is_marked_in_prev_bitmap(obj)) {
 82       _cm->mark_in_prev_bitmap(obj);
 83     }
 84     if (_during_concurrent_start) {
 85       // For the next marking info we'll only mark the
 86       // self-forwarded objects explicitly if we are during
 87       // concurrent start (since, normally, we only mark objects pointed
 88       // to by roots if we succeed in copying them). By marking all
 89       // self-forwarded objects we ensure that we mark any that are
 90       // still pointed to be roots. During concurrent marking, and
 91       // after concurrent start, we don't need to mark any objects
 92       // explicitly and all objects in the CSet are considered
 93       // (implicitly) live. So, we won't mark them explicitly and
 94       // we'll leave them over NTAMS.
 95       _cm->mark_in_next_bitmap(_worker_id, _hr, obj);
 96     }

 97     size_t obj_size = obj->size();
 98 
 99     _marked_words += obj_size;
100     PreservedMarks::init_forwarded_mark(obj);
101 
102     HeapWord* obj_end = obj_addr + obj_size;
103     _last_forwarded_object_end = obj_end;
104     _hr->alloc_block_in_bot(obj_addr, obj_end);
105   }
106 
107   // Fill the memory area from start to end with filler objects, and update the BOT
108   // and the mark bitmap accordingly.
109   void zap_dead_objects(HeapWord* start, HeapWord* end) {
110     if (start == end) {
111       return;
112     }
113 
114     size_t gap_size = pointer_delta(end, start);
115     MemRegion mr(start, gap_size);
116     if (gap_size >= CollectedHeap::min_fill_size()) {
117       CollectedHeap::fill_with_objects(start, gap_size);
118 
119       HeapWord* end_first_obj = start + cast_to_oop(start)->size();
120       _hr->alloc_block_in_bot(start, end_first_obj);

 77     zap_dead_objects(_last_forwarded_object_end, obj_addr);
 78     // We consider all objects that we find self-forwarded to be
 79     // live. What we'll do is that we'll update the prev marking
 80     // info so that they are all under PTAMS and explicitly marked.
 81     if (!_cm->is_marked_in_prev_bitmap(obj)) {
 82       _cm->mark_in_prev_bitmap(obj);
 83     }
 84     if (_during_concurrent_start) {
 85       // For the next marking info we'll only mark the
 86       // self-forwarded objects explicitly if we are during
 87       // concurrent start (since, normally, we only mark objects pointed
 88       // to by roots if we succeed in copying them). By marking all
 89       // self-forwarded objects we ensure that we mark any that are
 90       // still pointed to be roots. During concurrent marking, and
 91       // after concurrent start, we don't need to mark any objects
 92       // explicitly and all objects in the CSet are considered
 93       // (implicitly) live. So, we won't mark them explicitly and
 94       // we'll leave them over NTAMS.
 95       _cm->mark_in_next_bitmap(_worker_id, _hr, obj);
 96     }
 97     PreservedMarks::init_forwarded_mark(obj);
 98     size_t obj_size = obj->size();
 99 
100     _marked_words += obj_size;

101 
102     HeapWord* obj_end = obj_addr + obj_size;
103     _last_forwarded_object_end = obj_end;
104     _hr->alloc_block_in_bot(obj_addr, obj_end);
105   }
106 
107   // Fill the memory area from start to end with filler objects, and update the BOT
108   // and the mark bitmap accordingly.
109   void zap_dead_objects(HeapWord* start, HeapWord* end) {
110     if (start == end) {
111       return;
112     }
113 
114     size_t gap_size = pointer_delta(end, start);
115     MemRegion mr(start, gap_size);
116     if (gap_size >= CollectedHeap::min_fill_size()) {
117       CollectedHeap::fill_with_objects(start, gap_size);
118 
119       HeapWord* end_first_obj = start + cast_to_oop(start)->size();
120       _hr->alloc_block_in_bot(start, end_first_obj);
< prev index next >