Skip to content

Commit

Permalink
8322954: Shenandoah: Convert evac-update closures asserts to rich ass…
Browse files Browse the repository at this point in the history
…erts

Reviewed-by: wkemper, kdnilsen, ysr
  • Loading branch information
shipilev committed Jan 5, 2024
1 parent 631a9f6 commit 700c25f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ void ShenandoahBarrierSet::arraycopy_work(T* src, size_t count) {
if (EVAC && obj == fwd) {
fwd = _heap->evacuate_object(obj, thread);
}
assert(obj != fwd || _heap->cancelled_gc(), "must be forwarded");
shenandoah_assert_forwarded_except(elem_ptr, obj, _heap->cancelled_gc());
ShenandoahHeap::atomic_update_oop(fwd, elem_ptr, o);
obj = fwd;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class ShenandoahUpdateRefsForOopClosure: public BasicOopIterateClosure {
if (EVAC && obj == fwd) {
fwd = _heap->evacuate_object(obj, _thread);
}
assert(obj != fwd || _heap->cancelled_gc(), "must be forwarded");
shenandoah_assert_forwarded_except(p, obj, _heap->cancelled_gc());
ShenandoahHeap::atomic_update_oop(fwd, p, o);
obj = fwd;
}
Expand Down
4 changes: 1 addition & 3 deletions src/hotspot/share/gc/shenandoah/shenandoahConcurrentGC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -705,10 +705,8 @@ void ShenandoahEvacUpdateCleanupOopStorageRootsClosure::do_oop(oop* p) {
if (resolved == obj) {
resolved = _heap->evacuate_object(obj, _thread);
}
shenandoah_assert_not_in_cset_except(p, resolved, _heap->cancelled_gc());
ShenandoahHeap::atomic_update_oop(resolved, p, obj);
assert(_heap->cancelled_gc() ||
_mark_context->is_marked(resolved) && !_heap->in_collection_set(resolved),
"Sanity");
}
}
}
Expand Down

1 comment on commit 700c25f

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.