< prev index next >

src/hotspot/cpu/x86/gc/shenandoah/shenandoahBarrierSetAssembler_x86.cpp

Print this page
rev 58671 : 8242130: Shenandoah: Simplify arraycopy-barrier dispatching
rev 58672 : Shenandoah: New incremental-update mode

*** 51,61 **** bool dest_uninitialized = (decorators & IS_DEST_UNINITIALIZED) != 0; if (is_reference_type(type)) { ! if ((ShenandoahSATBBarrier && !dest_uninitialized) || ShenandoahLoadRefBarrier) { #ifdef _LP64 Register thread = r15_thread; #else Register thread = rax; if (thread == src || thread == dst || thread == count) { --- 51,61 ---- bool dest_uninitialized = (decorators & IS_DEST_UNINITIALIZED) != 0; if (is_reference_type(type)) { ! if ((ShenandoahSATBBarrier && !dest_uninitialized) || ShenandoahStoreValEnqueueBarrier || ShenandoahLoadRefBarrier) { #ifdef _LP64 Register thread = r15_thread; #else Register thread = rax; if (thread == src || thread == dst || thread == count) {
*** 75,113 **** Label done; // Short-circuit if count == 0. __ testptr(count, count); __ jcc(Assembler::zero, done); ! // Avoid runtime call when not marking. Address gc_state(thread, in_bytes(ShenandoahThreadLocalData::gc_state_offset())); int flags = ShenandoahHeap::HAS_FORWARDED; ! if (!dest_uninitialized) { flags |= ShenandoahHeap::MARKING; } __ testb(gc_state, flags); __ jcc(Assembler::zero, done); __ pusha(); // push registers #ifdef _LP64 assert(src == rdi, "expected"); assert(dst == rsi, "expected"); assert(count == rdx, "expected"); if (UseCompressedOops) { ! if (dest_uninitialized) { ! __ call_VM_leaf(CAST_FROM_FN_PTR(address, ShenandoahRuntime::write_ref_array_pre_duinit_narrow_oop_entry), src, dst, count); ! } else { ! __ call_VM_leaf(CAST_FROM_FN_PTR(address, ShenandoahRuntime::write_ref_array_pre_narrow_oop_entry), src, dst, count); ! } } else #endif { ! if (dest_uninitialized) { ! __ call_VM_leaf(CAST_FROM_FN_PTR(address, ShenandoahRuntime::write_ref_array_pre_duinit_oop_entry), src, dst, count); ! } else { ! __ call_VM_leaf(CAST_FROM_FN_PTR(address, ShenandoahRuntime::write_ref_array_pre_oop_entry), src, dst, count); ! } } __ popa(); __ bind(done); NOT_LP64(__ pop(thread);) } } --- 75,109 ---- Label done; // Short-circuit if count == 0. __ testptr(count, count); __ jcc(Assembler::zero, done); ! // Avoid runtime call when not active. Address gc_state(thread, in_bytes(ShenandoahThreadLocalData::gc_state_offset())); int flags = ShenandoahHeap::HAS_FORWARDED; ! if (ShenandoahStoreValEnqueueBarrier || !dest_uninitialized) { flags |= ShenandoahHeap::MARKING; } __ testb(gc_state, flags); __ jcc(Assembler::zero, done); __ pusha(); // push registers + #ifdef _LP64 assert(src == rdi, "expected"); assert(dst == rsi, "expected"); assert(count == rdx, "expected"); if (UseCompressedOops) { ! __ call_VM_leaf(CAST_FROM_FN_PTR(address, ShenandoahRuntime::arraycopy_barrier_narrow_oop_entry), ! src, dst, count); } else #endif { ! __ call_VM_leaf(CAST_FROM_FN_PTR(address, ShenandoahRuntime::arraycopy_barrier_oop_entry), ! src, dst, count); } + __ popa(); __ bind(done); NOT_LP64(__ pop(thread);) } }
< prev index next >