跳到主要内容

JEP 297: Unified arm32/arm64 Port

Summary

Integrate the unified port of HotSpot for arm32 and arm64, contributed by Oracle, into the JDK.

Motivation

The main motivation is to provide arm32/aarch32 support in the JDK. Although there have been some efforts to support arm32/aarch32, the only maintained option in the JDK today is the Zero port. The contribution from Oracle provides full C1 and C2 support for ARM, putting it on par with other architectures.

The port also provides support for arm64/aarch64, however this is less of a motivation since the JDK already includes an aarch64-only port.

Description

The contribution from Oracle provides C1 and C2 support for both arm32 and arm64. The code has been merged into a JDK 9 tree in a separate repository in the aarch32 project area.

Oracle's intention to open source the ARM port was announced on the aarch32 mailing list on Aug 23, 2016 and there have been several discussion threads on the aarch32 mailing list. Please follow the links below to see these discussions.

On an open conference call on Fri, Oct 21, 2016, it was agreed that we should push for this to be included in the JDK. No formal minutes were kept but notes from the meeting were published to the aarch32 list.

The webrev for the Oracle contribution is available at http://cr.openjdk.java.net/~bobv/arm3264/webrev and a merged jdk9 tree at http://hg.openjdk.java.net/aarch32-port/jdk9-arm3264.

The merged tree is capable of building a minimal, client, or server VM for arm32 or arm64. The tree can also build the existing aarch64 port.

There is an additional ARM specific option, --with-cpu-port, which can be used to specify the new aarch64 build --with-cpu-port=arm64 or the existing aarch64 build --with-cpu-port=aarch64. If no option is specified the build defaults to the existing aarch64 build.

It is intended that the default build for aarch64 will remain the existing aarch64 build.

Testing

The port has been tested internally by Oracle since it is part of Oracle's proprietary VM. As such it has been tested with JPRT and other internal tests.

The JDK 9 tree in the aarch32 project has been tested using jtreg in a variety of configurations including hard/soft FP, release/debug builds and client/server builds. A couple of issues were found with the merged sources which have been fixed.

Risks

The changes to shared code have been kept to a minimum. The contributed port shares #ifdefs with the aarch64 port. In addition the #ifdefs for ARM are already in the shared code. This means that the changes to shared code are limited to build changes and a single #ifdef in libproc.h.

Since the sources originate from the closed source port within Oracle they are a known quantity within Oracle and this significantly reduces the associated risks of merging this into the JDK.

There is a risk of confusion amongst people building JDK by the fact that there will be two aarch64 ports, the existing aarch64 port and the unified arm32/arm64 port.