mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8253795: Implementation of JEP 391: macOS/AArch64 Port
8253816: Support macOS W^X 8253817: Support macOS Aarch64 ABI in Interpreter 8253818: Support macOS Aarch64 ABI for compiled wrappers 8253819: Implement os/cpu for macOS/AArch64 8253839: Update tests and JDK code for macOS/Aarch64 8254941: Implement Serviceability Agent for macOS/AArch64 8255776: Change build system for macOS/AArch64 8262903: [macos_aarch64] Thread::current() called on detached thread Co-authored-by: Vladimir Kempik <vkempik@openjdk.org> Co-authored-by: Bernhard Urban-Forster <burban@openjdk.org> Co-authored-by: Ludovic Henry <luhenry@openjdk.org> Co-authored-by: Monica Beckwith <mbeckwit@openjdk.org> Reviewed-by: erikj, ihse, prr, cjplummer, stefank, gziemski, aph, mbeckwit, luhenry
This commit is contained in:
parent
b006f22f1f
commit
dbc9e4b50c
75 changed files with 2933 additions and 109 deletions
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2021, Azul Systems, Inc. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -33,6 +34,7 @@
|
|||
#include "runtime/safepointMechanism.inline.hpp"
|
||||
#include "runtime/safepointVerifiers.hpp"
|
||||
#include "runtime/thread.hpp"
|
||||
#include "runtime/threadWXSetters.inline.hpp"
|
||||
#include "runtime/vmOperations.hpp"
|
||||
#include "utilities/globalDefinitions.hpp"
|
||||
#include "utilities/macros.hpp"
|
||||
|
@ -289,6 +291,8 @@ class VMNativeEntryWrapper {
|
|||
|
||||
#define VM_LEAF_BASE(result_type, header) \
|
||||
debug_only(NoHandleMark __hm;) \
|
||||
MACOS_AARCH64_ONLY(ThreadWXEnable __wx(WXWrite, \
|
||||
Thread::current())); \
|
||||
os::verify_stack_alignment(); \
|
||||
/* begin of body */
|
||||
|
||||
|
@ -311,6 +315,7 @@ class VMNativeEntryWrapper {
|
|||
|
||||
#define JRT_ENTRY(result_type, header) \
|
||||
result_type header { \
|
||||
MACOS_AARCH64_ONLY(ThreadWXEnable __wx(WXWrite, thread)); \
|
||||
ThreadInVMfromJava __tiv(thread); \
|
||||
VM_ENTRY_BASE(result_type, header, thread) \
|
||||
debug_only(VMEntryWrapper __vew;)
|
||||
|
@ -337,6 +342,7 @@ class VMNativeEntryWrapper {
|
|||
|
||||
#define JRT_ENTRY_NO_ASYNC(result_type, header) \
|
||||
result_type header { \
|
||||
MACOS_AARCH64_ONLY(ThreadWXEnable __wx(WXWrite, thread)); \
|
||||
ThreadInVMfromJava __tiv(thread, false /* check asyncs */); \
|
||||
VM_ENTRY_BASE(result_type, header, thread) \
|
||||
debug_only(VMEntryWrapper __vew;)
|
||||
|
@ -345,6 +351,7 @@ class VMNativeEntryWrapper {
|
|||
// to get back into Java from the VM
|
||||
#define JRT_BLOCK_ENTRY(result_type, header) \
|
||||
result_type header { \
|
||||
MACOS_AARCH64_ONLY(ThreadWXEnable __wx(WXWrite, thread)); \
|
||||
HandleMarkCleaner __hm(thread);
|
||||
|
||||
#define JRT_BLOCK \
|
||||
|
@ -374,6 +381,7 @@ extern "C" { \
|
|||
result_type JNICALL header { \
|
||||
JavaThread* thread=JavaThread::thread_from_jni_environment(env); \
|
||||
assert( !VerifyJNIEnvThread || (thread == Thread::current()), "JNIEnv is only valid in same thread"); \
|
||||
MACOS_AARCH64_ONLY(ThreadWXEnable __wx(WXWrite, thread)); \
|
||||
ThreadInVMfromNative __tiv(thread); \
|
||||
debug_only(VMNativeEntryWrapper __vew;) \
|
||||
VM_ENTRY_BASE(result_type, header, thread)
|
||||
|
@ -398,6 +406,7 @@ extern "C" { \
|
|||
extern "C" { \
|
||||
result_type JNICALL header { \
|
||||
JavaThread* thread=JavaThread::thread_from_jni_environment(env); \
|
||||
MACOS_AARCH64_ONLY(ThreadWXEnable __wx(WXWrite, thread)); \
|
||||
ThreadInVMfromNative __tiv(thread); \
|
||||
debug_only(VMNativeEntryWrapper __vew;) \
|
||||
VM_ENTRY_BASE(result_type, header, thread)
|
||||
|
@ -407,6 +416,7 @@ extern "C" { \
|
|||
extern "C" { \
|
||||
result_type JNICALL header { \
|
||||
JavaThread* thread = JavaThread::current(); \
|
||||
MACOS_AARCH64_ONLY(ThreadWXEnable __wx(WXWrite, thread)); \
|
||||
ThreadInVMfromNative __tiv(thread); \
|
||||
debug_only(VMNativeEntryWrapper __vew;) \
|
||||
VM_ENTRY_BASE(result_type, header, thread)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue