AArch64: Status

Christian Thalinger christian.thalinger at oracle.com
Fri Feb 26 23:03:49 UTC 2016


Now that https://bugs.openjdk.java.net/browse/JDK-8150561 is integrated into hs-comp the Graal AArch64 port can run (almost) all bytecode unit tests successfully.  I say almost because there are two that are failing:

Tests run: 1374,  Failures: 2

These two fail because of the way AArch64Address works today.  In my opinion AArch64Address knows too much about low-level details of AArch64 addressing modes.  Fixing these two failures is non-trivial so I’m postponing this.

The next most important thing to fix is deoptimization.  Right now we crash every time we hit an uncommon trap or deoptimize for some other reason.  Here is a stack trace for a deoptimization:

#  Internal Error (/export/twisti/hs-comp-openjdk/hotspot/src/share/vm/runtime/deoptimization.cpp:89), pid=65989, tid=65990
#  assert(exec_mode >= 0 && exec_mode < Unpack_LIMIT) failed: Unexpected exec_mode

Stack: [0x0000ffff91e10000,0x0000ffff92010000],  sp=0x0000ffff9200ade0,  free space=2027k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0xe91a48]  VMError::report(outputStream*, bool)+0xfc0
V  [libjvm.so+0xe93970]  VMError::report_and_die(int, char const*, char const*, std::__va_list, Thread*, unsigned char*, void*, void*, char const*, int, unsigned long)+0x528
V  [libjvm.so+0xe93358]  VMError::report_and_die(Thread*, char const*, int, char const*, char const*, std::__va_list)+0x84
V  [libjvm.so+0x6e8be4]  report_vm_error(char const*, int, char const*, char const*, ...)+0x110
V  [libjvm.so+0x7052fc]  Deoptimization::UnrollBlock::UnrollBlock(int, int, int, int, long*, unsigned char**, BasicType, int)+0x19c
V  [libjvm.so+0x706e1c]  Deoptimization::fetch_unroll_info_helper(JavaThread*, int)+0x1680
V  [libjvm.so+0x70c8c8]  Deoptimization::uncommon_trap(JavaThread*, int, int)+0x68
v  ~DeoptimizationBlob
J 3367 JVMCI com.oracle.graal.jtt.except.BC_checkcast.test(I)I (42 bytes) @ 0x0000ffff84d530a4 [0x0000ffff84d53000+0x00000000000000a4] (null)
C  0x0000ffff9200c978

The assert suggests there is some code missing in the DeoptimizationBlob.  Another way would be to implement PreferGraalStubs=true and use these by default on AArch64.  That would be my preferred way, actually, because the reason I introduced DeoptimizationStub and UncommonTrapStub was to make porting to a new architecture easier.  And this is one of these rare cases!

Also, I’m seeing issues with biased locking and method flushing very likely related to stack walking.  Although garbage collections seemingly do work.

Oh, and I haven’t implemented compressed oops yet (that’s the low-hanging fruit!).

Anyway, I have to go off and work on something else for a while so it would be great if other people could pick up some of the open issues.

————

/export/twisti/hs-comp-openjdk/graal-core$ mx unittest -XX:-UseCompressedOops bytecode.BC
MxJUnitCore
JUnit version 4.11
......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................[thread:1] scope: main
  [thread:1] scope: main.BC_multianewarray04
    [thread:1] scope: main.BC_multianewarray04.Compiling
      [thread:1] scope: main.BC_multianewarray04.Compiling.Compile
        [thread:1] scope: main.BC_multianewarray04.Compiling.Compile.GraalCompiler
          [thread:1] scope: main.BC_multianewarray04.Compiling.Compile.GraalCompiler.BackEnd
            [thread:1] scope: main.BC_multianewarray04.Compiling.Compile.GraalCompiler.BackEnd.CodeGen
              [thread:1] scope: main.BC_multianewarray04.Compiling.Compile.GraalCompiler.BackEnd.CodeGen.InterceptException
              Exception occurred in scope: main.BC_multianewarray04.Compiling.Compile.GraalCompiler.BackEnd.CodeGen.InterceptException
              Context obj jdk.vm.ci.common.JVMCIError: java.lang.AssertionError
              	at lir instruction: B0 at 4 r3|q = STACKLOADADDRESS stack:32|q
              [B0]
              Context obj com.oracle.graal.hotspot.HotSpotLIRGenerationResult at 4f2fdf3d
              Context obj com.oracle.graal.lir.LIR at d180961
              Context obj com.oracle.graal.nodes.StructuredGraph$ScheduleResult at 4af7ac25
              Context obj StructuredGraph:5089{HotSpotMethod<BC_multianewarray04.test(int)>}
              Context obj jdk.vm.ci.hotspot.HotSpotCodeCacheProvider at 3cf06a01
              Context obj DebugDumpScope[1667]
