140 // explicitly and all objects in the CSet are considered
141 // (implicitly) live. So, we won't mark them explicitly and
142 // we'll leave them over NTAMS.
143 _cm->grayRoot(obj, obj_size, _worker_id, _hr);
144 }
145 _marked_bytes += (obj_size * HeapWordSize);
146 obj->set_mark(markOopDesc::prototype());
147
148 // While we were processing RSet buffers during the collection,
149 // we actually didn't scan any cards on the collection set,
150 // since we didn't want to update remembered sets with entries
151 // that point into the collection set, given that live objects
152 // from the collection set are about to move and such entries
153 // will be stale very soon.
154 // This change also dealt with a reliability issue which
155 // involved scanning a card in the collection set and coming
156 // across an array that was being chunked and looking malformed.
157 // The problem is that, if evacuation fails, we might have
158 // remembered set entries missing given that we skipped cards on
159 // the collection set. So, we'll recreate such entries now.
160 obj->oop_iterate(_update_rset_cl);
161 } else {
162
163 // The object has been either evacuated or is dead. Fill it with a
164 // dummy object.
165 MemRegion mr(obj_addr, obj_size);
166 CollectedHeap::fill_with_object(mr);
167
168 // must nuke all dead objects which we skipped when iterating over the region
169 _cm->clearRangePrevBitmap(MemRegion(_end_of_last_gap, obj_end));
170 }
171 _end_of_last_gap = obj_end;
172 _last_obj_threshold = _hr->cross_threshold(obj_addr, obj_end);
173 }
174 };
175
176 class RemoveSelfForwardPtrHRClosure: public HeapRegionClosure {
177 G1CollectedHeap* _g1h;
178 ConcurrentMark* _cm;
179 OopsInHeapRegionClosure *_update_rset_cl;
180 uint _worker_id;
|
140 // explicitly and all objects in the CSet are considered
141 // (implicitly) live. So, we won't mark them explicitly and
142 // we'll leave them over NTAMS.
143 _cm->grayRoot(obj, obj_size, _worker_id, _hr);
144 }
145 _marked_bytes += (obj_size * HeapWordSize);
146 obj->set_mark(markOopDesc::prototype());
147
148 // While we were processing RSet buffers during the collection,
149 // we actually didn't scan any cards on the collection set,
150 // since we didn't want to update remembered sets with entries
151 // that point into the collection set, given that live objects
152 // from the collection set are about to move and such entries
153 // will be stale very soon.
154 // This change also dealt with a reliability issue which
155 // involved scanning a card in the collection set and coming
156 // across an array that was being chunked and looking malformed.
157 // The problem is that, if evacuation fails, we might have
158 // remembered set entries missing given that we skipped cards on
159 // the collection set. So, we'll recreate such entries now.
160 obj->oop_iterate<false>(_update_rset_cl);
161 } else {
162
163 // The object has been either evacuated or is dead. Fill it with a
164 // dummy object.
165 MemRegion mr(obj_addr, obj_size);
166 CollectedHeap::fill_with_object(mr);
167
168 // must nuke all dead objects which we skipped when iterating over the region
169 _cm->clearRangePrevBitmap(MemRegion(_end_of_last_gap, obj_end));
170 }
171 _end_of_last_gap = obj_end;
172 _last_obj_threshold = _hr->cross_threshold(obj_addr, obj_end);
173 }
174 };
175
176 class RemoveSelfForwardPtrHRClosure: public HeapRegionClosure {
177 G1CollectedHeap* _g1h;
178 ConcurrentMark* _cm;
179 OopsInHeapRegionClosure *_update_rset_cl;
180 uint _worker_id;
|