OpenJDK extension to AArch64 and Windows

Monica Beckwith Monica.Beckwith at microsoft.com
Thu Jun 25 12:16:51 UTC 2020


Hey Magnus,

Thank you so much for adding build-dev. I have subscribed to it now. It will be great if Ludovic can work with you in solving questions/concerns. If most of them are build system related, please feel free to drop the other aliases (except the cc one 😊). 
I appreciate you working with / guiding us.

-Monica

-----Original Message-----
From: Ludovic Henry <luhenry at microsoft.com> 
Sent: Wednesday, June 24, 2020 4:34 PM
To: Magnus Ihse Bursie <magnus.ihse.bursie at oracle.com>; Monica Beckwith <Monica.Beckwith at microsoft.com>; hotspot-runtime-dev at openjdk.java.net; aarch64-port-dev at openjdk.java.net; build-dev <build-dev at openjdk.java.net>
Cc: openjdk-aarch64 <openjdk-aarch64 at microsoft.com>
Subject: Re: OpenJDK extension to AArch64 and Windows

Hi Magnus,

Happy to answer any question you have on the build system changes.

A lot of the changes were due to the build system not supporting cross-compilation well when targetting the microsoft toolchain (it just never really had to support it). We had to go through a few hoops to remove as many of our own quick hacks, initially there just to get things building - like hardcoding the target being windows-aarch64 for example.

Thank you for your review,

--
Ludovic

________________________________________
From: Magnus Ihse Bursie <magnus.ihse.bursie at oracle.com>
Sent: Wednesday, June 24, 2020 13:44
To: Monica Beckwith; hotspot-runtime-dev at openjdk.java.net; aarch64-port-dev at openjdk.java.net; build-dev
Cc: openjdk-aarch64
Subject: Re: OpenJDK extension to AArch64 and Windows

Hi Monica,

All build system changes must be sent to build-dev for review by the build team, and you are doing quite a lot of build changes. (I'm cc:ing build-dev now.)

I did a quick scan and found some changes that looked odd enough to draw my attention.

I will need some time to fully understand what you are trying to accomplish here, before I can give a full review.

/Magnus


On 2020-06-24 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://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugs
> .openjdk.java.net%2Fbrowse%2FJDK-8248238&data=02%7C01%7CMonica.Bec
> kwith%40microsoft.com%7C120c1eb9f5a7460546b608d818864aec%7C72f988bf86f
> 141af91ab2d7cd011db47%7C1%7C0%7C637286312353215308&sdata=nkoPhKNfc
> GMjMoW8ZHlWFEunv72LJr8WbGYGAcjeVbs%3D&reserved=0
> Webrevs:
> `Webrev P1`: 
> https://nam06.safelinks.protection.outlook.com/?url=http:%2F%2Fcr.open
> jdk.java.net%2F~burban%2Fwinarm64_p1_llp64%2F&data=02%7C01%7CMonic
> a.Beckwith%40microsoft.com%7C120c1eb9f5a7460546b608d818864aec%7C72f988
> bf86f141af91ab2d7cd011db47%7C1%7C0%7C637286312353220284&sdata=wWVm
> AxaJ90jIoGd%2FFKn1ikVO17iFk9s6tDp9Eoaxemk%3D&reserved=0  & `Webrev 
> P2`: 
> https://nam06.safelinks.protection.outlook.com/?url=http:%2F%2Fcr.open
> jdk.java.net%2F~burban%2Fwinarm64_p2_new-target%2F&data=02%7C01%7C
> Monica.Beckwith%40microsoft.com%7C120c1eb9f5a7460546b608d818864aec%7C7
> 2f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637286312353220284&sdata
> =3jvwY%2B9rZkpBZBbh7c%2FeKsigh5Y5L%2BbdnAVlCF0yFcA%3D&reserved=0
>
> 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://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugs.openjdk.java.net%2Fbrowse%2FJDK-8247941&data=02%7C01%7CMonica.Beckwith%40microsoft.com%7C120c1eb9f5a7460546b608d818864aec%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637286312353220284&sdata=4HyuDEB%2FVPRWJ3Ls7V8WXKLp51Mn9%2F9lecTN4jTiYsU%3D&reserved=0
>       * 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://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgith
> ub.com%2Fmicrosoft%2Fopenjdk-aarch64%2Fblob%2Fmaster%2Fwkload-status-o
> n-Win%252BArm64.md&data=02%7C01%7CMonica.Beckwith%40microsoft.com%
> 7C120c1eb9f5a7460546b608d818864aec%7C72f988bf86f141af91ab2d7cd011db47%
> 7C1%7C0%7C637286312353220284&sdata=sq3mgeQIvl%2FJgbGz6xAlkV%2FJrZ5
> 5%2F6v0PqQG%2FhQvosw%3D&reserved=0
> [2] 
> https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgith
> ub.com%2Fmicrosoft%2Fopenjdk-aarch64%2Fblob%2Fmaster%2FJTRegtests.md&a
> mp;data=02%7C01%7CMonica.Beckwith%40microsoft.com%7C120c1eb9f5a7460546
> b608d818864aec%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C6372863123
> 53220284&sdata=DeDluHaDNU4bgXEaqlbF3ZugPJEWZhb%2B9QcoQZGXnBo%3D&am
> p;reserved=0 [3] 
> https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgith
> ub.com%2Fmicrosoft%2Fopenjdk-aarch64%2Fblob%2Fmaster%2FSPECJBB2015-tes
> t-matrices.md&data=02%7C01%7CMonica.Beckwith%40microsoft.com%7C120
> c1eb9f5a7460546b608d818864aec%7C72f988bf86f141af91ab2d7cd011db47%7C1%7
> C0%7C637286312353220284&sdata=KDyb6Q%2B85RbakKpLJaWWVSP3QXKOuYl%2B
> uesUmKLkcsg%3D&reserved=0 [4] 
> https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs
> .microsoft.com%2Fen-us%2Fcpp%2Fbuild%2Farm64-windows-abi-conventions%3
> Fview%3Dvs-2019%23integer-registers&data=02%7C01%7CMonica.Beckwith
> %40microsoft.com%7C120c1eb9f5a7460546b608d818864aec%7C72f988bf86f141af
> 91ab2d7cd011db47%7C1%7C0%7C637286312353225263&sdata=lxuqpXdoQbvNDY
> KE4JCKCtwzmWtpmw7sHBFBVp0Mwlo%3D&reserved=0



More information about the build-dev mailing list