@@ -79,7 +79,7 @@ removePrefixes(J9JVMTIData *jvmtiData, U_8 **methodNameData, UDATA *methodNameLe
79
79
if ((j9env->flags & J9JVMTIENV_FLAG_RETRANSFORM_CAPABLE) == retransformFlag) {
80
80
jint prefixCount = j9env->prefixCount ;
81
81
char *prefix = j9env->prefixes ;
82
-
82
+
83
83
/* Remove the prefixes */
84
84
while (0 != prefixCount) {
85
85
size_t prefixLength = strlen (prefix);
@@ -145,6 +145,17 @@ jniNativeMethodProperties(J9VMThread *currentThread, J9Method *jniNativeMethod,
145
145
UDATA entryLength = methodDescriptor->methodNameLength ;
146
146
if (J9UTF8_DATA_EQUALS (methodNameData, methodNameLength, entryData, entryLength)) {
147
147
found:
148
+ #if JAVA_SPEC_VERSION >= 24
149
+ /* Fast implementation located - if wait can unmount the continuation, check to see if this
150
+ * native is the wait implememnation and reject it if so.
151
+ */
152
+ if (J9_ARE_ANY_BITS_SET (currentThread->javaVM ->extendedRuntimeFlags3 , J9_EXTENDED_RUNTIME3_YIELD_PINNED_CONTINUATION)
153
+ && J9UTF8_LITERAL_EQUALS (methodName, methodNameLength, " waitImpl" )
154
+ && J9UTF8_LITERAL_EQUALS (methodSignature, methodSignatureLength, " (JI)V" )
155
+ ) {
156
+ goto done;
157
+ }
158
+ #endif /* JAVA_SPEC_VERSION >= 24 */
148
159
address = methodDescriptor->function ;
149
160
flags = methodDescriptor->flags ;
150
161
Trc_VM_fastJNINativeFound (
0 commit comments