< prev index next >

src/hotspot/share/gc/z/zBarrierSet.inline.hpp

Print this page

        

*** 212,221 **** --- 212,238 ---- inline void ZBarrierSet::AccessBarrier<decorators, BarrierSetT>::clone_in_heap(oop src, oop dst, size_t size) { ZBarrier::load_barrier_on_oop_fields(src); Raw::clone_in_heap(src, dst, size); } + template <DecoratorSet decorators, typename BarrierSetT> + inline void ZBarrierSet::AccessBarrier<decorators, BarrierSetT>::value_copy_in_heap(void* src, void* dst, ValueKlass* md) { + if (md->contains_oops()) { + // src/dst aren't oops, need offset to adjust oop map offset + const address src_oop_addr_offset = ((address) src) - md->first_field_offset(); + + OopMapBlock* map = md->start_of_nonstatic_oop_maps(); + OopMapBlock* const end = map + md->nonstatic_oop_map_count(); + while (map != end) { + address soop_address = src_oop_addr_offset + map->offset(); + ZBarrier::load_barrier_on_oop_array((oop*) soop_address, map->count()); + map++; + } + } + Raw::value_copy_in_heap(src, dst, md); + } + // // Not in heap // template <DecoratorSet decorators, typename BarrierSetT> template <typename T>
< prev index next >