HSAIL (tests) and inlining issue

Doug Simon doug.simon at oracle.com
Tue Jun 17 15:03:21 UTC 2014


Eric, Tom,

We’ve had issues on our gate recently caused by intermittent failures of NewStringEqualsTest (stack trace below). If StringIndexOutOfBoundsException is resolved before this test is run, then inlining exhausts its budget before getting to inline String.equals which in turn leaves a direct call in the graph, something that HSAIL cannot currently handle. The primary problem is the use of InlineEverything and RemoveNeverExecutedCode in the HSAIL tests. As we’ve seen, these don’t actually guarantee everything will be inlined.

For now, I’ve disabled NewStringEqualsTest and added a comment as to why. I’m not sure what the longer term solution is. I’d at least like to see RemoveNeverExecutedCode go away - do we really need it?

Now that HSAIL supports deopt, maybe we can change InlineEverything to InlineEverythingOrDeopt - calls that cannot be inlined are replace with DopetimizeNodes.

-Doug


2) testUsingLambdaMethod(com.oracle.graal.compiler.hsail.test.lambda.NewStringEqualsTest)
com.oracle.graal.graph.GraalGraphInternalError: com.oracle.graal.compiler.common.GraalInternalError: unimplemented: direct call to java.lang.String.equals(Object)
	at node: 110|Invoke#Direct#String.equals
	at com.oracle.graal.graph.GraalGraphInternalError.transformAndAddContext(GraalGraphInternalError.java:136)
	at com.oracle.graal.compiler.gen.NodeLIRBuilder.doBlock(NodeLIRBuilder.java:220)
	at com.oracle.graal.compiler.GraalCompiler.emitBlock(GraalCompiler.java:216)
	at com.oracle.graal.compiler.GraalCompiler.emitLIR(GraalCompiler.java:250)
	at com.oracle.graal.compiler.GraalCompiler.emitBackEnd(GraalCompiler.java:198)
	at com.oracle.graal.compiler.GraalCompiler.compileGraph(GraalCompiler.java:141)
	at com.oracle.graal.hotspot.hsail.HSAILHotSpotBackend.compileKernel(HSAILHotSpotBackend.java:195)
	at com.oracle.graal.hotspot.hsail.HSAILHotSpotBackend.compileAndInstallKernel(HSAILHotSpotBackend.java:153)
	at com.oracle.graal.compiler.hsail.test.infra.GraalKernelTester.dispatchKernelOkra(GraalKernelTester.java:163)
	at com.oracle.graal.compiler.hsail.test.infra.KernelTester.dispatchLambdaMethodKernelOkra(KernelTester.java:598)
	at com.oracle.graal.compiler.hsail.test.infra.KernelTester.dispatchLambdaMethodKernel(KernelTester.java:279)
	at com.oracle.graal.compiler.hsail.test.infra.KernelTester.dispatchLambdaKernel(KernelTester.java:301)
	at com.oracle.graal.compiler.hsail.test.lambda.NewStringEqualsTest.runTest(NewStringEqualsTest.java:55)
	at com.oracle.graal.compiler.hsail.test.infra.KernelTester.runOkraInstance(KernelTester.java:666)
	at com.oracle.graal.compiler.hsail.test.infra.KernelTester.assertOkraEqualsSeq(KernelTester.java:656)
	at com.oracle.graal.compiler.hsail.test.infra.KernelTester.testGeneratedHsailUsingLambdaMethod(KernelTester.java:683)
	at com.oracle.graal.compiler.hsail.test.infra.GraalKernelTester.testGeneratedHsailUsingLambdaMethod(GraalKernelTester.java:206)
	at com.oracle.graal.compiler.hsail.test.lambda.NewStringEqualsTest.testUsingLambdaMethod(NewStringEqualsTest.java:76)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:483)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
	at org.junit.runners.Suite.runChild(Suite.java:127)
	at org.junit.runners.Suite.runChild(Suite.java:26)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
	at org.junit.runn
ers.ParentRunner.runChildren(ParentRunner.java:236)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:138)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:117)
	at com.oracle.graal.test.GraalJUnitCore.main(GraalJUnitCore.java:102)
	at JUnitWrapper.main(JUnitWrapper.java:78)
Caused by: com.oracle.graal.compiler.common.GraalInternalError: unimplemented: direct call to java.lang.String.equals(Object)
	at com.oracle.graal.compiler.common.GraalInternalError.unimplemented(GraalInternalError.java:40)
	at com.oracle.graal.compiler.hsail.HSAILNodeLIRBuilder.emitDirectCall(HSAILNodeLIRBuilder.java:50)
	at com.oracle.graal.compiler.gen.NodeLIRBuilder.emitInvoke(NodeLIRBuilder.java:472)
	at com.oracle.graal.nodes.InvokeNode.generate(InvokeNode.java:131)
	at com.oracle.graal.compiler.gen.NodeLIRBuilder.emitNode(NodeLIRBuilder.java:312)
	at com.oracle.graal.hotspot.hsail.HSAILHotSpotNodeLIRBuilder.emitNode(HSAILHotSpotNodeLIRBuilder.java:56)
	at com.oracle.graal.compiler.gen.NodeLIRBuilder.doRoot(NodeLIRBuilder.java:303)
	at com.oracle.graal.compiler.gen.NodeLIRBuilder.doBlock(NodeLIRBuilder.java:218)
	... 46 more

FAILURES!!!
Tests run: 4527,  Failures: 2


More information about the graal-dev mailing list