RFR: 8253795: Implementation of JEP 391: macOS/AArch64 Port
Anton Kozlov
akozlov at openjdk.java.net
Fri Jan 22 20:02:56 UTC 2021
Please review the implementation of JEP 391: macOS/AArch64 Port.
It's heavily based on existing ports to linux/aarch64, macos/x86_64, and windows/aarch64.
Major changes are in:
* src/hotspot/cpu/aarch64: support of the new calling convention (subtasks JDK-8253817, JDK-8253818)
* src/hotspot/os_cpu/bsd_aarch64: copy of os_cpu/linux_aarch64 with necessary adjustments (JDK-8253819)
* src/hotspot/share, test/hotspot/gtest: support of write-xor-execute (W^X), required on macOS/AArch64 platform. It's implemented with pthread_jit_write_protect_np provided by Apple. The W^X mode is local to a thread, so W^X mode change relates to the java thread state change (for java threads). In most cases, JVM executes in write-only mode, except when calling a generated stub like SafeFetch, which requires a temporary switch to execute-only mode. The same execute-only mode is enabled when a java thread executes in java or native states. This approach of managing W^X mode turned out to be simple and efficient enough.
* src/jdk.hotspot.agent: serviceability agent implementation (JDK-8254941)
-------------
Commit messages:
- Fix build
- JDK-8253816: Update after recent changes
- Rework gtests to always have wx_write
- Revert gtest changes
- Fix gtests in debug
- Merge remote-tracking branch 'upstream/master' into jdk-macos
- Fix windows_aarch64
- Use r18_tls instead of r18_reserved
- JDK-8253742: bsd_aarch64 part
- JDK-8257882: bsd_aarch64 part
- ... and 40 more: https://git.openjdk.java.net/jdk/compare/82adfb32...3d4f4c23
Changes: https://git.openjdk.java.net/jdk/pull/2200/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=2200&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8253795
Stats: 3335 lines in 117 files changed: 3230 ins; 41 del; 64 mod
Patch: https://git.openjdk.java.net/jdk/pull/2200.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/2200/head:pull/2200
PR: https://git.openjdk.java.net/jdk/pull/2200
More information about the security-dev
mailing list