Latest Graal and AArch64 WTF?

Andrew Dinn adinn at redhat.com
Thu Jul 26 10:29:03 UTC 2018


The latest graalvm repos on github include a helpful source tree for
building a JVMCI-enabled jdk8u:

  https://github.com/graalvm/graal-jvmci-8

and Oracle even offer a helpful, pre-built x86_64 download.

This specific repo exists because -- for somewhat unaccountable (or at
least unaccounted) reasons -- the mx scripts demand that you have a jdk8
available to execute some part of the build process /even if/ you are
trying to build the Graal compiler using jdk11 (or the jdk dev tree) for
use with jdk11 (or, respectively, the jdk dev tree).

So, some version of the JVCMI code, lots of tooling patches (e.g. to the
IdealGraphVisualizer) and a bunch of hotspot shared and CPU changes have
been munged into a variant of the jdk8u hotspot src tree embedded in the
above repo.

Unfortunately, a big problem with this change to the build process is
that this hotspot source tree is based on the upstream jdk8u repo and
not on Red Hat's downstream jdk8u-aarch64 or jdk8u-shenandoah repos (the
ones that include the AArch64 port of OpenJDK used by all Linux+AArch64
releases).

As a consequence, it is now /impossible/ to build the Graal compiler on
AArch64 without first porting all that hotspot gubbins into our
downstream repo.

Let me just restate that for emphasis: it is now /impossible/ to build,
maintain, fix or in any way extend or improve the functionality of the
Graal compiler on AArch64. The AArch64 bits are rotting as regards use
on jdk8 or any other, later jdk.

That makes the decision to make this change to the build system a rather
bad one, in my opinion. I say that because having looked at the
differences introduced into the above repo by diffing it with the
corresponding jdk8u tree I am pretty sure that porting the changes it
includes to our jdk8u-aarch64 tree is a non-starter.

If the jdk8 back-porting effort had initially been done using our
AArch64 tree this decision might not have been so awful, however
distasteful I find the idea that you have to use two different JDKs to
build Graal for a given target JDK.

Given the current impasse as regards progress with AArch64 I think it is
imperative that some way is found of building the Graal compiler using
jdk11+ for target jdk11+ that does not also require a tweaked jdk8
compiler. I would like to fix whatever is needed in the Graal or JVMCI
code or the mx scripts to make that possible.

So, could someone provide the background rationale for this change and
why it was seen as better than fixing the Graal, JVMCI and/or mx code?
Does anyone have any other information that might help scope what would
need to be changed in Graal, JVMCI or mx in order to allow JDK11 to
generate a JDK11 compatible Graal compiler?

regards,


Andrew Dinn
-----------
Senior Principal Software Engineer
Red Hat UK Ltd
Registered in England and Wales under Company Registration No. 03798903
Directors: Michael Cunningham, Michael ("Mike") O'Neill, Eric Shander


More information about the graal-dev mailing list