equal
deleted
inserted
replaced
80 } |
80 } |
81 oop obj = CompressedOops::decode_not_null(heap_oop); |
81 oop obj = CompressedOops::decode_not_null(heap_oop); |
82 const InCSetState state = _g1h->in_cset_state(obj); |
82 const InCSetState state = _g1h->in_cset_state(obj); |
83 if (state.is_in_cset()) { |
83 if (state.is_in_cset()) { |
84 prefetch_and_push(p, obj); |
84 prefetch_and_push(p, obj); |
85 } else { |
85 } else if (!HeapRegion::is_in_same_region(p, obj)) { |
86 if (HeapRegion::is_in_same_region(p, obj)) { |
86 handle_non_cset_obj_common(state, p, obj); |
|
87 if (_scanning_in_young) { |
87 return; |
88 return; |
88 } |
89 } |
89 handle_non_cset_obj_common(state, p, obj); |
90 _par_scan_state->enqueue_card_if_tracked(p, obj); |
90 _par_scan_state->update_rs(_from, p, obj); |
|
91 } |
91 } |
92 } |
92 } |
93 |
93 |
94 template <class T> |
94 template <class T> |
95 inline void G1CMOopClosure::do_oop_work(T* p) { |
95 inline void G1CMOopClosure::do_oop_work(T* p) { |
170 const InCSetState state = _g1h->in_cset_state(obj); |
170 const InCSetState state = _g1h->in_cset_state(obj); |
171 if (state.is_in_cset()) { |
171 if (state.is_in_cset()) { |
172 // Since the source is always from outside the collection set, here we implicitly know |
172 // Since the source is always from outside the collection set, here we implicitly know |
173 // that this is a cross-region reference too. |
173 // that this is a cross-region reference too. |
174 prefetch_and_push(p, obj); |
174 prefetch_and_push(p, obj); |
175 } else { |
175 } else if (!HeapRegion::is_in_same_region(p, obj)) { |
176 HeapRegion* to = _g1h->heap_region_containing(obj); |
|
177 if (_from == to) { |
|
178 return; |
|
179 } |
|
180 handle_non_cset_obj_common(state, p, obj); |
176 handle_non_cset_obj_common(state, p, obj); |
181 to->rem_set()->add_reference(p, _worker_i); |
177 _par_scan_state->enqueue_card_if_tracked(p, obj); |
182 } |
178 } |
183 } |
179 } |
184 |
180 |
185 template <class T> |
181 template <class T> |
186 inline void G1ScanObjsDuringScanRSClosure::do_oop_work(T* p) { |
182 inline void G1ScanObjsDuringScanRSClosure::do_oop_work(T* p) { |
191 oop obj = CompressedOops::decode_not_null(heap_oop); |
187 oop obj = CompressedOops::decode_not_null(heap_oop); |
192 |
188 |
193 const InCSetState state = _g1h->in_cset_state(obj); |
189 const InCSetState state = _g1h->in_cset_state(obj); |
194 if (state.is_in_cset()) { |
190 if (state.is_in_cset()) { |
195 prefetch_and_push(p, obj); |
191 prefetch_and_push(p, obj); |
196 } else { |
192 } else if (!HeapRegion::is_in_same_region(p, obj)) { |
197 if (HeapRegion::is_in_same_region(p, obj)) { |
|
198 return; |
|
199 } |
|
200 handle_non_cset_obj_common(state, p, obj); |
193 handle_non_cset_obj_common(state, p, obj); |
201 } |
194 } |
202 } |
195 } |
203 |
196 |
204 void G1ParCopyHelper::do_cld_barrier(oop new_obj) { |
197 void G1ParCopyHelper::do_cld_barrier(oop new_obj) { |