224 ShenandoahMarkingContext* const marking_context = _heap->marking_context();
225 if (_heap->is_concurrent_root_in_progress() && !marking_context->is_marked(obj)) {
226 Thread* thr = Thread::current();
227 if (thr->is_Java_thread()) {
228 return NULL;
229 } else {
230 return obj;
231 }
232 }
233
234 oop fwd = load_reference_barrier_not_null(obj);
235 if (load_addr != NULL && fwd != obj) {
236 // Since we are here and we know the load address, update the reference.
237 ShenandoahHeap::cas_oop(fwd, load_addr, obj);
238 }
239
240 return fwd;
241 }
242
243 void ShenandoahBarrierSet::clone_barrier_runtime(oop src) {
244 if (_heap->has_forwarded_objects()) {
245 clone_barrier(src);
246 }
247 }
248
|
224 ShenandoahMarkingContext* const marking_context = _heap->marking_context();
225 if (_heap->is_concurrent_root_in_progress() && !marking_context->is_marked(obj)) {
226 Thread* thr = Thread::current();
227 if (thr->is_Java_thread()) {
228 return NULL;
229 } else {
230 return obj;
231 }
232 }
233
234 oop fwd = load_reference_barrier_not_null(obj);
235 if (load_addr != NULL && fwd != obj) {
236 // Since we are here and we know the load address, update the reference.
237 ShenandoahHeap::cas_oop(fwd, load_addr, obj);
238 }
239
240 return fwd;
241 }
242
243 void ShenandoahBarrierSet::clone_barrier_runtime(oop src) {
244 if (_heap->has_forwarded_objects() || (ShenandoahStoreValEnqueueBarrier && _heap->is_concurrent_mark_in_progress())) {
245 clone_barrier(src);
246 }
247 }
248
|