Red Hat developers porting OpenJDK to ARM64
Red Hat developers are porting OpenJDK to ARMv8, the 64-bit ARM architecture (also known as A64). According to a blog post by Andrew Haley of Red Hat, the development is taking place because "the current OpenJDK ARM situation is rather unsatisfactory, and we want to do better with A64". As ARM created a new instruction set for 64-bit, rather than just extending the 32-bit instruction set, this means that "to take advantage of the A64, we're going to need new compilers and Java virtual machines".
He explained that currently, for 32-bit ARM, there are two versions of the HotSpot Java VM; one owned by Oracle which is proprietary and one which is free that was written for ARM. The Oracle VM with its JIT engine performs better than the free one with its lightweight JIT. "We really don't want this situation for A64," says Haley. The company will be writing a port which will be entirely free software and will be submitted as an OpenJDK project which others can take part in.
The developers have already faced one problem; no real hardware exists for ARMv8 yet so they have created a simple CPU simulator to use for development testing. They do expect though to find "some gotchas" when they run on real hardware for the first time. The template interpreter, the foundation for any HotSpot port, is almost done and Haley says they hope to finish it by Christmas so that it is ready for preliminary public access. They are unable to release anything at present as the developers are under a non-disclosure agreement, but Haley says that should be lifted soon.
This interpreter release will be a complete implementation but it won't be fast. There are two different compiler technologies to be worked on, C1 (the client JIT) and C2 (the server JIT). The client JIT compiler wasn't initially in the developers' plans, but it is easier to write and should help the team learn more about the new processor architecture, which they will be able to apply when they develop the server JIT. It should also open the way for tiered compilation where code is first compiled by the client JIT and heavily used methods are then recompiled again by the server JIT.
Haley notes that "to the best of our knowledge, there hasn't been a full port of HotSpot done as an open project since OpenJDK was freed five years ago" and that makes the project both exciting and a "little scary". "But we're confident that this is going to work" he concludes, inviting comments and questions via the firstname.lastname@example.org email address as there is no mailing list set up.