From bf6bd0d067f755cdbb804cba8c0f73007fc5a3e3 Mon Sep 17 00:00:00 2001 From: Jason Feng Date: Wed, 20 Dec 2023 21:55:23 -0500 Subject: [PATCH] JDK23 adds JVM_VirtualThreadDisableSuspend JVM_VirtualThreadDisableSuspend was added for JDK23 instead. Signed-off-by: Jason Feng --- runtime/j9vm/exports.cmake | 5 +++++ runtime/j9vm/j9vmnatives.xml | 4 ++++ runtime/j9vm/javanextvmi.cpp | 4 +++- runtime/j9vm/module.xml | 3 +++ runtime/redirector/forwarders.m4 | 2 +- runtime/redirector/module.xml | 3 +++ 6 files changed, 19 insertions(+), 2 deletions(-) diff --git a/runtime/j9vm/exports.cmake b/runtime/j9vm/exports.cmake index 38bd117181d..160f151d40a 100644 --- a/runtime/j9vm/exports.cmake +++ b/runtime/j9vm/exports.cmake @@ -441,6 +441,11 @@ endif() if(NOT JAVA_SPEC_VERSION LESS 22) jvm_add_exports(jvm JVM_ExpandStackFrameInfo + ) +endif() + +if(NOT JAVA_SPEC_VERSION LESS 23) + jvm_add_exports(jvm JVM_VirtualThreadDisableSuspend ) endif() diff --git a/runtime/j9vm/j9vmnatives.xml b/runtime/j9vm/j9vmnatives.xml index e34bcb36140..98bf4373e65 100644 --- a/runtime/j9vm/j9vmnatives.xml +++ b/runtime/j9vm/j9vmnatives.xml @@ -450,6 +450,10 @@ SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0-only WITH Classpath-ex + + + + diff --git a/runtime/j9vm/javanextvmi.cpp b/runtime/j9vm/javanextvmi.cpp index bb242864664..28bf90ad95d 100644 --- a/runtime/j9vm/javanextvmi.cpp +++ b/runtime/j9vm/javanextvmi.cpp @@ -724,12 +724,14 @@ JVM_ExpandStackFrameInfo(JNIEnv *env, jobject object) { assert(!"JVM_ExpandStackFrameInfo unimplemented"); } +#endif /* JAVA_SPEC_VERSION >= 22 */ +#if JAVA_SPEC_VERSION >= 23 JNIEXPORT void JNICALL JVM_VirtualThreadDisableSuspend(JNIEnv *env, jobject vthread, jboolean enter) { assert(!"JVM_VirtualThreadDisableSuspend unimplemented"); } -#endif /* JAVA_SPEC_VERSION >= 22 */ +#endif /* JAVA_SPEC_VERSION >= 23 */ } /* extern "C" */ diff --git a/runtime/j9vm/module.xml b/runtime/j9vm/module.xml index 2d3d5946796..2538338dc52 100644 --- a/runtime/j9vm/module.xml +++ b/runtime/j9vm/module.xml @@ -85,6 +85,9 @@ SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0-only WITH Classpath-ex + + + diff --git a/runtime/redirector/forwarders.m4 b/runtime/redirector/forwarders.m4 index 3547971b55d..5a03769c117 100644 --- a/runtime/redirector/forwarders.m4 +++ b/runtime/redirector/forwarders.m4 @@ -429,5 +429,5 @@ _IF([defined(J9VM_OPT_VALHALLA_VALUE_TYPES)], [_X(JVM_IsValhallaEnabled, JNICALL, false, jboolean, void)]) _IF([JAVA_SPEC_VERSION >= 22], [_X(JVM_ExpandStackFrameInfo, JNICALL, false, void, JNIEnv *env, jobject object)]) -_IF([JAVA_SPEC_VERSION >= 22], +_IF([JAVA_SPEC_VERSION >= 23], [_X(JVM_VirtualThreadDisableSuspend, JNICALL, false, void, JNIEnv *env, jobject vthread, jboolean enter)]) diff --git a/runtime/redirector/module.xml b/runtime/redirector/module.xml index 7d28eaa6c9a..ca7af74cf63 100644 --- a/runtime/redirector/module.xml +++ b/runtime/redirector/module.xml @@ -86,6 +86,9 @@ SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0-only WITH Classpath-ex + + +