26 #include "gc/shenandoah/shenandoahBarrierSetClone.inline.hpp" |
26 #include "gc/shenandoah/shenandoahBarrierSetClone.inline.hpp" |
27 #include "gc/shenandoah/shenandoahRuntime.hpp" |
27 #include "gc/shenandoah/shenandoahRuntime.hpp" |
28 #include "gc/shenandoah/shenandoahThreadLocalData.hpp" |
28 #include "gc/shenandoah/shenandoahThreadLocalData.hpp" |
29 #include "runtime/interfaceSupport.inline.hpp" |
29 #include "runtime/interfaceSupport.inline.hpp" |
30 #include "oops/oop.inline.hpp" |
30 #include "oops/oop.inline.hpp" |
|
31 #include "utilities/copy.hpp" |
31 |
32 |
32 void ShenandoahRuntime::write_ref_array_pre_oop_entry(oop* src, oop* dst, size_t length) { |
33 void ShenandoahRuntime::write_ref_array_pre_oop_entry(oop* src, oop* dst, size_t length) { |
33 ShenandoahBarrierSet *bs = ShenandoahBarrierSet::barrier_set(); |
34 ShenandoahBarrierSet *bs = ShenandoahBarrierSet::barrier_set(); |
34 bs->arraycopy_pre(src, dst, length); |
35 bs->arraycopy_pre(src, dst, length); |
35 } |
36 } |
73 return ShenandoahBarrierSet::barrier_set()->load_reference_barrier_mutator(src, load_addr); |
74 return ShenandoahBarrierSet::barrier_set()->load_reference_barrier_mutator(src, load_addr); |
74 JRT_END |
75 JRT_END |
75 |
76 |
76 // Shenandoah clone barrier: makes sure that references point to to-space |
77 // Shenandoah clone barrier: makes sure that references point to to-space |
77 // in cloned objects. |
78 // in cloned objects. |
78 JRT_LEAF(void, ShenandoahRuntime::shenandoah_clone_barrier(oopDesc* s, oopDesc* d, size_t length)) |
79 JRT_LEAF(void, ShenandoahRuntime::shenandoah_clone_barrier(oopDesc* src, void* src_ptr, void* dst_ptr, size_t length)) |
79 oop src = oop(s); |
80 oop s = oop(src); |
80 oop dst = oop(d); |
81 shenandoah_assert_correct(NULL, s); |
81 shenandoah_assert_correct(NULL, src); |
82 ShenandoahBarrierSet::barrier_set()->clone_barrier(s); |
82 shenandoah_assert_correct(NULL, dst); |
83 Copy::conjoint_jlongs_atomic(reinterpret_cast<jlong*>(src_ptr), |
83 ShenandoahBarrierSet::barrier_set()->clone_barrier(src); |
84 reinterpret_cast<jlong*>(dst_ptr), |
84 RawAccessBarrier<IS_NOT_NULL>::clone(src, dst, length); |
85 length); |
85 JRT_END |
86 JRT_END |
86 |
87 |
87 JRT_LEAF(oopDesc*, ShenandoahRuntime::load_reference_barrier_native(oopDesc * src)) |
88 JRT_LEAF(oopDesc*, ShenandoahRuntime::load_reference_barrier_native(oopDesc * src)) |
88 return (oopDesc*) ShenandoahBarrierSet::barrier_set()->oop_load_from_native_barrier(oop(src)); |
89 return (oopDesc*) ShenandoahBarrierSet::barrier_set()->oop_load_from_native_barrier(oop(src)); |
89 JRT_END |
90 JRT_END |