< prev index next >
src/hotspot/share/gc/shenandoah/shenandoahBarrierSet.cpp
Print this page
rev 57589 : 8237632: Shenandoah fails some vmTestbase_nsk_jvmti tests with "Forwardee must point to a heap address"
*** 191,214 ****
}
oop ShenandoahBarrierSet::load_reference_barrier_impl(oop obj) {
assert(ShenandoahLoadRefBarrier, "should be enabled");
if (!CompressedOops::is_null(obj)) {
! bool evac_in_progress = _heap->is_gc_in_progress_mask(ShenandoahHeap::EVACUATION | ShenandoahHeap::TRAVERSAL);
oop fwd = resolve_forwarded_not_null(obj);
! if (evac_in_progress &&
! _heap->in_collection_set(obj) &&
! obj == fwd) {
Thread *t = Thread::current();
ShenandoahEvacOOMScope oom_evac_scope;
return _heap->evacuate_object(obj, t);
} else {
return fwd;
}
! } else {
! return obj;
}
}
void ShenandoahBarrierSet::on_thread_create(Thread* thread) {
// Create thread local data
ShenandoahThreadLocalData::create(thread);
--- 191,218 ----
}
oop ShenandoahBarrierSet::load_reference_barrier_impl(oop obj) {
assert(ShenandoahLoadRefBarrier, "should be enabled");
if (!CompressedOops::is_null(obj)) {
! if (_heap->in_collection_set(obj)) {
oop fwd = resolve_forwarded_not_null(obj);
! bool evac_in_progress = _heap->is_gc_in_progress_mask(ShenandoahHeap::EVACUATION | ShenandoahHeap::TRAVERSAL);
! if (evac_in_progress && obj == fwd) {
Thread *t = Thread::current();
ShenandoahEvacOOMScope oom_evac_scope;
return _heap->evacuate_object(obj, t);
} else {
return fwd;
}
! } else if (_heap->is_concurrent_traversal_in_progress() &&
! _heap->is_degenerated_gc_in_progress()) {
! // Traversal GC clears collection set before entering degenerated GC.
! // At this point, marked pattern indicates forwarding.
! return resolve_forwarded_not_null(obj);
! }
}
+ return obj;
}
void ShenandoahBarrierSet::on_thread_create(Thread* thread) {
// Create thread local data
ShenandoahThreadLocalData::create(thread);
< prev index next >