RFD: AOT for AArch64

Vladimir Kozlov vladimir.kozlov at oracle.com
Fri Mar 23 23:27:30 UTC 2018

Hi Andrew,

This is great!!!

I checked Hotspot changes and they seems fine. At least I build and ran AOT tests on X64 Linux.

Please, explain changes in JvmFeatures.gmk.

Few question about jaotc changes. TODO part in CodeSectionProcessor.java - you not doing it for 
aarch64. Why? May be we don't need to for x64 too. Originally it was added because when we used 
libelf tools to geenrate .o files linker did not patch this memory if it is not 0.

Code in AOTCompiledClass.java look strange in try block. Why you need it?

Why you made allocate_metadata_index virtual in oopRecorder.hpp?

May be we need java property to keep object file.

I wasn't able to extract patch from aarch64-branch-overflows branch. I am new to git:

$ git branch
* master
$ git diff master aarch64-branch-overflows

I see changes in


Can you just send a patch instead? And update it to latest Graal master?


On 3/23/18 11:11 AM, Andrew Haley wrote:
> How to build it:
> Check out jdk-hs.  Apply
> http://cr.openjdk.java.net/~aph/jaotc/jdk-hs-1/ to that checkout then
> build OpenJDK images.
> Then
>   $ git checkout https://github.com/theRealAph/graal.git
>   $ cd graal
>   $ git branch aarch64-branch-overflows
> MAKE SURE that JAVA_HOME is pointing at the jdk-hs you just built:
>   $ export JAVA_HOME=/local/jdk-hs/build/linux-aarch64-normal-server-release/images/jdk/
> Follow the "Building Graal" instructions at
> https://github.com/theRealAph/graal/tree/aarch64-branch-overflows/compiler
> My graal is in /local/graal/ and my jdk-hs is in /local/jdk-hs/.
> To run jaotc, I do something like this:
> /local/jdk-hs/build/linux-aarch64-normal-server-release/images/jdk/bin/jaotc \
> -J--module-path=/local/graal/graal/sdk/mxbuild/modules/org.graalvm.graal_sdk.jar:/local/graal/graal/truffle/mxbuild/modules/com.oracle.truffle.truffle_api.jar \
> -J--upgrade-module-path=/local/graal/graal/compiler/mxbuild/modules/jdk.internal.vm.compiler.jar \
> myjar.jar --output myjar.so
> Note that the "-J" commands point jaotc at the version of Graal you've
> just built rather than OpenJDK's built-in version of Graal.
> Enjoy.

More information about the hotspot-dev mailing list