Home
last modified time | relevance | path

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

12345678910>>...14

/aosp12/art/tools/jvmti-agents/ti-fast/
H A Dtifast.cc76 jni_fun(VMDeath, EVENT(VM_DEATH), (jvmtiEnv* jvmti, JNIEnv* jni), (jvmti, jni)) \
82 jni_fun(VMStart, EVENT(VM_START), (jvmtiEnv* jvmti, JNIEnv* jni), (jvmti, jni)) \
92 non_jni_fun(DataDumpRequest, EVENT(DATA_DUMP_REQUEST), (jvmtiEnv* jvmti), (jvmti)) \
429 PrintRest(jvmti, jni, args...); in PrintRest()
435 PrintRest(jvmti, jni, args...); in PrintRest()
441 PrintRest(jvmti, jni, args...); in PrintRest()
447 PrintRest(jvmti, jni, args...); in PrintRest()
453 PrintRest(jvmti, jni, args...); in PrintRest()
459 PrintRest(jvmti, jni, args...); in PrintRest()
482 PrintRest(jvmti, jni, args...); in PrintRest()
[all …]
/aosp12/art/tools/jvmti-agents/field-counts/
H A Dfieldcount.cc79 static jint SetupJvmtiEnv(JavaVM* vm, jvmtiEnv** jvmti) { in SetupJvmtiEnv() argument
83 if (res != JNI_OK || *jvmti == nullptr) { in SetupJvmtiEnv()
94 static void DataDumpRequestCb(jvmtiEnv* jvmti) { in DataDumpRequestCb() argument
109 CHECK_JVMTI(jvmti->IterateOverInstancesOfClass( in DataDumpRequestCb()
199 DataDumpRequestCb(jvmti); in VMDeathCb()
211 CHECK_JVMTI(jvmti->SetEnvironmentLocalStorage(list)); in CreateFieldList()
218 CreateFieldList(jvmti, env, args); in VMInitCb()
228 jvmtiEnv* jvmti = nullptr; in AgentStart() local
229 if (SetupJvmtiEnv(vm, &jvmti) != JNI_OK) { in AgentStart()
236 CHECK_JVMTI(jvmti->AddCapabilities(&caps)); in AgentStart()
[all …]
/aosp12/art/tools/jvmti-agents/field-null-percent/
H A Dfieldnull.cc77 static jint SetupJvmtiEnv(JavaVM* vm, jvmtiEnv** jvmti) { in SetupJvmtiEnv() argument
81 if (res != JNI_OK || *jvmti == nullptr) { in SetupJvmtiEnv()
92 static void DataDumpRequestCb(jvmtiEnv* jvmti) { in DataDumpRequestCb() argument
106 CHECK_JVMTI(jvmti->IterateOverInstancesOfClass( in DataDumpRequestCb()
144 DataDumpRequestCb(jvmti); in VMDeathCb()
154 CHECK_JVMTI(jvmti->SetEnvironmentLocalStorage(list)); in CreateFieldList()
161 CreateFieldList(jvmti, env, args); in VMInitCb()
172 jvmtiEnv* jvmti = nullptr; in AgentStart() local
173 if (SetupJvmtiEnv(vm, &jvmti) != JNI_OK) { in AgentStart()
178 CHECK_JVMTI(jvmti->AddCapabilities(&caps)); in AgentStart()
[all …]
/aosp12/art/test/1919-vminit-thread-start-timing/
H A Dvminit.cc60 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()
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()
102 CheckJvmtiError(jvmti, jvmti->RunAgentThread(thread.get(), in CreateAgentThread()
111 CheckJvmtiError(jvmti, jvmti->RawMonitorEnter(list->events_mutex)); in VMInitCallback()
116 CheckJvmtiError(jvmti, jvmti->RawMonitorWait(list->events_mutex, 0)); in VMInitCallback()
[all …]
/aosp12/art/tools/jvmti-agents/jit-load/
H A Djitload.cc53 JNICALL void VmInitCb(jvmtiEnv* jvmti, in VmInitCb() argument
68 JNICALL static void DataDumpRequestCb(jvmtiEnv* jvmti) { in DataDumpRequestCb() argument
74 JNICALL void ClassPrepareJit(jvmtiEnv* jvmti, in ClassPrepareJit() argument
89 DataDumpRequestCb(jvmti); in VMDeathCb()
95 jvmtiEnv* jvmti = nullptr; in SetupJvmti() local
111 CHECK_CALL_SUCCESS(jvmti->SetEnvironmentLocalStorage(ops)); in SetupJvmti()
112 CHECK_CALL_SUCCESS(jvmti->SetEventCallbacks(&cb, sizeof(cb))); in SetupJvmti()
116 return jvmti; in SetupJvmti()
127 jvmtiEnv* jvmti = SetupJvmti(vm, options); in Agent_OnAttach() local
132 CHECK_CALL_SUCCESS(jvmti->GetCurrentThread(&thr)); in Agent_OnAttach()
[all …]
/aosp12/art/tools/jvmti-agents/simple-profile/
H A Dsimple_profile.cc67 void Dump(jvmtiEnv* jvmti);
118 ScopedJvmtiMonitor sjm(jvmti, mon_); in Enter()
133 ScopedJvmtiMonitor sjm(jvmti, mon_); in Dump()
153 DoDump(jvmti, env, std::move(copy)); in RunDumpLoop()
160 ScopedJvmtiMonitor sjm(jvmti, mon_); in Shutdown()
192 CHECK_JVMTI(jvmti->RunAgentThread( in FinishInitialization()
196 data->RunDumpLoop(jvmti, jni); in FinishInitialization()
368 data->Shutdown(jvmti, env); in VMDeathCB()
424 jvmtiEnv* jvmti = nullptr; in AgentStart() local
428 res = SetupJvmtiEnv(vm, &jvmti); in AgentStart()
[all …]
/aosp12/art/test/ti-agent/
H A Dtrace_helper.cc34 jvmti->GetThreadLocalStorage(thr, &data); in IsInCallback()
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()
113 static void threadEndCB(jvmtiEnv* jvmti, in threadEndCB() argument
117 if (JvmtiErrorToException(jnienv, jvmti, in threadEndCB()
129 static void singleStepCB(jvmtiEnv* jvmti, in singleStepCB() argument
135 if (JvmtiErrorToException(jnienv, jvmti, in singleStepCB()
170 if (IsInCallback(jnienv, jvmti, thr)) { in fieldAccessCB()
[all …]
H A Dsuspend_event_helper.cc55 TestData(jvmtiEnv* jvmti, in TestData()
72 env, jvmti, jvmti->CreateRawMonitor("SuspendStopMonitor", &notify_monitor)); in TestData()
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()
102 env, jvmti, jvmti->GetThreadLocalStorage(thr, reinterpret_cast<void**>(&data)))) { in cbSingleStep()
120 env, jvmti, jvmti->GetThreadLocalStorage(thr, reinterpret_cast<void**>(&data)))) { in cbExceptionCatch()
140 env, jvmti, jvmti->GetThreadLocalStorage(thr, reinterpret_cast<void**>(&data)))) { in cbException()
153 env, jvmti, jvmti->GetThreadLocalStorage(thr, reinterpret_cast<void**>(&data)))) { in cbMethodEntry()
171 env, jvmti, jvmti->GetThreadLocalStorage(thr, reinterpret_cast<void**>(&data)))) { in cbMethodExit()
[all …]
H A Djvmti_helper.cc241 jint GetExtensionEventId(jvmtiEnv* jvmti, const std::string_view& name) { in GetExtensionEventId() argument
246 CHECK_EQ(jvmti->GetExtensionEvents(&n_ext, &infos), JVMTI_ERROR_NONE); in GetExtensionEventId()
253 DeallocParams(jvmti, info.params, info.param_count); in GetExtensionEventId()
254 Dealloc(jvmti, info.short_description, info.id, info.params); in GetExtensionEventId()
256 Dealloc(jvmti, infos); in GetExtensionEventId()
261 void* GetExtensionFunctionVoid(JNIEnv* env, jvmtiEnv* jvmti, const std::string_view& name) { in GetExtensionFunctionVoid() argument
265 if (JvmtiErrorToException(env, jvmti, jvmti->GetExtensionFunctions(&n_ext, &infos))) { in GetExtensionFunctionVoid()
273 DeallocParams(jvmti, info.params, info.param_count); in GetExtensionFunctionVoid()
274 Dealloc(jvmti, info.short_description, info.errors, info.id, info.params); in GetExtensionFunctionVoid()
276 Dealloc(jvmti, infos); in GetExtensionFunctionVoid()
[all …]
H A 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()
H A 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 …]
H A 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()
H A 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()
H A Dredefinition_helper.cc43 static void throwCommonRedefinitionError(jvmtiEnv* jvmti, in throwCommonRedefinitionError() argument
50 jvmti->GetErrorName(res, &error); in throwCommonRedefinitionError()
59 jvmti->GetClassSignature(target[i], &signature, &generic); in throwCommonRedefinitionError()
64 jvmti->Deallocate(reinterpret_cast<unsigned char*>(signature)); in throwCommonRedefinitionError()
65 jvmti->Deallocate(reinterpret_cast<unsigned char*>(generic)); in throwCommonRedefinitionError()
69 jvmti->Deallocate(reinterpret_cast<unsigned char*>(error)); in throwCommonRedefinitionError()
118 jvmtiEnv* jvmti, in CallRedefineEntrypoint() argument
123 entrypoint = jvmti->functions->RedefineClasses; in CallRedefineEntrypoint()
132 return entrypoint(jvmti, num_defs, defs); in CallRedefineEntrypoint()
135 static void throwRedefinitionError(jvmtiEnv* jvmti, in throwRedefinitionError() argument
[all …]
H A Djvmti_helper.h91 void* GetExtensionFunctionVoid(JNIEnv* env, jvmtiEnv* jvmti, const std::string_view& name);
93 template<typename T> T GetExtensionFunction(JNIEnv* env, jvmtiEnv* jvmti, const std::string_view& n… in GetExtensionFunction() argument
94 return reinterpret_cast<T>(GetExtensionFunctionVoid(env, jvmti, name)); in GetExtensionFunction()
97 jint GetExtensionEventId(jvmtiEnv* jvmti, const std::string_view& name);
/aosp12/art/tools/jvmti-agents/simple-force-redefine/
H A Dforceredefine.cc83 explicit JvmtiAllocator(jvmtiEnv* jvmti) : jvmti_(jvmti) {} in JvmtiAllocator() argument
148 AgentInfo* ai = GetAgentInfo(jvmti); in CbClassFileLoadHook()
156 JvmtiAllocator allocator(jvmti); in CbClassFileLoadHook()
211 jvmti->RetransformClasses(1, &klass); in RedefineClass()
216 AgentInfo* ai = GetAgentInfo(jvmti); in AgentMain()
226 RedefineClass(jvmti, jni, klass_name); in AgentMain()
267 jvmtiEnv* jvmti = nullptr; in AgentStart() local
270 jvmti == nullptr) { in AgentStart()
293 jvmti->SetEventCallbacks(&cb, sizeof(cb)); in AgentStart()
301 jvmti->GetCurrentThread(&thr); in AgentStart()
[all …]
/aosp12/art/tools/jvmti-agents/titrace/
H A Dtitrace.cc27 #define CHECK_JVMTI_ERROR(jvmti, errnum) \ argument
34 jvmti->GetErrorName(errnum, /*out*/ &errnum_str); in GetJvmtiErrorString()
100 static void Initialize(jvmtiEnv* jvmti) { in Initialize()
242 jvmtiEnv* jvmti = nullptr; in Agent_OnLoad() local
249 if (res != JNI_OK || jvmti == nullptr) { in Agent_OnLoad()
252 if (res != JNI_OK || jvmti == nullptr) { in Agent_OnLoad()
261 TraceStatistics::Initialize(jvmti); in Agent_OnLoad()
272 error = jvmti->AddCapabilities(&caps); in Agent_OnLoad()
273 CHECK_JVMTI_ERROR(jvmti, error) in Agent_OnLoad()
293 CHECK_JVMTI_ERROR(jvmti, error) in Agent_OnLoad()
[all …]
/aosp12/art/tools/jvmti-agents/enable-vlog/
H A Denablevlog.cc60 T GetExtensionFunction(jvmtiEnv* jvmti, const std::string_view& name) { in GetExtensionFunction() argument
64 if (jvmti->GetExtensionFunctions(&n_ext, &infos) != JVMTI_ERROR_NONE) { in GetExtensionFunction()
72 DeallocParams(jvmti, info.params, info.param_count); in GetExtensionFunction()
75 Dealloc(jvmti, infos); in GetExtensionFunction()
79 static jint SetupJvmtiEnv(JavaVM* vm, jvmtiEnv** jvmti) { in SetupJvmtiEnv() argument
81 res = vm->GetEnv(reinterpret_cast<void**>(jvmti), JVMTI_VERSION_1_1); in SetupJvmtiEnv()
83 if (res != JNI_OK || *jvmti == nullptr) { in SetupJvmtiEnv()
85 return vm->GetEnv(reinterpret_cast<void**>(jvmti), kArtTiVersion); in SetupJvmtiEnv()
93 jvmtiEnv* jvmti = nullptr; in AgentStart() local
94 if (SetupJvmtiEnv(vm, &jvmti) != JNI_OK) { in AgentStart()
[all …]
/aosp12/art/tools/jvmti-agents/dump-jvmti-state/
H A 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 …]
/aosp12/art/tools/jvmti-agents/ti-alloc-sample/
H A Dti_alloc_sample.cc276 static std::string formatAllocation(jvmtiEnv* jvmti, in formatAllocation() argument
281 ScopedThreadInfo sti(jvmti, jni, thr.thread); in formatAllocation()
284 ScopedClassInfo sci(jvmti, klass); in formatAllocation()
296 ScopedMethodInfo smi(jvmti, jni, method_id); in formatMethod()
328 formatAllocation(jvmti, in logVMObjectAlloc()
336 jvmtiError err = jvmti->GetStackTrace(thread, in logVMObjectAlloc()
359 if (res != JNI_OK || *jvmti == nullptr) { in SetupJvmtiEnv()
374 return jvmti->AddCapabilities(&caps); in SetupCapabilities()
419 jvmtiEnv* jvmti = nullptr; in AgentStart() local
420 if (SetupJvmtiEnv(vm, &jvmti) != JNI_OK) { in AgentStart()
[all …]
/aosp12/art/test/1934-jvmti-signal-thread/
H A DAndroid.bp3 // Build rules for ART run-test `1934-jvmti-signal-thread`.
16 name: "art-run-test-1934-jvmti-signal-thread",
21 ":art-run-test-1934-jvmti-signal-thread-expected-stdout",
22 ":art-run-test-1934-jvmti-signal-thread-expected-stderr",
28 name: "art-run-test-1934-jvmti-signal-thread-expected-stdout",
29 out: ["art-run-test-1934-jvmti-signal-thread-expected-stdout.txt"],
36 name: "art-run-test-1934-jvmti-signal-thread-expected-stderr",
37 out: ["art-run-test-1934-jvmti-signal-thread-expected-stderr.txt"],
/aosp12/art/test/ti-stress/
H A Dstress.cc708 if (jvmti->SetEventNotificationMode(JVMTI_ENABLE, in WatchAllFields()
728 ScopedClassInfo sci(jvmti, k); in WatchAllFields()
758 jvmtiEnv* jvmti = nullptr; in Agent_OnLoad() local
822 jvmti->AddCapabilities(&caps); in Agent_OnLoad()
840 if (jvmti->SetEventNotificationMode(JVMTI_ENABLE, in Agent_OnLoad()
847 if (jvmti->SetEventNotificationMode(JVMTI_ENABLE, in Agent_OnLoad()
855 if (jvmti->SetEventNotificationMode(JVMTI_ENABLE, in Agent_OnLoad()
861 if (jvmti->SetEventNotificationMode(JVMTI_ENABLE, in Agent_OnLoad()
867 if (jvmti->SetEventNotificationMode(JVMTI_ENABLE, in Agent_OnLoad()
873 if (jvmti->SetEventNotificationMode(JVMTI_ENABLE, in Agent_OnLoad()
[all …]
/aosp12/art/tools/jvmti-agents/breakpoint-logger/
H A Dbreakpoint_logger.cc39 static void VMInitCB(jvmtiEnv* jvmti, JNIEnv* env, jthread thr ATTRIBUTE_UNUSED) { in VMInitCB() argument
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()
408 error = jvmti->SetEventNotificationMode(JVMTI_ENABLE, in AgentStart()
423 VMInitCB(jvmti, env, nullptr); in AgentStart()
[all …]
/aosp12/art/openjdkjvmti/
H A 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()
/aosp12/art/test/1962-multi-thread-events/
H A Dmulti_thread_events.cc37 void cbMethodEntry(jvmtiEnv* jvmti, in cbMethodEntry() argument
45 env, jvmti, jvmti->GetThreadLocalStorage(thread, reinterpret_cast<void**>(&data)))) { in cbMethodEntry()

12345678910>>...14