56 jthread thread, jclass klass) {
57
58 jmethodID methodID;
59 jclass classObject;
60 jstring jclassName;
61 const char *className;
62
63 if (!NSK_JNI_VERIFY(jni_env, (classObject =
64 NSK_CPP_STUB2(GetObjectClass, jni_env, klass)) != NULL)) {
65 nsk_jvmti_setFailStatus();
66 return;
67 }
68
69 if (!NSK_JNI_VERIFY(jni_env, (methodID =
70 NSK_CPP_STUB4(GetMethodID, jni_env, classObject,
71 "getName", "()Ljava/lang/String;")) != NULL)) {
72 nsk_jvmti_setFailStatus();
73 return;
74 }
75
76 jclassName = (jstring) (jstring) (jstring) (jstring) (jstring) (jstring) (jstring) (jstring) (jstring) NSK_CPP_STUB3(CallObjectMethod, jni_env, klass,
77 methodID);
78
79 className = NSK_CPP_STUB3(GetStringUTFChars, jni_env, jclassName, 0);
80
81 if ( className != NULL && (strcmp(className, EXPECTED_CLASS_NAME)==0) ) {
82
83 if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorEnter, jvmti, syncLock)))
84 nsk_jvmti_setFailStatus();
85
86 switch (event) {
87 case JVMTI_EVENT_CLASS_LOAD:
88 classloadEventCount++; break;
89 case JVMTI_EVENT_CLASS_PREPARE:
90 classprepareEventCount++; break;
91 default:
92 NSK_COMPLAIN1("Unexpected event %s", TranslateEvent(event));
93 nsk_jvmti_setFailStatus();
94 }
95
96 if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorExit, jvmti, syncLock)))
97 nsk_jvmti_setFailStatus();
|
56 jthread thread, jclass klass) {
57
58 jmethodID methodID;
59 jclass classObject;
60 jstring jclassName;
61 const char *className;
62
63 if (!NSK_JNI_VERIFY(jni_env, (classObject =
64 NSK_CPP_STUB2(GetObjectClass, jni_env, klass)) != NULL)) {
65 nsk_jvmti_setFailStatus();
66 return;
67 }
68
69 if (!NSK_JNI_VERIFY(jni_env, (methodID =
70 NSK_CPP_STUB4(GetMethodID, jni_env, classObject,
71 "getName", "()Ljava/lang/String;")) != NULL)) {
72 nsk_jvmti_setFailStatus();
73 return;
74 }
75
76 jclassName = (jstring) NSK_CPP_STUB3(CallObjectMethod, jni_env, klass, methodID);
77
78 className = NSK_CPP_STUB3(GetStringUTFChars, jni_env, jclassName, 0);
79
80 if ( className != NULL && (strcmp(className, EXPECTED_CLASS_NAME)==0) ) {
81
82 if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorEnter, jvmti, syncLock)))
83 nsk_jvmti_setFailStatus();
84
85 switch (event) {
86 case JVMTI_EVENT_CLASS_LOAD:
87 classloadEventCount++; break;
88 case JVMTI_EVENT_CLASS_PREPARE:
89 classprepareEventCount++; break;
90 default:
91 NSK_COMPLAIN1("Unexpected event %s", TranslateEvent(event));
92 nsk_jvmti_setFailStatus();
93 }
94
95 if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorExit, jvmti, syncLock)))
96 nsk_jvmti_setFailStatus();
|