[15] RFR(S): 8235332: TestInstanceCloneAsLoadsStores.java fails with -XX:+StressGCM
Christian Hagedorn
christian.hagedorn at oracle.com
Tue Jan 14 16:18:05 UTC 2020
Hi Roland
>> http://cr.openjdk.java.net/~chagedorn/8235332/webrev.00/
>
> If there's no GC barrier then:
>
> Node* control_proj_ac = bs->step_over_gc_barrier(proj_in->in(0));
>
> control_proj_ac is not a projection, it's proj_in->in(0) so the test
> below can never succeed?
If there is no GC barrier, then proj_in is a membar with its control
input being a control projection from the ArrayCopyNode.
As an example, I have taken the test case TestEliminatedCloneBadMemEdge
[1] which does not disable ReduceInitialCardMarks and has no GC barrier.
We have the following situation at [2]:
proj_in is 132 MemBarCPUOrder. The original code then looked at the
MergeMem 100 input following in(Compile::AliasIdxRaw) which is 101 Proj
and its input 98 ArrayCopy. This passes the check.
My fix now directly looks at the control input of 132 MemBarCPUOrder
which is the projection 99 Proj coming from the 98 ArrayCopy. This also
passes the check.
98 ArrayCopy === 85 1 65 8 1 ( 47 _ 90 _ 97 _ _ _ _ ) [[ 99
101 ]] void ( java/lang/Object *, int, java/lang/Object *, int, int,
int, int, BotPTR *+bot, BotPTR *+bot ) (clone, tightly coupled
allocation) !jvms: TestEliminatedCloneBadMemEdge::test @ bci:1
101 Proj === 98 [[ 100 ]] #2 Memory: @rawptr:BotPTR, idx=Raw;
!jvms: TestEliminatedCloneBadMemEdge::test @ bci:1
100 MergeMem === _ 1 39 101 86 1 86 86 86 86 86 86 86 86
86 86 [[ 132 ]] { N101:rawptr:BotPTR N86:java/lang/Object+8 ...
99 Proj === 98 [[ 132 ]] #0 !jvms:
TestEliminatedCloneBadMemEdge::test @ bci:1
132 MemBarCPUOrder === 99 1 100 1 1 [[ 104 103 ]] !orig=102
!jvms: TestEliminatedCloneBadMemEdge::test @ bci:1
Best regards,
Christian
[1]
http://hg.openjdk.java.net/jdk/jdk/file/2080e45e61ea/test/hotspot/jtreg/compiler/arraycopy/TestEliminatedCloneBadMemEdge.java
[2]
http://hg.openjdk.java.net/jdk/jdk/file/f7edb9ca045c/src/hotspot/share/opto/escape.cpp#l2749
More information about the hotspot-compiler-dev
mailing list