8237369: Shenandoah: failed vmTestbase/nsk/jvmti/AttachOnDemand/attach021/TestDescription.java test

Reviewed-by: rkennke
This commit is contained in:
Zhengyu Gu 2020-01-16 14:22:35 -05:00
parent 96f5699e92
commit 85255c54da

View File

@ -1330,7 +1330,12 @@ void ShenandoahHeap::object_iterate(ObjectClosure* cl) {
// Keep alive an object that was loaded with AS_NO_KEEPALIVE.
void ShenandoahHeap::keep_alive(oop obj) {
ShenandoahBarrierSet::barrier_set()->enqueue(obj);
if (is_concurrent_mark_in_progress()) {
ShenandoahBarrierSet::barrier_set()->enqueue(obj);
} else {
// Otherwise, it must be live, guaranteed by LRB
shenandoah_assert_marked_if(NULL, obj, has_forwarded_objects());
}
}
void ShenandoahHeap::heap_region_iterate(ShenandoahHeapRegionClosure* blk) const {