[aarch64-port-dev ] OpenJDK extension to AArch64 and Windows

Dalibor Topic dalibor.topic at oracle.com
Thu Jun 25 14:49:37 UTC 2020

Hi Monica,

it sounds as if you're making good progress on porting OpenJDK to a new 
opertaing system/cpu architecture combination.

Typically such efforts would become with a porting Project of their own, 
just as the aarch64-linux port did back in 2013 [1], as that allows a 
community of developers across organizations to start to collaborate 
around a shared repository, mailing list, etc. on a specific porting task.

It also makes it easier to do so, by allowing the initial set of 
developers on the port to become committers on the new project from the 
start, without having to work their way up to 8 or more significant 
sponsored changes first [0]. So that's what I (with my Porting Group 
Lead hat on) would usually recommend that course for new ports.

If you'd like to propose a new porting Project, you can find the 
instructions on how to do so here: 

Once you have porting a Project, you can start/continue working on the 
port at your own pace. You'll probably accumulate both changes that are 
specific to your port, as as well as more general changes, in the 
process of doing that.

A good idea is to try to push changes that are not specific to your 
port, but instead may be of more general value to mainline, through 
individual patches. That makes it easier to regularly sync with 
mainline, and makes your life easier when it comes to merging a port 
into mainline eventually.

For that to happen, there ultimately would need to be a JEP accompanying 
the feature, and of course the port would have to be complete, 
maintained, and last but not least pass the latest JCK for the Java SE 

But considering that you're just starting out, that's still somewhere 
down the road, so first things first: welcome (back), and good luck with 
the port!

dalibor topic

[0] https://openjdk.java.net/projects/#project-committer
[1] http://mail.openjdk.java.net/pipermail/announce/2013-January/000142.html

On 24.06.2020 18:40, Monica Beckwith wrote:
> Hello OpenJDK community,
> As the project lead here @Microsoft, I am pleased to share that we have been working towards a Windows addition to the OpenJDK AArch64 port. We are very thankful to all that have contributed to the Linux+aarch64 and Windows+x86-64. Both these codebases came to our rescue on numerous occasions.
> Support status: We have successfully ported C2 and can build the server release (cross-compiled environment)
> Test coverage: C2 + ParallelGC (No AOT, JVMCI, ZGC, ShenandoahGC, G1GC)
> Tests and benchmarks covered [1]: JTReg [2], JCStress, jmh-jdk-microbenchmarks, SPEC SERT, SPECJBB2015 [3], SPEC JVM2008, Scimark2, SPEC JBB2005.
> Umbrella Bug ID: https://bugs.openjdk.java.net/browse/JDK-8248238
> Webrevs:
> `Webrev P1`: http://cr.openjdk.java.net/~burban/winarm64_p1_llp64/  &
> `Webrev P2`: http://cr.openjdk.java.net/~burban/winarm64_p2_new-target/
> The first patch `Webrev P1` (patch 1 aka P1 in our tests) helps integrate support for Windows (LLP64) on Linux + AArch64
> The second patch `Webrev P2` (patch 2 aka P2 in our tests) adds the 'windows-aarch64' support in `os_cpu`. We also had to modify shared code, and I am highlighting a few details here:
> 	* In windows_x86 such as the `get_frame_at_stack_banging_point` in `os_windows_x86.cpp`,
> 	* In `os/windows os_windows.cpp` to make it aware of Windows + Arm64
> 	* `os/windows` in `threadCritical_windows.cpp`,
> 	* Windbg support
> 	* `globalDefinitions_visCPP.hpp` in `share/utilities`
> 	* We also added Vectored Exception Handling (VEH) to P2, as it is a requirement on Windows + Arm64 (due to ABI specifications).
> Also, in `Webrev P2`, you will find that we have made some significant changes to `cpu/aarch64` around register usage since on Windows + Arm64, register R18 points to TEB [4]. We have discussed this with Andrew Haley and Andrew Dinn, and they are helping us with a cleaner implementation of the same. Their constant support and guidance have humbled me.
> I'd also like to recognize the great work done by Ludovic Henry (our resident runtime expert) in driving the C2 support and by Bernhard Urban-Forster, (who recently joined our team) in helping expand the coverage to G1 GC.
> As a part of this project, we have also worked on two additional patches:
> 	* Expanding VEH on Windows to x86-64 (patch 3 aka P3 in our tests). Details here: https://bugs.openjdk.java.net/browse/JDK-8247941
> 	* Improvements in the shared cross-platform code on Windows (patch 4 aka P4 in our tests) - We will send out a separate patch soon.
> We welcome any feedback and comments from the community and are looking forward to working together.
> Regards,
> Monica
> [1] https://github.com/microsoft/openjdk-aarch64/blob/master/wkload-status-on-Win%2BArm64.md
> [2] https://github.com/microsoft/openjdk-aarch64/blob/master/JTRegtests.md
> [3] https://github.com/microsoft/openjdk-aarch64/blob/master/SPECJBB2015-test-matrices.md
> [4] https://docs.microsoft.com/en-us/cpp/build/arm64-windows-abi-conventions?view=vs-2019#integer-registers

<http://www.oracle.com> Dalibor Topic
Consulting Product Manager
Phone: +494089091214 <tel:+494089091214>, Mobile: +491737185961
<tel:+491737185961>, Video: dalibor.topic at oracle.com
<sip:dalibor.topic at oracle.com>

Oracle Global Services Germany GmbH
Hauptverwaltung: Riesstr. 25, D-80992 München
Registergericht: Amtsgericht München, HRB 246209
Geschäftsführer: Ralf Herrmann

More information about the hotspot-runtime-dev mailing list