diff --git a/substratevm/src/com.oracle.svm.core.genscavenge/src/com/oracle/svm/core/genscavenge/graal/BarrierSnippets.java b/substratevm/src/com.oracle.svm.core.genscavenge/src/com/oracle/svm/core/genscavenge/graal/BarrierSnippets.java index bdb9b0b047e3..a5446ed018a0 100644 --- a/substratevm/src/com.oracle.svm.core.genscavenge/src/com/oracle/svm/core/genscavenge/graal/BarrierSnippets.java +++ b/substratevm/src/com.oracle.svm.core.genscavenge/src/com/oracle/svm/core/genscavenge/graal/BarrierSnippets.java @@ -49,6 +49,8 @@ import jdk.graal.compiler.core.common.GraalOptions; import jdk.graal.compiler.core.common.spi.ForeignCallDescriptor; import jdk.graal.compiler.graph.Node; +import jdk.graal.compiler.graph.Node.ConstantNodeParameter; +import jdk.graal.compiler.graph.Node.NodeIntrinsic; import jdk.graal.compiler.nodes.BreakpointNode; import jdk.graal.compiler.nodes.NamedLocationIdentity; import jdk.graal.compiler.nodes.extended.BranchProbabilityNode; @@ -74,8 +76,7 @@ public class BarrierSnippets extends SubstrateTemplates implements Snippets { public static final LocationIdentity CARD_REMEMBERED_SET_LOCATION = NamedLocationIdentity.mutable("CardRememberedSet"); private static final SnippetRuntime.SubstrateForeignCallDescriptor POST_WRITE_BARRIER = SnippetRuntime.findForeignCall(BarrierSnippets.class, "postWriteBarrierStub", - NO_SIDE_EFFECT, - CARD_REMEMBERED_SET_LOCATION); + NO_SIDE_EFFECT, CARD_REMEMBERED_SET_LOCATION); private final SnippetInfo postWriteBarrierSnippet; @@ -108,8 +109,8 @@ public static void postWriteBarrierStub(Object object) { } } - @Node.NodeIntrinsic(ForeignCallNode.class) - private static native void callPostWriteBarrierStub(@Node.ConstantNodeParameter ForeignCallDescriptor descriptor, Object object); + @NodeIntrinsic(ForeignCallNode.class) + private static native void callPostWriteBarrierStub(@ConstantNodeParameter ForeignCallDescriptor descriptor, Object object); @Snippet public static void postWriteBarrierSnippet(Object object, @ConstantParameter boolean shouldOutline, @ConstantParameter boolean alwaysAlignedChunk, @ConstantParameter boolean verifyOnly) { @@ -120,20 +121,14 @@ public static void postWriteBarrierSnippet(Object object, @ConstantParameter boo if (SerialGCOptions.VerifyWriteBarriers.getValue() && alwaysAlignedChunk) { /* * To increase verification coverage, we do the verification before checking if a - * barrier is needed at all. And in addition to verifying that the object is in an - * aligned chunk, we also verify that it is not an array at all because most arrays are - * small and therefore in an aligned chunk. + * barrier is needed at all. */ - if (BranchProbabilityNode.probability(BranchProbabilityNode.SLOW_PATH_PROBABILITY, ObjectHeaderImpl.isUnalignedHeader(objectHeader))) { BreakpointNode.breakpoint(); } if (BranchProbabilityNode.probability(BranchProbabilityNode.SLOW_PATH_PROBABILITY, fixedObject == null)) { BreakpointNode.breakpoint(); } - if (BranchProbabilityNode.probability(BranchProbabilityNode.SLOW_PATH_PROBABILITY, fixedObject.getClass().isArray())) { - BreakpointNode.breakpoint(); - } } boolean needsBarrier = RememberedSet.get().hasRememberedSet(objectHeader);