177 }
178 check_limits();
179 }
180
181 inline size_t G1CMTask::scan_objArray(objArrayOop obj, MemRegion mr) {
182 obj->oop_iterate(_cm_oop_closure, mr);
183 return mr.word_size();
184 }
185
186 inline HeapWord* G1ConcurrentMark::top_at_rebuild_start(uint region) const {
187 assert(region < _g1h->max_regions(), "Tried to access TARS for region %u out of bounds", region);
188 return _top_at_rebuild_starts[region];
189 }
190
191 inline void G1ConcurrentMark::update_top_at_rebuild_start(HeapRegion* r) {
192 uint const region = r->hrm_index();
193 assert(region < _g1h->max_regions(), "Tried to access TARS for region %u out of bounds", region);
194 assert(_top_at_rebuild_starts[region] == NULL,
195 "TARS for region %u has already been set to " PTR_FORMAT " should be NULL",
196 region, p2i(_top_at_rebuild_starts[region]));
197 G1RemSetTrackingPolicy* tracker = _g1h->g1_policy()->remset_tracker();
198 if (tracker->needs_scan_for_rebuild(r)) {
199 _top_at_rebuild_starts[region] = r->top();
200 } else {
201 // Leave TARS at NULL.
202 }
203 }
204
205 inline void G1CMTask::update_liveness(oop const obj, const size_t obj_size) {
206 _mark_stats_cache.add_live_words(_g1h->addr_to_region((HeapWord*)obj), obj_size);
207 }
208
209 inline void G1ConcurrentMark::add_to_liveness(uint worker_id, oop const obj, size_t size) {
210 task(worker_id)->update_liveness(obj, size);
211 }
212
213 inline void G1CMTask::abort_marking_if_regular_check_fail() {
214 if (!regular_clock_call()) {
215 set_has_aborted();
216 }
217 }
|
177 }
178 check_limits();
179 }
180
181 inline size_t G1CMTask::scan_objArray(objArrayOop obj, MemRegion mr) {
182 obj->oop_iterate(_cm_oop_closure, mr);
183 return mr.word_size();
184 }
185
186 inline HeapWord* G1ConcurrentMark::top_at_rebuild_start(uint region) const {
187 assert(region < _g1h->max_regions(), "Tried to access TARS for region %u out of bounds", region);
188 return _top_at_rebuild_starts[region];
189 }
190
191 inline void G1ConcurrentMark::update_top_at_rebuild_start(HeapRegion* r) {
192 uint const region = r->hrm_index();
193 assert(region < _g1h->max_regions(), "Tried to access TARS for region %u out of bounds", region);
194 assert(_top_at_rebuild_starts[region] == NULL,
195 "TARS for region %u has already been set to " PTR_FORMAT " should be NULL",
196 region, p2i(_top_at_rebuild_starts[region]));
197 G1RemSetTrackingPolicy* tracker = _g1h->policy()->remset_tracker();
198 if (tracker->needs_scan_for_rebuild(r)) {
199 _top_at_rebuild_starts[region] = r->top();
200 } else {
201 // Leave TARS at NULL.
202 }
203 }
204
205 inline void G1CMTask::update_liveness(oop const obj, const size_t obj_size) {
206 _mark_stats_cache.add_live_words(_g1h->addr_to_region((HeapWord*)obj), obj_size);
207 }
208
209 inline void G1ConcurrentMark::add_to_liveness(uint worker_id, oop const obj, size_t size) {
210 task(worker_id)->update_liveness(obj, size);
211 }
212
213 inline void G1CMTask::abort_marking_if_regular_check_fail() {
214 if (!regular_clock_call()) {
215 set_has_aborted();
216 }
217 }
|