mirror of
https://github.com/openjdk/jdk.git
synced 2026-05-11 22:19:43 +00:00
8248226: TestCloneAccessStressGCM fails with -XX:-ReduceBulkZeroing
Taking GC barriers into account in LoadNode::find_previous_arraycopy() when ReduceInitialCardMarks is disabled. Reviewed-by: kvn, roland
This commit is contained in:
parent
584e983c38
commit
a6cf325152
@ -532,11 +532,24 @@ bool MemNode::detect_ptr_independence(Node* p1, AllocateNode* a1,
|
||||
Node* LoadNode::find_previous_arraycopy(PhaseTransform* phase, Node* ld_alloc, Node*& mem, bool can_see_stored_value) const {
|
||||
if (mem->is_Proj() && mem->in(0) != NULL && (mem->in(0)->Opcode() == Op_MemBarStoreStore ||
|
||||
mem->in(0)->Opcode() == Op_MemBarCPUOrder)) {
|
||||
Node* mb = mem->in(0);
|
||||
if (mb->in(0) != NULL && mb->in(0)->is_Proj() &&
|
||||
mb->in(0)->in(0) != NULL && mb->in(0)->in(0)->is_ArrayCopy()) {
|
||||
ArrayCopyNode* ac = mb->in(0)->in(0)->as_ArrayCopy();
|
||||
if (ac->is_clonebasic()) {
|
||||
if (ld_alloc != NULL) {
|
||||
// Check if there is an array copy for a clone
|
||||
Node* mb = mem->in(0);
|
||||
ArrayCopyNode* ac = NULL;
|
||||
if (mb->in(0) != NULL && mb->in(0)->is_Proj() &&
|
||||
mb->in(0)->in(0) != NULL && mb->in(0)->in(0)->is_ArrayCopy()) {
|
||||
ac = mb->in(0)->in(0)->as_ArrayCopy();
|
||||
} else {
|
||||
// Step over GC barrier when ReduceInitialCardMarks is disabled
|
||||
BarrierSetC2* bs = BarrierSet::barrier_set()->barrier_set_c2();
|
||||
Node* control_proj_ac = bs->step_over_gc_barrier(mb->in(0));
|
||||
|
||||
if (control_proj_ac->is_Proj() && control_proj_ac->in(0)->is_ArrayCopy()) {
|
||||
ac = control_proj_ac->in(0)->as_ArrayCopy();
|
||||
}
|
||||
}
|
||||
|
||||
if (ac != NULL && ac->is_clonebasic()) {
|
||||
AllocateNode* alloc = AllocateNode::Ideal_allocation(ac->in(ArrayCopyNode::Dest), phase);
|
||||
if (alloc != NULL && alloc == ld_alloc) {
|
||||
return ac;
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @bug 8235332
|
||||
* @bug 8235332 8248226
|
||||
* @summary Test cloning with more than 8 (=ArrayCopyLoadStoreMaxElem) fields with StressGCM
|
||||
* @library /
|
||||
*
|
||||
@ -31,6 +31,11 @@
|
||||
* -XX:CompileCommand=dontinline,compiler.arraycopy.TestCloneAccessStressGCM::test
|
||||
* -XX:+UnlockDiagnosticVMOptions -XX:+StressGCM -XX:-ReduceInitialCardMarks
|
||||
* compiler.arraycopy.TestCloneAccessStressGCM
|
||||
* @run main/othervm -Xbatch
|
||||
* -XX:CompileCommand=dontinline,compiler.arraycopy.TestCloneAccessStressGCM::test
|
||||
* -XX:+UnlockDiagnosticVMOptions -XX:+StressGCM -XX:-ReduceInitialCardMarks
|
||||
* -XX:-ReduceBulkZeroing
|
||||
* compiler.arraycopy.TestCloneAccessStressGCM
|
||||
*/
|
||||
|
||||
package compiler.arraycopy;
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @bug 8076188 8246153
|
||||
* @bug 8076188 8246153 8248226
|
||||
* @summary arraycopy to non escaping destination may be eliminated
|
||||
* @library /
|
||||
*
|
||||
@ -34,6 +34,11 @@
|
||||
* -XX:+IgnoreUnrecognizedVMOptions -XX:+StressReflectiveCode
|
||||
* -XX:CompileCommand=dontinline,compiler.arraycopy.TestEliminateArrayCopy*::m*
|
||||
* compiler.arraycopy.TestEliminateArrayCopy
|
||||
* @run main/othervm -ea -XX:-BackgroundCompilation -XX:-UseOnStackReplacement
|
||||
* -XX:+IgnoreUnrecognizedVMOptions -XX:+StressReflectiveCode
|
||||
* -XX:-ReduceInitialCardMarks -XX:-ReduceBulkZeroing
|
||||
* -XX:CompileCommand=dontinline,compiler.arraycopy.TestEliminateArrayCopy*::m*
|
||||
* compiler.arraycopy.TestEliminateArrayCopy
|
||||
*/
|
||||
|
||||
package compiler.arraycopy;
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @bug 6700100 8156760
|
||||
* @bug 6700100 8156760 8248226
|
||||
* @summary small instance clone as loads/stores
|
||||
* @library /
|
||||
*
|
||||
@ -38,6 +38,10 @@
|
||||
* -XX:CompileCommand=dontinline,compiler.arraycopy.TestInstanceCloneAsLoadsStores::m*
|
||||
* -XX:+IgnoreUnrecognizedVMOptions -XX:-ReduceInitialCardMarks
|
||||
* compiler.arraycopy.TestInstanceCloneAsLoadsStores
|
||||
* @run main/othervm -XX:-BackgroundCompilation -XX:-UseOnStackReplacement
|
||||
* -XX:CompileCommand=dontinline,compiler.arraycopy.TestInstanceCloneAsLoadsStores::m*
|
||||
* -XX:+IgnoreUnrecognizedVMOptions -XX:-ReduceInitialCardMarks -XX:-ReduceBulkZeroing
|
||||
* compiler.arraycopy.TestInstanceCloneAsLoadsStores
|
||||
*/
|
||||
|
||||
package compiler.arraycopy;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user