Running jaotc with an external Graal

Andrew Haley aph at redhat.com
Thu Feb 16 12:25:04 UTC 2017


On 16/02/17 09:33, Doug Simon wrote:
> With the current bits in jdk9/hs and graal-core, the following bootstrapping command works in terms of replacing Graal in the JDK:
> 
> java -server -XX:+UnlockExperimentalVMOptions --module-path=/Users/dsimon/hs/truffle/mxbuild/modules/com.oracle.truffle.truffle_api.jar --upgrade-module-path=/Users/dsimon/hs/graal-core/mxbuild/modules/jdk.vm.compiler.jar --patch-module=jdk.vm.compiler=.jar -XX:+UseJVMCICompiler -XX:+BootstrapJVMCI -version
> 
> However, the --patch-module + --upgrade-module-path trick[1] we’re using to replace the version of Graal in the JDK apparently only works due to a bug that will be fixed at some point. From Mandy Chung:

Magic, thank you.  This works:

~/jdk10/hs/build/linux-aarch64-normal-server-release/jdk/bin/java \
-XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI \
--add-exports=java.base/jdk.internal.module=jdk.vm.compiler \
--upgrade-module-path=/nfs/zebedee/home/graal/aph/graal-core/mxbuild/modules/jdk.vm.compiler.jar \
--patch-module=jdk.vm.compiler=.jar \
--module-path=/nfs/zebedee/home/graal/aph/truffle/mxbuild/modules/com.oracle.truffle.truffle_api.jar:/nfs/zebedee/home/graal/aph/graal-core/mxbuild/modules/jdk.vm.compiler.jar \
-XX:+UseAOT -Djvmci.UseProfilingInformation=false \
-Dgraal.UseExceptionProbability=false -Djvmci.Compiler=graal \
--add-modules ALL-DEFAULT -m jdk.aot/jdk.tools.jaotc.Main ~/Hello.jar \
--output libHello.so

I'm posting it here for posterity.  It would indeed be very bad if we
could not do something at least equivalent to this.

Andrew.



More information about the jigsaw-dev mailing list