Lines Matching refs:jvmti
30 static bool IsInCallback(JNIEnv* env, jvmtiEnv *jvmti, jthread thr) { in IsInCallback() argument
34 jvmti->GetThreadLocalStorage(thr, &data); in IsInCallback()
45 static void SetInCallback(JNIEnv* env, jvmtiEnv *jvmti, jthread thr, bool val) { in SetInCallback() argument
48 jvmti->SetThreadLocalStorage(thr, (val ? reinterpret_cast<void*>(0x1) in SetInCallback()
86 jclass GetTestClass(jvmtiEnv* jvmti, JNIEnv* env) { in GetTestClass()
87 if (JvmtiErrorToException(env, jvmti, jvmti->RawMonitorEnter(trace_mon))) { in GetTestClass()
91 if (JvmtiErrorToException(env, jvmti, jvmti->RawMonitorExit(trace_mon))) { in GetTestClass()
98 static void threadStartCB(jvmtiEnv* jvmti, in threadStartCB() argument
102 if (JvmtiErrorToException(jnienv, jvmti, in threadStartCB()
103 jvmti->GetEnvironmentLocalStorage(reinterpret_cast<void**>(&data)))) { in threadStartCB()
106 ScopedLocalRef<jclass> klass(jnienv, data->GetTestClass(jvmti, jnienv)); in threadStartCB()
113 static void threadEndCB(jvmtiEnv* jvmti, in threadEndCB() argument
117 if (JvmtiErrorToException(jnienv, jvmti, in threadEndCB()
118 jvmti->GetEnvironmentLocalStorage(reinterpret_cast<void**>(&data)))) { in threadEndCB()
121 ScopedLocalRef<jclass> klass(jnienv, data->GetTestClass(jvmti, jnienv)); in threadEndCB()
129 static void singleStepCB(jvmtiEnv* jvmti, in singleStepCB() argument
135 if (JvmtiErrorToException(jnienv, jvmti, in singleStepCB()
136 jvmti->GetEnvironmentLocalStorage(reinterpret_cast<void**>(&data)))) { in singleStepCB()
139 if (IsInCallback(jnienv, jvmti, thread)) { in singleStepCB()
142 ScopedLocalRef<jclass> klass(jnienv, data->GetTestClass(jvmti, jnienv)); in singleStepCB()
147 ScopedCallbackState st(jnienv, jvmti, thread); in singleStepCB()
148 jobject method_arg = GetJavaMethod(jvmti, jnienv, method); in singleStepCB()
157 static void fieldAccessCB(jvmtiEnv* jvmti, in fieldAccessCB() argument
166 if (JvmtiErrorToException(jnienv, jvmti, in fieldAccessCB()
167 jvmti->GetEnvironmentLocalStorage(reinterpret_cast<void**>(&data)))) { in fieldAccessCB()
170 if (IsInCallback(jnienv, jvmti, thr)) { in fieldAccessCB()
174 ScopedLocalRef<jclass> klass(jnienv, data->GetTestClass(jvmti, jnienv)); in fieldAccessCB()
179 ScopedCallbackState st(jnienv, jvmti, thr); in fieldAccessCB()
180 jobject method_arg = GetJavaMethod(jvmti, jnienv, method); in fieldAccessCB()
181 jobject field_arg = GetJavaField(jvmti, jnienv, field_klass, field); in fieldAccessCB()
193 static void fieldModificationCB(jvmtiEnv* jvmti, in fieldModificationCB() argument
204 if (JvmtiErrorToException(jnienv, jvmti, in fieldModificationCB()
205 jvmti->GetEnvironmentLocalStorage(reinterpret_cast<void**>(&data)))) { in fieldModificationCB()
208 if (IsInCallback(jnienv, jvmti, thr)) { in fieldModificationCB()
212 ScopedLocalRef<jclass> klass(jnienv, data->GetTestClass(jvmti, jnienv)); in fieldModificationCB()
217 ScopedCallbackState st(jnienv, jvmti, thr); in fieldModificationCB()
218 jobject method_arg = GetJavaMethod(jvmti, jnienv, method); in fieldModificationCB()
219 jobject field_arg = GetJavaField(jvmti, jnienv, field_klass, field); in fieldModificationCB()
238 static void methodExitCB(jvmtiEnv* jvmti, in methodExitCB() argument
245 if (JvmtiErrorToException(jnienv, jvmti, in methodExitCB()
246 jvmti->GetEnvironmentLocalStorage(reinterpret_cast<void**>(&data)))) { in methodExitCB()
251 IsInCallback(jnienv, jvmti, thr)) { in methodExitCB()
255 ScopedLocalRef<jclass> klass(jnienv, data->GetTestClass(jvmti, jnienv)); in methodExitCB()
260 ScopedCallbackState st(jnienv, jvmti, thr); in methodExitCB()
261 jobject method_arg = GetJavaMethod(jvmti, jnienv, method); in methodExitCB()
263 was_popped_by_exception ? nullptr : GetJavaValue(jvmti, jnienv, method, return_value); in methodExitCB()
275 static void methodEntryCB(jvmtiEnv* jvmti, in methodEntryCB() argument
280 if (JvmtiErrorToException(jnienv, jvmti, in methodEntryCB()
281 jvmti->GetEnvironmentLocalStorage(reinterpret_cast<void**>(&data)))) { in methodEntryCB()
287 IsInCallback(jnienv, jvmti, thr)) { in methodEntryCB()
291 ScopedLocalRef<jclass> klass(jnienv, data->GetTestClass(jvmti, jnienv)); in methodEntryCB()
295 ScopedCallbackState st(jnienv, jvmti, thr); in methodEntryCB()
296 jobject method_arg = GetJavaMethod(jvmti, jnienv, method); in methodEntryCB()
304 static void classPrepareCB(jvmtiEnv* jvmti, in classPrepareCB() argument
309 if (JvmtiErrorToException(jnienv, jvmti, in classPrepareCB()
310 jvmti->GetEnvironmentLocalStorage(reinterpret_cast<void**>(&data)))) { in classPrepareCB()
316 if (JvmtiErrorToException(jnienv, jvmti, jvmti->GetClassFields(klass, &nfields, &fields))) { in classPrepareCB()
323 jvmti->SetFieldAccessWatch(klass, f); in classPrepareCB()
327 jvmti->SetFieldModificationWatch(klass, f); in classPrepareCB()
330 jvmti->Deallocate(reinterpret_cast<unsigned char*>(fields)); in classPrepareCB()