For the really impatient reader: OpenJDK for AArch64 on Fedora is now available. Skip to the end of this blog for information about how you can get it.
For everyone else:
This is the first of my AArch64 OpenJDK blogs. I’m the project lead of the AArch64 OpenJDK port, and I’ll be blogging here from time to time. There may not be many people reading this blog who don’t know what AArch64 is, but it’s the new 64-bit version of the wildly popular ARM processor. General availability of real AArch64 hardware isn’t going to be for a while yet, but we really want OpenJDK to be ready as soon as it is.
Oh, and OpenDK is the reference implementation - the gold standard - of the Java system and programming language.
We’ve been porting the OpenJDK implementation of Java to the new AArch64 processor architecture for a while now, and it’s starting to come together.
To explain where we are, I’ll first have to explain a few things about how HotSpot, the OpenJDK virtual machine, works. If you already know all this please feel free to skip.
HotSpot has lots of everything: multiple Just-In-Time compilers, multiple garbage collectors, and so on. The parts we’re concerned about when porting HotSpot are the Template Interpreter and the JIT compilers, which are called C1 and C2. These are sometimes referred to as the client compiler and the server compiler, but internally they’re called C1 and C2, so that’s how I’ll refer to them.
Once the Template Interpreter is done, you have a Java implementation. It’ll be slow because everything is interpreted, but it’ll work. We passed this milestone about six months ago. Since then we’ve been concentrating on the C1 and C2 JITs.
C1 is done, modulo a few remaining bugs in corner cases. These can take a while to find, so it’ll be some while before we’re ready for prime time, but I think we’re close. If you’re feeling keen and you’d like to kick the tyres you can go to http://fedoraproject.org/wiki/Architectures/ARM/AArch64/QuickStart and install Fedora.
This runs using an AArch64 simulator; you don’t need any special hardware.
Then install the RPMs at http://aph.fedorapeople.org/RPMS/ and:
$ java -version
openjdk version “1.8.0-internal”
OpenJDK Runtime Environment (build 1.8.0-internal-0)
OpenJDK 64-Bit Client VM (build 25.0-b22-internal, mixed mode)
$ java Hello
Hello, World!
C2 is going to take longer. We’re a fair way into the job and can compile several hundred methods], but it’s nowhere near ready. We’re pretty sure it will be ready before AArch64-compatible hardware is generally available, and that’s our goal.
If you want to explore AArch64 a bit more deeply, it’s easy to get the source code via Mercurial: http://hg.openjdk.java.net/aarch64-port/jdk8/raw-file/e9b5be85ca1d/README.aarch64
We’re usually on line at #openjdk on irc.oftc.net and will answer questions sent to the mailing lists at http://mail.openjdk.java.net/mailman/listinfo/aarch64-port-dev
Comments (and help) welcome!
Last updated: January 9, 2023