< prev index next >

src/hotspot/share/gc/shenandoah/shenandoahClosures.inline.hpp

Print this page
rev 57589 : 8237632: Shenandoah fails some vmTestbase_nsk_jvmti tests with "Forwardee must point to a heap address"

*** 26,55 **** --- 26,72 ---- #include "gc/shared/barrierSetNMethod.hpp" #include "gc/shenandoah/shenandoahAsserts.hpp" #include "gc/shenandoah/shenandoahClosures.hpp" #include "gc/shenandoah/shenandoahHeap.inline.hpp" #include "gc/shenandoah/shenandoahNMethod.inline.hpp" + #include "gc/shenandoah/shenandoahSafepoint.hpp" #include "gc/shenandoah/shenandoahTraversalGC.hpp" #include "oops/compressedOops.inline.hpp" #include "runtime/atomic.hpp" #include "runtime/thread.hpp" ShenandoahForwardedIsAliveClosure::ShenandoahForwardedIsAliveClosure() : + _heap(ShenandoahHeap::heap()), _mark_context(ShenandoahHeap::heap()->marking_context()) { } bool ShenandoahForwardedIsAliveClosure::do_object_b(oop obj) { if (CompressedOops::is_null(obj)) { return false; } + if (_heap->in_collection_set(obj)) { obj = ShenandoahBarrierSet::resolve_forwarded_not_null(obj); + } shenandoah_assert_not_forwarded_if(NULL, obj, (ShenandoahHeap::heap()->is_concurrent_mark_in_progress() || ShenandoahHeap::heap()->is_concurrent_traversal_in_progress())); return _mark_context->is_marked(obj); } + ShenandoahForwardedIsAliveNoCSetCheckClosure::ShenandoahForwardedIsAliveNoCSetCheckClosure() : + _mark_context(ShenandoahHeap::heap()->marking_context()) { + assert(ShenandoahSafepoint::is_at_shenandoah_safepoint(), "Only used at a safepoint"); + } + + bool ShenandoahForwardedIsAliveNoCSetCheckClosure::do_object_b(oop obj) { + if (CompressedOops::is_null(obj)) { + return false; + } + obj = ShenandoahBarrierSet::resolve_forwarded_not_null(obj); + return _mark_context->is_marked(obj); + } + ShenandoahIsAliveClosure::ShenandoahIsAliveClosure() : _mark_context(ShenandoahHeap::heap()->marking_context()) { } bool ShenandoahIsAliveClosure::do_object_b(oop obj) {
*** 84,93 **** --- 101,111 ---- ShenandoahTraversalUpdateRefsClosure::ShenandoahTraversalUpdateRefsClosure() : _heap(ShenandoahHeap::heap()), _traversal_set(ShenandoahHeap::heap()->traversal_gc()->traversal_set()) { assert(_heap->is_traversal_mode(), "Why we here?"); + assert(SafepointSynchronize::is_at_safepoint(), "Must be at a safepoint"); } template <class T> void ShenandoahTraversalUpdateRefsClosure::do_oop_work(T* p) { T o = RawAccess<>::oop_load(p);
< prev index next >