• Home
  • Raw
  • Download

Lines Matching refs:jvmti

77 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()
137 CHECK_JVMTI(jvmti->Deallocate(reinterpret_cast<unsigned char*>(field_name))); in DataDumpRequestCb()
138 CHECK_JVMTI(jvmti->Deallocate(reinterpret_cast<unsigned char*>(field_sig))); in DataDumpRequestCb()
139 CHECK_JVMTI(jvmti->Deallocate(reinterpret_cast<unsigned char*>(class_name))); in DataDumpRequestCb()
143 static void VMDeathCb(jvmtiEnv* jvmti, JNIEnv* env ATTRIBUTE_UNUSED) { in VMDeathCb() argument
144 DataDumpRequestCb(jvmti); in VMDeathCb()
146 CHECK_JVMTI(jvmti->GetEnvironmentLocalStorage(reinterpret_cast<void**>(&list))); in VMDeathCb()
150 static void CreateFieldList(jvmtiEnv* jvmti, JNIEnv* env, const std::string& args) { in CreateFieldList() argument
152 CHECK_JVMTI(jvmti->Allocate(sizeof(*list), reinterpret_cast<unsigned char**>(&list))); in CreateFieldList()
154 CHECK_JVMTI(jvmti->SetEnvironmentLocalStorage(list)); in CreateFieldList()
157 static void VMInitCb(jvmtiEnv* jvmti, JNIEnv* env, jobject thr ATTRIBUTE_UNUSED) { in VMInitCb() argument
159 CHECK_JVMTI(jvmti->GetEnvironmentLocalStorage(reinterpret_cast<void**>(&args))); in VMInitCb()
160 CHECK_JVMTI(jvmti->SetEnvironmentLocalStorage(nullptr)); in VMInitCb()
161 CreateFieldList(jvmti, env, args); in VMInitCb()
162 CHECK_JVMTI(jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_VM_DEATH, nullptr)); in VMInitCb()
163 CHECK_JVMTI(jvmti->SetEventNotificationMode(JVMTI_ENABLE, in VMInitCb()
166 CHECK_JVMTI(jvmti->Deallocate(reinterpret_cast<unsigned char*>(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()
184 CHECK_JVMTI(jvmti->SetEventCallbacks(&cb, sizeof(cb))); in AgentStart()
187 CHECK_JVMTI(jvmti->Allocate(strlen(options) + 1, &ptr)); in AgentStart()
189 CHECK_JVMTI(jvmti->SetEnvironmentLocalStorage(ptr)); in AgentStart()
190 CHECK_JVMTI(jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_VM_INIT, nullptr)); in AgentStart()
194 CreateFieldList(jvmti, env, options); in AgentStart()
195 CHECK_JVMTI(jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_VM_DEATH, nullptr)); in AgentStart()
196 CHECK_JVMTI(jvmti->SetEventNotificationMode(JVMTI_ENABLE, in AgentStart()