E.  [thread:1] scope: main.BC_multianewarray04
    [thread:1] scope: main.BC_multianewarray04.Compiling
      [thread:1] scope: main.BC_multianewarray04.Compiling.Compile
        [thread:1] scope: main.BC_multianewarray04.Compiling.Compile.GraalCompiler
          [thread:1] scope: main.BC_multianewarray04.Compiling.Compile.GraalCompiler.BackEnd
            [thread:1] scope: main.BC_multianewarray04.Compiling.Compile.GraalCompiler.BackEnd.CodeGen
              [thread:1] scope: main.BC_multianewarray04.Compiling.Compile.GraalCompiler.BackEnd.CodeGen.InterceptException
              Exception occurred in scope: main.BC_multianewarray04.Compiling.Compile.GraalCompiler.BackEnd.CodeGen.InterceptException
              Context obj jdk.vm.ci.common.JVMCIError: java.lang.AssertionError
              	at lir instruction: B0 at 4 r3|q = STACKLOADADDRESS stack:32|q
              [B0]
              Context obj com.oracle.graal.hotspot.HotSpotLIRGenerationResult at 69ab2d6a
              Context obj com.oracle.graal.lir.LIR at 505a8582
              Context obj com.oracle.graal.nodes.StructuredGraph$ScheduleResult at 57afe44b
              Context obj StructuredGraph:5130{HotSpotMethod<BC_multianewarray04.test(int)>}
              Context obj jdk.vm.ci.hotspot.HotSpotCodeCacheProvider at 3cf06a01
              Context obj DebugDumpScope[1668]
E.......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Time: 21.214
There were 2 failures:
1) run0(com.oracle.graal.jtt.bytecode.BC_multianewarray04)
jdk.vm.ci.common.JVMCIError: java.lang.AssertionError
	at lir instruction: B0 at 4 r3|q = STACKLOADADDRESS stack:32|q
[B0]
	at com.oracle.graal.lir.asm.CompilationResultBuilder.emitOp(CompilationResultBuilder.java:431)
	at com.oracle.graal.lir.asm.CompilationResultBuilder.emitBlock(CompilationResultBuilder.java:417)
	at com.oracle.graal.lir.asm.CompilationResultBuilder.emit(CompilationResultBuilder.java:396)
	at com.oracle.graal.hotspot.aarch64.AArch64HotSpotBackend.emitCodeBody(AArch64HotSpotBackend.java:291)
	at com.oracle.graal.hotspot.aarch64.AArch64HotSpotBackend.emitCode(AArch64HotSpotBackend.java:245)
	at com.oracle.graal.compiler.GraalCompiler.emitCode(GraalCompiler.java:333)
	at com.oracle.graal.compiler.GraalCompiler.emitBackEnd(GraalCompiler.java:229)
	at com.oracle.graal.compiler.GraalCompiler.compile(GraalCompiler.java:172)
	at com.oracle.graal.compiler.test.GraalCompilerTest.compile(GraalCompilerTest.java:772)
	at com.oracle.graal.compiler.test.GraalCompilerTest.getCode(GraalCompilerTest.java:722)
	at com.oracle.graal.jtt.JTTTest.getCode(JTTTest.java:90)
	at com.oracle.graal.compiler.test.GraalCompilerTest.getCode(GraalCompilerTest.java:679)
	at com.oracle.graal.compiler.test.GraalCompilerTest.executeActual(GraalCompilerTest.java:535)
	at com.oracle.graal.compiler.test.GraalCompilerTest.executeActualCheckDeopt(GraalCompilerTest.java:645)
	at com.oracle.graal.compiler.test.GraalCompilerTest.testAgainstExpected(GraalCompilerTest.java:668)
	at com.oracle.graal.jtt.JTTTest.runTest(JTTTest.java:128)
	at com.oracle.graal.jtt.JTTTest.runTest(JTTTest.java:115)
	at com.oracle.graal.jtt.JTTTest.runTest(JTTTest.java:111)
	at com.oracle.graal.jtt.bytecode.BC_multianewarray04.run0(BC_multianewarray04.java:122)
	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:520)
	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.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
	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.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
	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.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.runner.JUnitCore.run(JUnitCore.java:160)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:138)
	at com.oracle.mxtool.junit.MxJUnitWrapper.main(MxJUnitWrapper.java:167)
