mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 14:24:46 +02:00
6904516: More object array barrier fixes, following up on 6906727
Fixed missing pre-barrier calls for G1, modified C1 to call pre- and correct post-barrier interfaces, deleted obsolete interface, (temporarily) disabled redundant deferred barrier in BacktraceBuilder. Reviewed-by: coleenp, jmasa, kvn, never
This commit is contained in:
parent
b34027a600
commit
c61ab190cf
6 changed files with 47 additions and 28 deletions
|
@ -196,11 +196,19 @@ void stubRoutines_init2() { StubRoutines::initialize2(); }
|
|||
// Default versions of arraycopy functions
|
||||
//
|
||||
|
||||
static void gen_arraycopy_barrier_pre(oop* dest, size_t count) {
|
||||
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);
|
||||
}
|
||||
|
||||
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(MemRegion((HeapWord*)dest, (HeapWord*)(dest + count)));
|
||||
bs->write_ref_array((HeapWord*)dest, count);
|
||||
}
|
||||
|
||||
JRT_LEAF(void, StubRoutines::jbyte_copy(jbyte* src, jbyte* dest, size_t count))
|
||||
|
@ -240,6 +248,7 @@ JRT_LEAF(void, StubRoutines::oop_copy(oop* src, oop* dest, size_t count))
|
|||
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);
|
||||
Copy::conjoint_oops_atomic(src, dest, count);
|
||||
gen_arraycopy_barrier(dest, count);
|
||||
JRT_END
|
||||
|
@ -281,6 +290,7 @@ JRT_LEAF(void, StubRoutines::arrayof_oop_copy(HeapWord* src, HeapWord* dest, siz
|
|||
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);
|
||||
Copy::arrayof_conjoint_oops(src, dest, count);
|
||||
gen_arraycopy_barrier((oop *) dest, count);
|
||||
JRT_END
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue