diff --git a/runtime/exelib/common/libargs.c b/runtime/exelib/common/libargs.c index 9dc9108fc00..715bf507cd3 100644 --- a/runtime/exelib/common/libargs.c +++ b/runtime/exelib/common/libargs.c @@ -311,10 +311,10 @@ vmOptionsTableAddOptionWithCopy(void **vmOptionsTable, char *optionString, void #if defined(WIN32) /* On Windows, the subdirectory containing the redirector hasn't changed with Java versions. */ #define J9JAVA_REDIRECTOR_SUBDIR "\\bin\\j9vm\\" -#elif (JAVA_SPEC_VERSION >= 10) || ((JAVA_SPEC_VERSION == 9) && defined(OPENJ9_BUILD)) || defined(OSX) +#elif (JAVA_SPEC_VERSION >= 10) || defined(OSX) /* defined(WIN32) */ /* On other platforms, the subdirectory containing the redirector is common in recent Java versions. */ #define J9JAVA_REDIRECTOR_SUBDIR "/lib/j9vm/" -#else /* WIN32 */ +#else /* defined(WIN32) */ /* In Java 8 and early versions of Java 9, the path depends on the platform architecture. */ #if defined(J9HAMMER) #define JVM_ARCH_DIR "amd64" @@ -337,12 +337,12 @@ vmOptionsTableAddOptionWithCopy(void **vmOptionsTable, char *optionString, void #define JVM_ARCH_DIR "ppc64" #endif /* PPC64 */ #elif defined(RISCV64) - #define JVM_ARCH_DIR "riscv64" + #define JVM_ARCH_DIR "riscv64" #else #error "Must define an architecture" #endif #define J9JAVA_REDIRECTOR_SUBDIR "/lib/" JVM_ARCH_DIR "/j9vm/" -#endif /* WIN32 */ +#endif /* defined(WIN32) */ #define JAVAHOMEDIR "-Djava.home=" #define JAVAHOMEDIR_LEN (sizeof(JAVAHOMEDIR) - 1) diff --git a/runtime/j9vm/exports.cmake b/runtime/j9vm/exports.cmake index 2c8d7b79149..b89974a7c15 100644 --- a/runtime/j9vm/exports.cmake +++ b/runtime/j9vm/exports.cmake @@ -406,14 +406,6 @@ if(NOT JAVA_SPEC_VERSION LESS 19) JVM_LoadZipLibrary JVM_RegisterContinuationMethods ) - if(JAVA_SPEC_VERSION LESS 21) - jvm_add_exports(jvm - JVM_VirtualThreadMountBegin - JVM_VirtualThreadMountEnd - JVM_VirtualThreadUnmountBegin - JVM_VirtualThreadUnmountEnd - ) - endif() endif() if(JAVA_SPEC_VERSION LESS 20) diff --git a/runtime/j9vm/j9scar.tdf b/runtime/j9vm/j9scar.tdf index 3d3b9c034a4..fa8b6f0c69e 100644 --- a/runtime/j9vm/j9scar.tdf +++ b/runtime/j9vm/j9scar.tdf @@ -351,17 +351,17 @@ TraceEvent=Trc_SC_LoadLibrary_OpenShared_Decorate NoEnv Overhead=1 Level=3 Templ TraceExit=Trc_SC_LoadLibrary_Exit NoEnv Overhead=1 Level=2 Template="JVM_LoadLibrary -- return 0x%zx" -TraceEntry=Trc_SC_VirtualThreadMountBegin_Entry Overhead=1 Level=3 Template="thread = %p, firstMount = %d" -TraceExit=Trc_SC_VirtualThreadMountBegin_Exit Overhead=1 Level=3 Template="thread = %p, firstMount = %d" +TraceEntry=Trc_SC_VirtualThreadMountBegin_Entry Obsolete Overhead=1 Level=3 Template="thread = %p, firstMount = %d" +TraceExit=Trc_SC_VirtualThreadMountBegin_Exit Obsolete Overhead=1 Level=3 Template="thread = %p, firstMount = %d" -TraceEntry=Trc_SC_VirtualThreadMountEnd_Entry Overhead=1 Level=3 Template="thread = %p, firstMount = %d" -TraceExit=Trc_SC_VirtualThreadMountEnd_Exit Overhead=1 Level=3 Template="thread = %p, firstMount = %d" +TraceEntry=Trc_SC_VirtualThreadMountEnd_Entry Obsolete Overhead=1 Level=3 Template="thread = %p, firstMount = %d" +TraceExit=Trc_SC_VirtualThreadMountEnd_Exit Obsolete Overhead=1 Level=3 Template="thread = %p, firstMount = %d" -TraceEntry=Trc_SC_VirtualThreadUnmountBegin_Entry Overhead=1 Level=3 Template="thread = %p, lastUnmount = %d" -TraceExit=Trc_SC_VirtualThreadUnmountBegin_Exit Overhead=1 Level=3 Template="thread = %p, lastUnmount = %d" +TraceEntry=Trc_SC_VirtualThreadUnmountBegin_Entry Obsolete Overhead=1 Level=3 Template="thread = %p, lastUnmount = %d" +TraceExit=Trc_SC_VirtualThreadUnmountBegin_Exit Obsolete Overhead=1 Level=3 Template="thread = %p, lastUnmount = %d" -TraceEntry=Trc_SC_VirtualThreadUnmountEnd_Entry Overhead=1 Level=3 Template="thread = %p, lastUnmount = %d" -TraceExit=Trc_SC_VirtualThreadUnmountEnd_Exit Overhead=1 Level=3 Template="thread = %p, lastUnmount = %d" +TraceEntry=Trc_SC_VirtualThreadUnmountEnd_Entry Obsolete Overhead=1 Level=3 Template="thread = %p, lastUnmount = %d" +TraceExit=Trc_SC_VirtualThreadUnmountEnd_Exit Obsolete Overhead=1 Level=3 Template="thread = %p, lastUnmount = %d" TraceEvent=Trc_SC_VirtualThread_Info Overhead=1 Level=3 Test Template="virtualThreadObj = %p, virtualThreadState = %p, virtualThreadInspectorCount = %lld, carrierThreadObj = %p, continuationObj = %p, J9VMContinuation = %p" diff --git a/runtime/j9vm/j9vmnatives.xml b/runtime/j9vm/j9vmnatives.xml index 4d460ef6dbb..636b0ea5763 100644 --- a/runtime/j9vm/j9vmnatives.xml +++ b/runtime/j9vm/j9vmnatives.xml @@ -440,19 +440,6 @@ SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0-only WITH Classpath-ex - - - - - - - - - - - - - diff --git a/runtime/j9vm/java11vmi.c b/runtime/j9vm/java11vmi.c index ecb4b67e4b3..11cde21a458 100644 --- a/runtime/j9vm/java11vmi.c +++ b/runtime/j9vm/java11vmi.c @@ -1829,11 +1829,7 @@ JVM_RegisterLambdaProxyClassForArchiving(JNIEnv *env, jclass arg1, jstring arg2, } JNIEXPORT jclass JNICALL -JVM_LookupLambdaProxyClassFromArchive(JNIEnv *env, jclass arg1, jstring arg2, jobject arg3, jobject arg4, jobject arg5, jobject arg6 -#if JAVA_SPEC_VERSION == 15 - , jboolean arg7 -#endif /* JAVA_SPEC_VERSION == 15 */ - ) +JVM_LookupLambdaProxyClassFromArchive(JNIEnv *env, jclass arg1, jstring arg2, jobject arg3, jobject arg4, jobject arg5, jobject arg6) { assert(!"JVM_LookupLambdaProxyClassFromArchive unimplemented"); return NULL; diff --git a/runtime/j9vm/javanextvmi.cpp b/runtime/j9vm/javanextvmi.cpp index f3b059eda11..4d7a08ff5fa 100644 --- a/runtime/j9vm/javanextvmi.cpp +++ b/runtime/j9vm/javanextvmi.cpp @@ -482,87 +482,6 @@ virtualThreadUnmountEnd(JNIEnv *env, jobject thread) } #endif /* JAVA_SPEC_VERSION >= 19 */ -#if (19 <= JAVA_SPEC_VERSION) && (JAVA_SPEC_VERSION < 21) -JNIEXPORT void JNICALL -JVM_VirtualThreadMountBegin(JNIEnv *env, jobject thread, jboolean firstMount) -{ - J9VMThread *currentThread = (J9VMThread *)env; - J9JavaVM *vm = currentThread->javaVM; - J9InternalVMFunctions *vmFuncs = vm->internalVMFunctions; - - Trc_SC_VirtualThreadMountBegin_Entry(currentThread, thread, firstMount); - - vmFuncs->internalEnterVMFromJNI(currentThread); - - virtualThreadMountBegin(env, thread); - - vmFuncs->internalExitVMToJNI(currentThread); - - Trc_SC_VirtualThreadMountBegin_Exit(currentThread, thread, firstMount); -} - -JNIEXPORT void JNICALL -JVM_VirtualThreadMountEnd(JNIEnv *env, jobject thread, jboolean firstMount) -{ - J9VMThread *currentThread = (J9VMThread *)env; - J9JavaVM *vm = currentThread->javaVM; - J9InternalVMFunctions *vmFuncs = vm->internalVMFunctions; - - Trc_SC_VirtualThreadMountEnd_Entry(currentThread, thread, firstMount); - - vmFuncs->internalEnterVMFromJNI(currentThread); - - virtualThreadMountEnd(env, thread); - if (firstMount) { - TRIGGER_J9HOOK_VM_VIRTUAL_THREAD_STARTED(vm->hookInterface, currentThread); - } - - vmFuncs->internalExitVMToJNI(currentThread); - - Trc_SC_VirtualThreadMountEnd_Exit(currentThread, thread, firstMount); -} - -JNIEXPORT void JNICALL -JVM_VirtualThreadUnmountBegin(JNIEnv *env, jobject thread, jboolean lastUnmount) -{ - J9VMThread *currentThread = (J9VMThread *)env; - J9JavaVM *vm = currentThread->javaVM; - J9InternalVMFunctions *vmFuncs = vm->internalVMFunctions; - - Trc_SC_VirtualThreadUnmountBegin_Entry(currentThread, thread, lastUnmount); - - vmFuncs->internalEnterVMFromJNI(currentThread); - - if (lastUnmount) { - TRIGGER_J9HOOK_VM_VIRTUAL_THREAD_END(vm->hookInterface, currentThread); - setContinuationStateToLastUnmount((J9VMThread *)env, thread); - } - virtualThreadUnmountBegin(env, thread); - - vmFuncs->internalExitVMToJNI(currentThread); - - Trc_SC_VirtualThreadUnmountBegin_Exit(currentThread, thread,lastUnmount); -} - -JNIEXPORT void JNICALL -JVM_VirtualThreadUnmountEnd(JNIEnv *env, jobject thread, jboolean lastUnmount) -{ - J9VMThread *currentThread = (J9VMThread *)env; - J9JavaVM *vm = currentThread->javaVM; - J9InternalVMFunctions *vmFuncs = vm->internalVMFunctions; - - Trc_SC_VirtualThreadUnmountEnd_Entry(currentThread, thread, lastUnmount); - - vmFuncs->internalEnterVMFromJNI(currentThread); - - virtualThreadUnmountEnd(env, thread); - - vmFuncs->internalExitVMToJNI(currentThread); - - Trc_SC_VirtualThreadUnmountEnd_Exit(currentThread, thread, lastUnmount); -} -#endif /* (19 <= JAVA_SPEC_VERSION) && (JAVA_SPEC_VERSION < 21) */ - #if JAVA_SPEC_VERSION >= 20 JNIEXPORT jint JNICALL JVM_GetClassFileVersion(JNIEnv *env, jclass cls) diff --git a/runtime/redirector/forwarders.m4 b/runtime/redirector/forwarders.m4 index 2eba76d2dbd..2112ff1f602 100644 --- a/runtime/redirector/forwarders.m4 +++ b/runtime/redirector/forwarders.m4 @@ -371,8 +371,6 @@ _IF([JAVA_SPEC_VERSION >= 16], [_X(JVM_GetRandomSeedForDumping, JNICALL, false, jlong)]) _IF([JAVA_SPEC_VERSION >= 15], [_X(JVM_RegisterLambdaProxyClassForArchiving, JNICALL, false, void, JNIEnv *env, jclass arg1, jstring arg2, jobject arg3, jobject arg4, jobject arg5, jobject arg6, jclass arg7)]) -_IF([JAVA_SPEC_VERSION == 15], - [_X(JVM_LookupLambdaProxyClassFromArchive, JNICALL, false, jclass, JNIEnv *env, jclass arg1, jstring arg2, jobject arg3, jobject arg4, jobject arg5, jobject arg6, jboolean arg7)]) _IF([JAVA_SPEC_VERSION >= 16], [_X(JVM_LookupLambdaProxyClassFromArchive, JNICALL, false, jclass, JNIEnv *env, jclass arg1, jstring arg2, jobject arg3, jobject arg4, jobject arg5, jobject arg6)]) _IF([(15 <= JAVA_SPEC_VERSION) && (JAVA_SPEC_VERSION < 23)], @@ -403,14 +401,6 @@ _IF([JAVA_SPEC_VERSION >= 19], [_X(JVM_IsContinuationsSupported, JNICALL, false, void, void)]) _IF([JAVA_SPEC_VERSION >= 19], [_X(JVM_IsPreviewEnabled, JNICALL, false, void, void)]) -_IF([(19 <= JAVA_SPEC_VERSION) && (JAVA_SPEC_VERSION < 21)], - [_X(JVM_VirtualThreadMountBegin, JNICALL, false, void, JNIEnv *env, jobject thread, jboolean firstMount)]) -_IF([(19 <= JAVA_SPEC_VERSION) && (JAVA_SPEC_VERSION < 21)], - [_X(JVM_VirtualThreadMountEnd, JNICALL, false, void, JNIEnv *env, jobject thread, jboolean firstMount)]) -_IF([(19 <= JAVA_SPEC_VERSION) && (JAVA_SPEC_VERSION < 21)], - [_X(JVM_VirtualThreadUnmountBegin, JNICALL, false, void, JNIEnv *env, jobject thread, jboolean lastUnmount)]) -_IF([(19 <= JAVA_SPEC_VERSION) && (JAVA_SPEC_VERSION < 21)], - [_X(JVM_VirtualThreadUnmountEnd, JNICALL, false, void, JNIEnv *env, jobject thread, jboolean lastUnmount)]) _IF([JAVA_SPEC_VERSION >= 20], [_X(JVM_GetClassFileVersion, JNICALL, false, jint, JNIEnv *env, jclass cls)]) _IF([(20 <= JAVA_SPEC_VERSION) && (JAVA_SPEC_VERSION < 23)],