From a6818c165f5b0da72f8bc02fc5691f9e24399ce1 Mon Sep 17 00:00:00 2001 From: Theresa Mammarella Date: Wed, 18 Dec 2024 14:11:51 -0500 Subject: [PATCH] Compile AccessController methods for jit JDK 24+ Some AccessController.doPrivileged methods have historically not been compiled by the jit due to security manager use. Starting in JDK 24 the security manager will be removed and these methods can be compiled. Signed-off-by: Theresa Mammarella --- runtime/compiler/env/j9method.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/runtime/compiler/env/j9method.cpp b/runtime/compiler/env/j9method.cpp index bdd78d93639..b95555da709 100644 --- a/runtime/compiler/env/j9method.cpp +++ b/runtime/compiler/env/j9method.cpp @@ -744,10 +744,12 @@ static const char * const excludeArray[] = { "java/lang/reflect/AccessibleObject.invokeF(Ljava/lang/Object;[Ljava/lang/Object;)F", "java/lang/reflect/AccessibleObject.invokeD(Ljava/lang/Object;[Ljava/lang/Object;)D", "java/lang/reflect/AccessibleObject.invokeL(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;", +#if JAVA_SPEC_VERSION < 24 "java/security/AccessController.doPrivileged(Ljava/security/PrivilegedAction;Ljava/security/AccessControlContext;)Ljava/lang/Object;", "java/security/AccessController.doPrivileged(Ljava/security/PrivilegedExceptionAction;Ljava/security/AccessControlContext;)Ljava/lang/Object;", "java/security/AccessController.doPrivileged(Ljava/security/PrivilegedAction;Ljava/security/AccessControlContext;[Ljava/security/Permission;)Ljava/lang/Object;", "java/security/AccessController.doPrivileged(Ljava/security/PrivilegedExceptionAction;Ljava/security/AccessControlContext;[Ljava/security/Permission;)Ljava/lang/Object;", +#endif /* JAVA_SPEC_VERSION < 24 */ "java/lang/NullPointerException.fillInStackTrace()Ljava/lang/Throwable;", #if (17 <= JAVA_SPEC_VERSION) && (JAVA_SPEC_VERSION <= 18) "jdk/internal/loader/NativeLibraries.load(Ljdk/internal/loader/NativeLibraries$NativeLibraryImpl;Ljava/lang/String;ZZZ)Z",