49
49
import jdk .graal .compiler .core .common .GraalOptions ;
50
50
import jdk .graal .compiler .core .common .spi .ForeignCallDescriptor ;
51
51
import jdk .graal .compiler .graph .Node ;
52
+ import jdk .graal .compiler .graph .Node .ConstantNodeParameter ;
53
+ import jdk .graal .compiler .graph .Node .NodeIntrinsic ;
52
54
import jdk .graal .compiler .nodes .BreakpointNode ;
53
55
import jdk .graal .compiler .nodes .NamedLocationIdentity ;
54
56
import jdk .graal .compiler .nodes .extended .BranchProbabilityNode ;
@@ -74,8 +76,7 @@ public class BarrierSnippets extends SubstrateTemplates implements Snippets {
74
76
public static final LocationIdentity CARD_REMEMBERED_SET_LOCATION = NamedLocationIdentity .mutable ("CardRememberedSet" );
75
77
76
78
private static final SnippetRuntime .SubstrateForeignCallDescriptor POST_WRITE_BARRIER = SnippetRuntime .findForeignCall (BarrierSnippets .class , "postWriteBarrierStub" ,
77
- NO_SIDE_EFFECT ,
78
- CARD_REMEMBERED_SET_LOCATION );
79
+ NO_SIDE_EFFECT , CARD_REMEMBERED_SET_LOCATION );
79
80
80
81
private final SnippetInfo postWriteBarrierSnippet ;
81
82
@@ -108,8 +109,8 @@ public static void postWriteBarrierStub(Object object) {
108
109
}
109
110
}
110
111
111
- @ Node . NodeIntrinsic (ForeignCallNode .class )
112
- private static native void callPostWriteBarrierStub (@ Node . ConstantNodeParameter ForeignCallDescriptor descriptor , Object object );
112
+ @ NodeIntrinsic (ForeignCallNode .class )
113
+ private static native void callPostWriteBarrierStub (@ ConstantNodeParameter ForeignCallDescriptor descriptor , Object object );
113
114
114
115
@ Snippet
115
116
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
120
121
if (SerialGCOptions .VerifyWriteBarriers .getValue () && alwaysAlignedChunk ) {
121
122
/*
122
123
* To increase verification coverage, we do the verification before checking if a
123
- * barrier is needed at all. And in addition to verifying that the object is in an
124
- * aligned chunk, we also verify that it is not an array at all because most arrays are
125
- * small and therefore in an aligned chunk.
124
+ * barrier is needed at all.
126
125
*/
127
-
128
126
if (BranchProbabilityNode .probability (BranchProbabilityNode .SLOW_PATH_PROBABILITY , ObjectHeaderImpl .isUnalignedHeader (objectHeader ))) {
129
127
BreakpointNode .breakpoint ();
130
128
}
131
129
if (BranchProbabilityNode .probability (BranchProbabilityNode .SLOW_PATH_PROBABILITY , fixedObject == null )) {
132
130
BreakpointNode .breakpoint ();
133
131
}
134
- if (BranchProbabilityNode .probability (BranchProbabilityNode .SLOW_PATH_PROBABILITY , fixedObject .getClass ().isArray ())) {
135
- BreakpointNode .breakpoint ();
136
- }
137
132
}
138
133
139
134
boolean needsBarrier = RememberedSet .get ().hasRememberedSet (objectHeader );
0 commit comments