Home
last modified time | relevance | path

Searched refs:jvmti (Results 1 – 25 of 244) sorted by relevance

12345678910

/art/tools/jvmti-agents/ti-fast/
Dtifast.cc75 …leStep, EVENT(SINGLE_STEP), (jvmtiEnv* jvmti, JNIEnv* jni, jthread thread, jmethodID meth, jlocati…
76 …n(MethodEntry, EVENT(METHOD_ENTRY), (jvmtiEnv* jvmti, JNIEnv* jni, jthread thread, jmethodID meth)…
77 …it, EVENT(METHOD_EXIT), (jvmtiEnv* jvmti, JNIEnv* jni, jthread thread, jmethodID meth, jboolean jb…
78 …ENT(NATIVE_METHOD_BIND), (jvmtiEnv* jvmti, JNIEnv* jni, jthread thread, jmethodID meth, void* v1, …
79 …N), (jvmtiEnv* jvmti, JNIEnv* jni, jthread thread, jmethodID meth1, jlocation loc1, jobject obj, j…
80 …ENT(EXCEPTION_CATCH), (jvmtiEnv* jvmti, JNIEnv* jni, jthread thread, jmethodID meth, jlocation loc…
81 …fun(ThreadStart, EVENT(THREAD_START), (jvmtiEnv* jvmti, JNIEnv* jni, jthread thread), (jvmti, jni,…
82 …fun(ThreadEnd, EVENT(THREAD_END), (jvmtiEnv* jvmti, JNIEnv* jni, jthread thread), (jvmti, jni, jth…
83 …fun(ClassLoad, EVENT(CLASS_LOAD), (jvmtiEnv* jvmti, JNIEnv* jni, jthread thread, jclass klass), (j…
84 …(ClassPrepare, EVENT(CLASS_PREPARE), (jvmtiEnv* jvmti, JNIEnv* jni, jthread thread, jclass klass),…
[all …]
/art/tools/jvmti-agents/field-null-percent/
Dfieldnull.cc77 static jint SetupJvmtiEnv(JavaVM* vm, jvmtiEnv** jvmti) { in SetupJvmtiEnv() argument
79 res = vm->GetEnv(reinterpret_cast<void**>(jvmti), JVMTI_VERSION_1_1); in SetupJvmtiEnv()
81 if (res != JNI_OK || *jvmti == nullptr) { in SetupJvmtiEnv()
83 return vm->GetEnv(reinterpret_cast<void**>(jvmti), kArtTiVersion); in SetupJvmtiEnv()
92 static void DataDumpRequestCb(jvmtiEnv* jvmti) { in DataDumpRequestCb() argument
100 CHECK_JVMTI(jvmti->GetEnvironmentLocalStorage(reinterpret_cast<void**>(&list))); in DataDumpRequestCb()
106 CHECK_JVMTI(jvmti->IterateOverInstancesOfClass( in DataDumpRequestCb()
120 CHECK_JVMTI(jvmti->GetObjectsWithTags(1, &tag, &obj_len, &obj_list, nullptr)); in DataDumpRequestCb()
132 CHECK_JVMTI(jvmti->GetFieldName(klass, field, &field_name, &field_sig, nullptr)); in DataDumpRequestCb()
133 CHECK_JVMTI(jvmti->GetClassSignature(klass, &class_name, nullptr)); in DataDumpRequestCb()
[all …]
/art/tools/jvmti-agents/jit-load/
Djitload.cc53 JNICALL void VmInitCb(jvmtiEnv* jvmti, in VmInitCb() argument
58 CHECK_EQ(jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_CLASS_PREPARE, jit_thread), in VmInitCb()
68 JNICALL static void DataDumpRequestCb(jvmtiEnv* jvmti) { in DataDumpRequestCb() argument
70 CHECK_CALL_SUCCESS(jvmti->GetEnvironmentLocalStorage(reinterpret_cast<void**>(&ops))); in DataDumpRequestCb()
74 JNICALL void ClassPrepareJit(jvmtiEnv* jvmti, in ClassPrepareJit() argument
79 CHECK_CALL_SUCCESS(jvmti->GetEnvironmentLocalStorage(reinterpret_cast<void**>(&ops))); in ClassPrepareJit()
81 CHECK_CALL_SUCCESS(jvmti->GetClassSignature(klass, &klass_name, nullptr)); in ClassPrepareJit()
85 CHECK_CALL_SUCCESS(jvmti->Deallocate(reinterpret_cast<unsigned char*>(klass_name))); in ClassPrepareJit()
88 JNICALL void VMDeathCb(jvmtiEnv* jvmti, JNIEnv* env ATTRIBUTE_UNUSED) { in VMDeathCb() argument
89 DataDumpRequestCb(jvmti); in VMDeathCb()
[all …]
/art/test/1919-vminit-thread-start-timing/
Dvminit.cc58 static void JNICALL ThreadStartCallback(jvmtiEnv *jvmti, JNIEnv* env, jthread thread) { in ThreadStartCallback() argument
60 CheckJvmtiError(jvmti, jvmti->GetEnvironmentLocalStorage(reinterpret_cast<void**>(&list))); in ThreadStartCallback()
61 CheckJvmtiError(jvmti, jvmti->RawMonitorEnter(list->events_mutex)); in ThreadStartCallback()
63 CheckJvmtiError(jvmti, jvmti->RawMonitorExit(list->events_mutex)); in ThreadStartCallback()
66 static void JNICALL Test1919AgentThread(jvmtiEnv* jvmti, in Test1919AgentThread() argument
70 CheckJvmtiError(jvmti, jvmti->GetEnvironmentLocalStorage(reinterpret_cast<void**>(&list))); in Test1919AgentThread()
71 CheckJvmtiError(jvmti, jvmti->RawMonitorEnter(list->events_mutex)); in Test1919AgentThread()
73 CheckJvmtiError(jvmti, jvmti->GetCurrentThread(&cur)); in Test1919AgentThread()
77 CheckJvmtiError(jvmti, jvmti->RawMonitorNotify(list->events_mutex)); in Test1919AgentThread()
78 CheckJvmtiError(jvmti, jvmti->RawMonitorExit(list->events_mutex)); in Test1919AgentThread()
[all …]
/art/test/ti-agent/
Dtrace_helper.cc30 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()
[all …]
Dcommon_helper.cc31 jobject GetJavaField(jvmtiEnv* jvmti, JNIEnv* env, jclass field_klass, jfieldID f) { in GetJavaField() argument
33 if (JvmtiErrorToException(env, jvmti, jvmti->GetFieldModifiers(field_klass, f, &mods))) { in GetJavaField()
41 jobject GetJavaMethod(jvmtiEnv* jvmti, JNIEnv* env, jmethodID m) { in GetJavaMethod() argument
43 if (JvmtiErrorToException(env, jvmti, jvmti->GetMethodModifiers(m, &mods))) { in GetJavaMethod()
49 if (JvmtiErrorToException(env, jvmti, jvmti->GetMethodDeclaringClass(m, &method_klass))) { in GetJavaMethod()
Dmonitors_helper.cc81 static void monitorEnterCB(jvmtiEnv* jvmti, in monitorEnterCB() argument
86 if (JvmtiErrorToException(jnienv, jvmti, in monitorEnterCB()
87 jvmti->GetEnvironmentLocalStorage(reinterpret_cast<void**>(&data)))) { in monitorEnterCB()
95 static void monitorEnteredCB(jvmtiEnv* jvmti, in monitorEnteredCB() argument
100 if (JvmtiErrorToException(jnienv, jvmti, in monitorEnteredCB()
101 jvmti->GetEnvironmentLocalStorage(reinterpret_cast<void**>(&data)))) { in monitorEnteredCB()
109 static void monitorWaitCB(jvmtiEnv* jvmti, in monitorWaitCB() argument
115 if (JvmtiErrorToException(jnienv, jvmti, in monitorWaitCB()
116 jvmti->GetEnvironmentLocalStorage(reinterpret_cast<void**>(&data)))) { in monitorWaitCB()
124 static void monitorWaitedCB(jvmtiEnv* jvmti, in monitorWaitedCB() argument
[all …]
Dexceptions_helper.cc37 static void exceptionCB(jvmtiEnv* jvmti, in exceptionCB() argument
46 if (JvmtiErrorToException(jnienv, jvmti, in exceptionCB()
47 jvmti->GetEnvironmentLocalStorage(reinterpret_cast<void**>(&data)))) { in exceptionCB()
57 jobject throw_method_arg = GetJavaMethod(jvmti, jnienv, throw_method); in exceptionCB()
59 catch_method != nullptr ? GetJavaMethod(jvmti, jnienv, catch_method) : nullptr; in exceptionCB()
78 static void exceptionCatchCB(jvmtiEnv* jvmti, in exceptionCatchCB() argument
85 if (JvmtiErrorToException(jnienv, jvmti, in exceptionCatchCB()
86 jvmti->GetEnvironmentLocalStorage(reinterpret_cast<void**>(&data)))) { in exceptionCatchCB()
95 jobject catch_method_arg = GetJavaMethod(jvmti, jnienv, catch_method); in exceptionCatchCB()
Dframe_pop_helper.cc34 static void framePopCB(jvmtiEnv* jvmti, in framePopCB() argument
40 if (JvmtiErrorToException(jnienv, jvmti, in framePopCB()
41 jvmti->GetEnvironmentLocalStorage(reinterpret_cast<void**>(&data)))) { in framePopCB()
47 jvmti, in framePopCB()
48 jvmti->GetFrameLocation(thr, 0, &frame_method, &location))) { in framePopCB()
52 jobject method_arg = GetJavaMethod(jvmti, jnienv, frame_method); in framePopCB()
Dcommon_helper.h28 jobject GetJavaField(jvmtiEnv* jvmti, JNIEnv* env, jclass field_klass, jfieldID f);
29 jobject GetJavaMethod(jvmtiEnv* jvmti, JNIEnv* env, jmethodID m);
Dredefinition_helper.cc38 static void throwCommonRedefinitionError(jvmtiEnv* jvmti, in throwCommonRedefinitionError() argument
45 jvmti->GetErrorName(res, &error); in throwCommonRedefinitionError()
54 jvmti->GetClassSignature(target[i], &signature, &generic); in throwCommonRedefinitionError()
59 jvmti->Deallocate(reinterpret_cast<unsigned char*>(signature)); in throwCommonRedefinitionError()
60 jvmti->Deallocate(reinterpret_cast<unsigned char*>(generic)); in throwCommonRedefinitionError()
64 jvmti->Deallocate(reinterpret_cast<unsigned char*>(error)); in throwCommonRedefinitionError()
96 static void throwRedefinitionError(jvmtiEnv* jvmti, in throwRedefinitionError() argument
101 return throwCommonRedefinitionError<true>(jvmti, env, num_targets, target, res); in throwRedefinitionError()
294 static void throwRetransformationError(jvmtiEnv* jvmti, in throwRetransformationError() argument
299 return throwCommonRedefinitionError<false>(jvmti, env, num_targets, targets, res); in throwRetransformationError()
/art/tools/jvmti-agents/simple-force-redefine/
Dforceredefine.cc74 static AgentInfo* GetAgentInfo(jvmtiEnv* jvmti) { in GetAgentInfo() argument
76 CHECK_EQ(jvmti->GetEnvironmentLocalStorage(reinterpret_cast<void**>(&ai)), JVMTI_ERROR_NONE); in GetAgentInfo()
83 explicit JvmtiAllocator(jvmtiEnv* jvmti) : jvmti_(jvmti) {} in JvmtiAllocator() argument
136 static void CbClassFileLoadHook(jvmtiEnv* jvmti, in CbClassFileLoadHook() argument
148 AgentInfo* ai = GetAgentInfo(jvmti); in CbClassFileLoadHook()
155 LOG(INFO) << "Got CFLH for " << name << " on env " << static_cast<void*>(jvmti); in CbClassFileLoadHook()
156 JvmtiAllocator allocator(jvmti); in CbClassFileLoadHook()
168 static jclass FindClass(jvmtiEnv* jvmti, JNIEnv* env, const std::string& name) { in FindClass() argument
180 if (jvmti->GetLoadedClasses(&cnt, &klasses) != JVMTI_ERROR_NONE) { in FindClass()
186 if (jvmti->GetClassSignature(klasses[i], &sig, nullptr) != JVMTI_ERROR_NONE) { in FindClass()
[all …]
/art/tools/jvmti-agents/dump-jvmti-state/
Ddump-jvmti.cc47 static jint SetupJvmtiEnv(JavaVM* vm, jvmtiEnv** jvmti) { in SetupJvmtiEnv() argument
49 res = vm->GetEnv(reinterpret_cast<void**>(jvmti), JVMTI_VERSION_1_1); in SetupJvmtiEnv()
51 if (res != JNI_OK || *jvmti == nullptr) { in SetupJvmtiEnv()
53 res = vm->GetEnv(reinterpret_cast<void**>(jvmti), kArtTiVersion); in SetupJvmtiEnv()
59 jvmtiEnv* env = *jvmti; in SetupJvmtiEnv()
81 static void CbDataDump(jvmtiEnv* jvmti) { in CbDataDump() argument
83 if (JVMTI_ERROR_NONE == GetInternalData(jvmti, &data)) { in CbDataDump()
85 Dealloc(jvmti, data); in CbDataDump()
92 jvmtiEnv* jvmti = nullptr; in AgentStart() local
93 if (SetupJvmtiEnv(vm, &jvmti) != JNI_OK) { in AgentStart()
[all …]
/art/tools/jvmti-agents/titrace/
Dtitrace.cc27 #define CHECK_JVMTI_ERROR(jvmti, errnum) \ argument
28 CHECK_EQ(JVMTI_ERROR_NONE, (errnum)) << GetJvmtiErrorString((jvmti), (errnum)) << (" ")
32 static const char* GetJvmtiErrorString(jvmtiEnv* jvmti, jvmtiError errnum) { in GetJvmtiErrorString() argument
34 jvmti->GetErrorName(errnum, /*out*/ &errnum_str); in GetJvmtiErrorString()
100 static void Initialize(jvmtiEnv* jvmti) { in Initialize()
107 error = jvmti->GetSystemProperty("java.vm.name", /*out*/ &value_ptr); in Initialize()
108 CHECK_JVMTI_ERROR(jvmti, error) << "Failed to get property 'java.vm.name'"; in Initialize()
242 jvmtiEnv* jvmti = nullptr; in Agent_OnLoad() local
247 res = jvm->GetEnv(reinterpret_cast<void**>(&jvmti), JVMTI_VERSION_1_1); in Agent_OnLoad()
249 if (res != JNI_OK || jvmti == nullptr) { in Agent_OnLoad()
[all …]
/art/test/1953-pop-frame/
Dpop_frame.cc53 TestData(jvmtiEnv* jvmti, in TestData()
71 JvmtiErrorToException(env, jvmti, jvmti->CreateRawMonitor("SuspendStopMonitor", in TestData()
75 void PerformSuspend(jvmtiEnv* jvmti, JNIEnv* env) { in PerformSuspend()
77 JvmtiErrorToException(env, jvmti, jvmti->RawMonitorEnter(notify_monitor)); in PerformSuspend()
79 JvmtiErrorToException(env, jvmti, jvmti->RawMonitorNotifyAll(notify_monitor)); in PerformSuspend()
80 JvmtiErrorToException(env, jvmti, jvmti->RawMonitorExit(notify_monitor)); in PerformSuspend()
82 jvmti->SuspendThread(nullptr); in PerformSuspend()
86 void JNICALL cbSingleStep(jvmtiEnv* jvmti, in cbSingleStep() argument
93 jvmti, in cbSingleStep()
94 jvmti->GetThreadLocalStorage(thr, reinterpret_cast<void**>(&data)))) { in cbSingleStep()
[all …]
/art/test/ti-stress/
Dstress.cc613 void JNICALL ClassFileLoadHookSecretNoOp(jvmtiEnv* jvmti, in ClassFileLoadHookSecretNoOp() argument
629 CHECK_EQ(jvmti->GetEnvironmentLocalStorage(reinterpret_cast<void**>(&data)), in ClassFileLoadHookSecretNoOp()
635 } else if (DoExtractClassFromData(jvmti, name_str, class_data_len, class_data, in ClassFileLoadHookSecretNoOp()
707 static bool WatchAllFields(JavaVM* vm, jvmtiEnv* jvmti) { in WatchAllFields() argument
708 if (jvmti->SetEventNotificationMode(JVMTI_ENABLE, in WatchAllFields()
717 if (jvmti->GetLoadedClasses(&nklass, &klasses) != JVMTI_ERROR_NONE) { in WatchAllFields()
728 ScopedClassInfo sci(jvmti, k); in WatchAllFields()
734 jvmtiError err = jvmti->GetClassFields(k, &nfields, &fields); in WatchAllFields()
738 if (jvmti->SetFieldModificationWatch(k, f) != JVMTI_ERROR_NONE || in WatchAllFields()
739 jvmti->SetFieldAccessWatch(k, f) != JVMTI_ERROR_NONE) { in WatchAllFields()
[all …]
/art/tools/jvmti-agents/breakpoint-logger/
Dbreakpoint_logger.cc39 static void VMInitCB(jvmtiEnv* jvmti, JNIEnv* env, jthread thr ATTRIBUTE_UNUSED) { in VMInitCB() argument
41 jvmtiError err = jvmti->GetEnvironmentLocalStorage(reinterpret_cast<void**>(&all_targets)); in VMInitCB()
62 err = jvmti->SetBreakpoint(m, target.location); in VMInitCB()
354 jvmtiEnv* jvmti = nullptr; in AgentStart() local
358 res = vm->GetEnv(reinterpret_cast<void**>(&jvmti), JVMTI_VERSION_1_1); in AgentStart()
360 if (res != JNI_OK || jvmti == nullptr) { in AgentStart()
367 error = jvmti->Allocate(sizeof(BreakpointTargets), in AgentStart()
375 error = jvmti->SetEnvironmentLocalStorage(data); in AgentStart()
391 error = jvmti->AddCapabilities(&caps); in AgentStart()
401 error = jvmti->SetEventCallbacks(&callbacks, static_cast<jint>(sizeof(callbacks))); in AgentStart()
[all …]
/art/openjdkjvmti/
Dti_dump.cc75 jvmtiError DumpUtil::DumpInternalState(jvmtiEnv *jvmti, char **data) { in DumpInternalState() argument
77 if (jvmti == nullptr || self == nullptr) { in DumpInternalState()
88 JvmtiUniquePtr<char[]> res = CopyString(jvmti, ss.str().c_str(), &err); in DumpInternalState()
/art/test/1962-multi-thread-events/
Dmulti_thread_events.cc37 void cbMethodEntry(jvmtiEnv* jvmti, in cbMethodEntry() argument
45 env, jvmti, jvmti->GetThreadLocalStorage(thread, reinterpret_cast<void**>(&data)))) { in cbMethodEntry()
/art/tools/jvmti-agents/
DREADME.md3 This is the collection of various jvmti agents that we have created for debugging or testing the
9 * [libdumpjvmti](./dump-jvmti-state)
/art/test/942-private-recursive/
Drun17 ./default-run "$@" --jvmti
/art/test/981-dedup-original-dex/
Drun17 ./default-run "$@" --jvmti
/art/test/1961-obsolete-jit-multithread/
Drun17 ./default-run "$@" --jvmti
/art/test/1941-dispose-stress/
Drun18 ./default-run "$@" --jvmti
/art/test/1916-get-set-current-frame/
Drun18 ./default-run "$@" --jvmti

12345678910