checkSnippetKills
Deneau, Tom
tom.deneau at amd.com
Wed Mar 26 19:36:07 UTC 2014
I just tried this with the amd64 backend and got similar results
I compiled:
MyObj[] escapingObject;
public void newObjTest(int gid) {
escapingObject[gid] = new MyObj();
}
and using -G:+SnippetCounters
The log showed
Lowering allocateInstance in StructuredGraph:18{HotSpotMethod<BasicTest2.newObjTest(int)>}: node=159|NewInstance, template=StructuredGraph:39{HotSpotMethod<NewObjectSnippets.allocateInstance(int, Word, Word, boolean, Register, boolean, String)>}(<constant> [0], long [1], <unused> [2], <constant> [3], <constant> [4], <constant> [5], <constant> [6]), arguments=Parameters<NewObjectSnippets.allocateInstance [const size = 16, hub = 124|Const(4296021216), prototypeMarkWord = 5, const fillContents = true, const threadRegister = r15, const constantSize = true, const typeContext = >
WARNING: 159|NewInstance is not a MemoryCheckpoint, but the snippet graph contains kills ([ANY_LOCATION]). You might want 159|NewInstance to be a MemoryCheckpoint
[thread:1] scope: BasicTest2.Compiling.GraalCompiler.FrontEnd.LowTier.Lowering.IncrementalCanonicalizer.LoweringIteration0.InterceptException
Exception occurred in scope: BasicTest2.Compiling.GraalCompiler.FrontEnd.LowTier.Lowering.IncrementalCanonicalizer.LoweringIteration0.InterceptException
Context obj java.lang.AssertionError: snippet graph contains a kill to ANY_LOCATION, but replacee (159|NewInstance) doesn't kill ANY_LOCATION. kills: [ANY_LOCATION]
> -----Original Message-----
> From: Deneau, Tom
> Sent: Wednesday, March 26, 2014 2:27 PM
> To: graal-dev at openjdk.java.net
> Subject: checkSnippetKills
>
> I have a snippet for NewInstance that works but I wanted to increment a
> snippet counter on one of the paths thru the snippet. After doing that
> and using -G:+SnippetCounters, I get the following error:
>
> java.lang.AssertionError: snippet graph contains a kill to ANY_LOCATION,
> but replacee (333|NewInstance) doesn't kill ANY_LOCATION. kills:
> [ANY_LOCATION, Initialization]
> at
> com.oracle.graal.replacements.SnippetTemplate.checkSnippetKills(SnippetT
> emplate.java:946)
>
> How should this be corrected?
>
> -- Tom
More information about the graal-dev
mailing list