官方原文(英文)地址:
https://openjdk.java.net/jeps/391
个人原创翻译,转载请注明出处。
Port the JDK to macOS/AArch64.
将JDK移植到macOS/AArch64。
Apple has announced a long-term plan to transition their line of Macintosh computers from x64 to AArch64. We therefore expect to see broad demand for a macOS/AArch64 port of the JDK.
Apple宣布了一项长期计划,将其Macintosh计算机系列从x64过渡到AArch64。因此,我们希望看到对JDK的macOS/AArch64端口的广泛需求。
Although it will be possible to run a macOS/x64 build of the JDK on AArch64-based systems via macOS's built-in Rosetta 2 translator, the translation will almost certainly introduce a significant performance penalty.
尽管可以通过macOS的内置Rosetta 2翻译器在基于AArch64的系统上运行JDK的macOS/x64构建,但翻译几乎肯定会带来显着的性能损失。
An AArch64 port already exists for Linux (JEP 237), and work is underway on an AArch64 port for Windows (JEP 388). We expect to reuse existing AArch64 code from these ports by employing conditional compilation — as is usual in ports of the JDK — to accommodate differences in low-level conventions such as the application binary interface (ABI) and the set of reserved processor registers.
Linux(JEP 237)的AArch64端口已经存在,并且正在为 Windows(JEP 388)开发AArch64端口。我们希望通过使用条件编译来重用这些端口中现有的AArch64代码——这在JDK的端口中很常见——以适应低级约定的差异,例如应用程序二进制接口(ABI)和保留处理器寄存器集。
macOS/AArch64 forbids memory segments from being executable and writeable at the same time, a policy known as write-xor-execute (W^X). The HotSpot VM routinely creates and modifies executable code, so this JEP will implement W^X support in HotSpot for macOS/AArch64.
macOS/AArch64禁止内存段同时可执行和可写,这一策略称为write-xor-execute(W^X)。HotSpot VM定期创建和修改可执行代码,因此这个JEP将在HotSpot for macOS/AArch64中实现W^X支持。
Testing will include, but not be limited to, compatibility testing with the TCK, regression testing with jtreg, and validation with applications. The execution environment will include development platforms available from Apple as well as consumer hardware, once it becomes available.
测试将包括但不限于使用TCK的兼容性测试、使用jtreg的回归测试以及使用应用程序的验证。一旦可用,执行环境将包括 Apple 提供的开发平台以及消费类硬件。
pthread_jit_write_protect_np
system call. If not, we will develop alternative approaches. The first implementation will target correctness with a possible performance penalty in uncommon cases, such as deoptimizations.pthread_jit_write_protect_np
系统调用。如果没有,我们将开发替代方法。第一个实现将以正确性为目标,在不常见的情况下(例如去优化)可能会出现性能损失。The macOS/AArch64 port and the Windows/AArch64 port (JEP 388) will likely share some code. Some parts of this JEP will depend upon the integration of JEP 388, while other parts can be developed in parallel.
macOS/AArch64端口和Windows/AArch64端口(JEP 388)可能会共享一些代码。该JEP的某些部分将依赖于JEP 388的集成,而其他部分可以并行开发。