< prev index next >
src/share/vm/runtime/stubRoutines.cpp
Print this page
rev 12906 : [mq]: gc_interface
*** 24,33 ****
--- 24,34 ----
#include "precompiled.hpp"
#include "asm/codeBuffer.hpp"
#include "memory/resourceArea.hpp"
#include "oops/oop.inline.hpp"
+ #include "runtime/access.inline.hpp"
#include "runtime/interfaceSupport.hpp"
#include "runtime/timerTrace.hpp"
#include "runtime/sharedRuntime.hpp"
#include "runtime/stubRoutines.hpp"
#include "utilities/copy.hpp"
*** 374,398 ****
//
// Default versions of arraycopy functions
//
- static void gen_arraycopy_barrier_pre(oop* dest, size_t count, bool dest_uninitialized) {
- assert(count != 0, "count should be non-zero");
- assert(count <= (size_t)max_intx, "count too large");
- BarrierSet* bs = Universe::heap()->barrier_set();
- assert(bs->has_write_ref_array_pre_opt(), "Must have pre-barrier opt");
- bs->write_ref_array_pre(dest, (int)count, dest_uninitialized);
- }
-
- static void gen_arraycopy_barrier(oop* dest, size_t count) {
- assert(count != 0, "count should be non-zero");
- BarrierSet* bs = Universe::heap()->barrier_set();
- assert(bs->has_write_ref_array_opt(), "Barrier set must have ref array opt");
- bs->write_ref_array((HeapWord*)dest, count);
- }
-
JRT_LEAF(void, StubRoutines::jbyte_copy(jbyte* src, jbyte* dest, size_t count))
#ifndef PRODUCT
SharedRuntime::_jbyte_array_copy_ctr++; // Slow-path byte array copy
#endif // !PRODUCT
Copy::conjoint_jbytes_atomic(src, dest, count);
--- 375,384 ----
*** 422,444 ****
JRT_LEAF(void, StubRoutines::oop_copy(oop* src, oop* dest, size_t count))
#ifndef PRODUCT
SharedRuntime::_oop_array_copy_ctr++; // Slow-path oop array copy
#endif // !PRODUCT
assert(count != 0, "count should be non-zero");
! gen_arraycopy_barrier_pre(dest, count, /*dest_uninitialized*/false);
! Copy::conjoint_oops_atomic(src, dest, count);
! gen_arraycopy_barrier(dest, count);
JRT_END
JRT_LEAF(void, StubRoutines::oop_copy_uninit(oop* src, oop* dest, size_t count))
#ifndef PRODUCT
SharedRuntime::_oop_array_copy_ctr++; // Slow-path oop array copy
#endif // !PRODUCT
assert(count != 0, "count should be non-zero");
! gen_arraycopy_barrier_pre(dest, count, /*dest_uninitialized*/true);
! Copy::conjoint_oops_atomic(src, dest, count);
! gen_arraycopy_barrier(dest, count);
JRT_END
JRT_LEAF(void, StubRoutines::arrayof_jbyte_copy(HeapWord* src, HeapWord* dest, size_t count))
#ifndef PRODUCT
SharedRuntime::_jbyte_array_copy_ctr++; // Slow-path byte array copy
--- 408,426 ----
JRT_LEAF(void, StubRoutines::oop_copy(oop* src, oop* dest, size_t count))
#ifndef PRODUCT
SharedRuntime::_oop_array_copy_ctr++; // Slow-path oop array copy
#endif // !PRODUCT
assert(count != 0, "count should be non-zero");
! HeapAccess<DEST_CONJOINT | DEST_COVARIANT>::oop_copy(NULL, NULL, (HeapWord*)src, (HeapWord*)dest, count);
JRT_END
JRT_LEAF(void, StubRoutines::oop_copy_uninit(oop* src, oop* dest, size_t count))
#ifndef PRODUCT
SharedRuntime::_oop_array_copy_ctr++; // Slow-path oop array copy
#endif // !PRODUCT
assert(count != 0, "count should be non-zero");
! HeapAccess<DEST_CONJOINT | DEST_COVARIANT | DEST_NOT_INITIALIZED>::oop_copy(NULL, NULL, (HeapWord*)src, (HeapWord*)dest, count);
JRT_END
JRT_LEAF(void, StubRoutines::arrayof_jbyte_copy(HeapWord* src, HeapWord* dest, size_t count))
#ifndef PRODUCT
SharedRuntime::_jbyte_array_copy_ctr++; // Slow-path byte array copy
*** 470,492 ****
JRT_LEAF(void, StubRoutines::arrayof_oop_copy(HeapWord* src, HeapWord* dest, size_t count))
#ifndef PRODUCT
SharedRuntime::_oop_array_copy_ctr++; // Slow-path oop array copy
#endif // !PRODUCT
assert(count != 0, "count should be non-zero");
! gen_arraycopy_barrier_pre((oop *) dest, count, /*dest_uninitialized*/false);
! Copy::arrayof_conjoint_oops(src, dest, count);
! gen_arraycopy_barrier((oop *) dest, count);
JRT_END
JRT_LEAF(void, StubRoutines::arrayof_oop_copy_uninit(HeapWord* src, HeapWord* dest, size_t count))
#ifndef PRODUCT
SharedRuntime::_oop_array_copy_ctr++; // Slow-path oop array copy
#endif // !PRODUCT
assert(count != 0, "count should be non-zero");
! gen_arraycopy_barrier_pre((oop *) dest, count, /*dest_uninitialized*/true);
! Copy::arrayof_conjoint_oops(src, dest, count);
! gen_arraycopy_barrier((oop *) dest, count);
JRT_END
address StubRoutines::select_fill_function(BasicType t, bool aligned, const char* &name) {
#define RETURN_STUB(xxx_fill) { \
name = #xxx_fill; \
--- 452,470 ----
JRT_LEAF(void, StubRoutines::arrayof_oop_copy(HeapWord* src, HeapWord* dest, size_t count))
#ifndef PRODUCT
SharedRuntime::_oop_array_copy_ctr++; // Slow-path oop array copy
#endif // !PRODUCT
assert(count != 0, "count should be non-zero");
! HeapAccess<DEST_CONJOINT | DEST_COVARIANT | COPY_ARRAYOF>::oop_copy(NULL, NULL, src, dest, count);
JRT_END
JRT_LEAF(void, StubRoutines::arrayof_oop_copy_uninit(HeapWord* src, HeapWord* dest, size_t count))
#ifndef PRODUCT
SharedRuntime::_oop_array_copy_ctr++; // Slow-path oop array copy
#endif // !PRODUCT
assert(count != 0, "count should be non-zero");
! HeapAccess<DEST_CONJOINT | DEST_COVARIANT | COPY_ARRAYOF | DEST_NOT_INITIALIZED>::oop_copy(NULL, NULL, src, dest, count);
JRT_END
address StubRoutines::select_fill_function(BasicType t, bool aligned, const char* &name) {
#define RETURN_STUB(xxx_fill) { \
name = #xxx_fill; \
< prev index next >