< prev index next >
src/hotspot/share/gc/shenandoah/shenandoahBarrierSet.inline.hpp
Print this page
rev 58687 : Shenandoah: New incremental-update mode
@@ -84,11 +84,11 @@
enqueue(value);
}
}
inline void ShenandoahBarrierSet::storeval_barrier(oop obj) {
- if (obj != NULL && ShenandoahStoreValEnqueueBarrier) {
+ if (ShenandoahStoreValEnqueueBarrier && obj != NULL && _heap->is_concurrent_mark_in_progress()) {
enqueue(obj);
}
}
inline void ShenandoahBarrierSet::keep_alive_if_weak(DecoratorSet decorators, oop value) {
@@ -289,21 +289,22 @@
if (count == 0) {
return;
}
int gc_state = _heap->gc_state();
if ((gc_state & ShenandoahHeap::MARKING) != 0) {
- arraycopy_marking(dst, count);
+ arraycopy_marking(src, dst, count);
} else if ((gc_state & ShenandoahHeap::EVACUATION) != 0) {
arraycopy_evacuation(src, count);
} else if ((gc_state & ShenandoahHeap::UPDATEREFS) != 0) {
arraycopy_update(src, count);
}
}
template <class T>
-void ShenandoahBarrierSet::arraycopy_marking(T* array, size_t count) {
+void ShenandoahBarrierSet::arraycopy_marking(T* src, T* dst, size_t count) {
assert(_heap->is_concurrent_mark_in_progress(), "only during marking");
+ T* array = ShenandoahSATBBarrier ? dst : src;
if (!_heap->marking_context()->allocated_after_mark_start(reinterpret_cast<HeapWord*>(array))) {
arraycopy_work<T, false, false, true>(array, count);
}
}
< prev index next >