Caused by: java.lang.AssertionError
	at com.oracle.graal.asm.aarch64.AArch64MacroAssembler.makeAddress(AArch64MacroAssembler.java:181)
	at com.oracle.graal.asm.aarch64.AArch64MacroAssembler.makeAddress(AArch64MacroAssembler.java:1399)
	at com.oracle.graal.asm.aarch64.AArch64MacroAssembler.makeAddress(AArch64MacroAssembler.java:49)
	at com.oracle.graal.lir.asm.CompilationResultBuilder.asAddress(CompilationResultBuilder.java:372)
	at com.oracle.graal.lir.aarch64.AArch64Move$StackLoadAddressOp.emitCode(AArch64Move.java:185)
	at com.oracle.graal.lir.aarch64.AArch64LIRInstruction.emitCode(AArch64LIRInstruction.java:37)
	at com.oracle.graal.lir.asm.CompilationResultBuilder.emitOp(CompilationResultBuilder.java:429)
	... 49 more
2) run1(com.oracle.graal.jtt.bytecode.BC_multianewarray04)
jdk.vm.ci.common.JVMCIError: java.lang.AssertionError
	at lir instruction: B0 at 4 r3|q = STACKLOADADDRESS stack:32|q
[B0]
	at com.oracle.graal.lir.asm.CompilationResultBuilder.emitOp(CompilationResultBuilder.java:431)
	at com.oracle.graal.lir.asm.CompilationResultBuilder.emitBlock(CompilationResultBuilder.java:417)
	at com.oracle.graal.lir.asm.CompilationResultBuilder.emit(CompilationResultBuilder.java:396)
	at com.oracle.graal.hotspot.aarch64.AArch64HotSpotBackend.emitCodeBody(AArch64HotSpotBackend.java:291)
	at com.oracle.graal.hotspot.aarch64.AArch64HotSpotBackend.emitCode(AArch64HotSpotBackend.java:245)
	at com.oracle.graal.compiler.GraalCompiler.emitCode(GraalCompiler.java:333)
	at com.oracle.graal.compiler.GraalCompiler.emitBackEnd(GraalCompiler.java:229)
	at com.oracle.graal.compiler.GraalCompiler.compile(GraalCompiler.java:172)
	at com.oracle.graal.compiler.test.GraalCompilerTest.compile(GraalCompilerTest.java:772)
	at com.oracle.graal.compiler.test.GraalCompilerTest.getCode(GraalCompilerTest.java:722)
	at com.oracle.graal.jtt.JTTTest.getCode(JTTTest.java:90)
	at com.oracle.graal.compiler.test.GraalCompilerTest.getCode(GraalCompilerTest.java:679)
	at com.oracle.graal.compiler.test.GraalCompilerTest.executeActual(GraalCompilerTest.java:535)
	at com.oracle.graal.compiler.test.GraalCompilerTest.executeActualCheckDeopt(GraalCompilerTest.java:645)
	at com.oracle.graal.compiler.test.GraalCompilerTest.testAgainstExpected(GraalCompilerTest.java:668)
	at com.oracle.graal.jtt.JTTTest.runTest(JTTTest.java:128)
	at com.oracle.graal.jtt.JTTTest.runTest(JTTTest.java:115)
	at com.oracle.graal.jtt.JTTTest.runTest(JTTTest.java:111)
	at com.oracle.graal.jtt.bytecode.BC_multianewarray04.run1(BC_multianewarray04.java:127)
	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:520)
	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.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
	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.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
	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.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.runner.JUnitCore.run(JUnitCore.java:160)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:138)
	at com.oracle.mxtool.junit.MxJUnitWrapper.main(MxJUnitWrapper.java:167)
Caused by: java.lang.AssertionError
	at com.oracle.graal.asm.aarch64.AArch64MacroAssembler.makeAddress(AArch64MacroAssembler.java:181)
	at com.oracle.graal.asm.aarch64.AArch64MacroAssembler.makeAddress(AArch64MacroAssembler.java:1399)
	at com.oracle.graal.asm.aarch64.AArch64MacroAssembler.makeAddress(AArch64MacroAssembler.java:49)
	at com.oracle.graal.lir.asm.CompilationResultBuilder.asAddress(CompilationResultBuilder.java:372)
	at com.oracle.graal.lir.aarch64.AArch64Move$StackLoadAddressOp.emitCode(AArch64Move.java:185)
	at com.oracle.graal.lir.aarch64.AArch64LIRInstruction.emitCode(AArch64LIRInstruction.java:37)
	at com.oracle.graal.lir.asm.CompilationResultBuilder.emitOp(CompilationResultBuilder.java:429)
	... 49 more

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



More information about the graal-dev mailing list