• Home
  • Raw
  • Download

Lines Matching refs:ret

20 static void print_error(jvmtiEnv *jvmti, const char *msg, jvmtiError ret)  in print_error()  argument
24 err = (*jvmti)->GetErrorName(jvmti, ret, &err_msg); in print_error()
29 warnx("%s failed with an unknown error %d", msg, ret); in print_error()
40 jvmtiError ret; in do_get_line_number() local
43 ret = (*jvmti)->GetLineNumberTable(jvmti, m, &nr_lines, &loc_tab); in do_get_line_number()
44 if (ret == JVMTI_ERROR_ABSENT_INFORMATION || ret == JVMTI_ERROR_NATIVE_METHOD) { in do_get_line_number()
46 return ret; in do_get_line_number()
47 } else if (ret != JVMTI_ERROR_NONE) { in do_get_line_number()
48 print_error(jvmti, "GetLineNumberTable", ret); in do_get_line_number()
49 return ret; in do_get_line_number()
62 ret = JVMTI_ERROR_NONE; in do_get_line_number()
64 ret = JVMTI_ERROR_ABSENT_INFORMATION; in do_get_line_number()
69 return ret; in do_get_line_number()
78 jint ret; in get_line_numbers() local
115 ret = do_get_line_number(jvmti, c->pc, in get_line_numbers()
119 if (ret == JVMTI_ERROR_NONE) in get_line_numbers()
168 jvmtiError ret; in get_source_filename() local
175 ret = (*jvmti)->GetMethodDeclaringClass(jvmti, methodID, &decl_class); in get_source_filename()
176 if (ret != JVMTI_ERROR_NONE) { in get_source_filename()
177 print_error(jvmti, "GetMethodDeclaringClass", ret); in get_source_filename()
178 return ret; in get_source_filename()
181 ret = (*jvmti)->GetSourceFileName(jvmti, decl_class, &file_name); in get_source_filename()
182 if (ret != JVMTI_ERROR_NONE) { in get_source_filename()
183 print_error(jvmti, "GetSourceFileName", ret); in get_source_filename()
184 return ret; in get_source_filename()
187 ret = (*jvmti)->GetClassSignature(jvmti, decl_class, &class_sign, NULL); in get_source_filename()
188 if (ret != JVMTI_ERROR_NONE) { in get_source_filename()
189 print_error(jvmti, "GetClassSignature", ret); in get_source_filename()
197 print_error(jvmti, "GetClassSignature", ret); in get_source_filename()
198 ret = JVMTI_ERROR_OUT_OF_MEMORY; in get_source_filename()
202 ret = JVMTI_ERROR_NONE; in get_source_filename()
209 return ret; in get_source_filename()
218 jvmtiError ret; in fill_source_filenames() local
221 ret = get_source_filename(jvmti, line_tab[index].methodID, &(file_names[index])); in fill_source_filenames()
222 if (ret != JVMTI_ERROR_NONE) in fill_source_filenames()
223 return ret; in fill_source_filenames()
245 jvmtiError ret; in compiled_method_load_cb() local
250 ret = (*jvmti)->GetMethodDeclaringClass(jvmti, method, in compiled_method_load_cb()
252 if (ret != JVMTI_ERROR_NONE) { in compiled_method_load_cb()
253 print_error(jvmti, "GetMethodDeclaringClass", ret); in compiled_method_load_cb()
258 ret = get_line_numbers(jvmti, compile_info, &line_tab, &nr_lines); in compiled_method_load_cb()
259 if (ret != JVMTI_ERROR_NONE) { in compiled_method_load_cb()
260 if (ret != JVMTI_ERROR_NOT_FOUND) { in compiled_method_load_cb()
270 ret = fill_source_filenames(jvmti, nr_lines, line_tab, line_file_names); in compiled_method_load_cb()
271 if (ret != JVMTI_ERROR_NONE) { in compiled_method_load_cb()
280 ret = (*jvmti)->GetClassSignature(jvmti, decl_class, in compiled_method_load_cb()
282 if (ret != JVMTI_ERROR_NONE) { in compiled_method_load_cb()
283 print_error(jvmti, "GetClassSignature", ret); in compiled_method_load_cb()
287 ret = (*jvmti)->GetMethodName(jvmti, method, &func_name, in compiled_method_load_cb()
289 if (ret != JVMTI_ERROR_NONE) { in compiled_method_load_cb()
290 print_error(jvmti, "GetMethodName", ret); in compiled_method_load_cb()
330 int ret; in code_generated_cb() local
332 ret = jvmti_write_code(jvmti_agent, name, addr, code_addr, code_size); in code_generated_cb()
333 if (ret) in code_generated_cb()
344 jint ret; in Agent_OnLoad() local
355 ret = (*jvm)->GetEnv(jvm, (void *)&jvmti, JVMTI_VERSION_1); in Agent_OnLoad()
356 if (ret != JNI_OK) { in Agent_OnLoad()
368 ret = (*jvmti)->AddCapabilities(jvmti, &caps1); in Agent_OnLoad()
369 if (ret != JVMTI_ERROR_NONE) { in Agent_OnLoad()
370 print_error(jvmti, "AddCapabilities", ret); in Agent_OnLoad()
373 ret = (*jvmti)->GetJLocationFormat(jvmti, &format); in Agent_OnLoad()
374 if (ret == JVMTI_ERROR_NONE && format == JVMTI_JLOCATION_JVMBCI) { in Agent_OnLoad()
378 ret = (*jvmti)->AddCapabilities(jvmti, &caps1); in Agent_OnLoad()
379 if (ret == JVMTI_ERROR_NONE) in Agent_OnLoad()
381 } else if (ret != JVMTI_ERROR_NONE) in Agent_OnLoad()
382 print_error(jvmti, "GetJLocationFormat", ret); in Agent_OnLoad()
390 ret = (*jvmti)->SetEventCallbacks(jvmti, &cb, sizeof(cb)); in Agent_OnLoad()
391 if (ret != JVMTI_ERROR_NONE) { in Agent_OnLoad()
392 print_error(jvmti, "SetEventCallbacks", ret); in Agent_OnLoad()
396 ret = (*jvmti)->SetEventNotificationMode(jvmti, JVMTI_ENABLE, in Agent_OnLoad()
398 if (ret != JVMTI_ERROR_NONE) { in Agent_OnLoad()
399 print_error(jvmti, "SetEventNotificationMode(METHOD_LOAD)", ret); in Agent_OnLoad()
403 ret = (*jvmti)->SetEventNotificationMode(jvmti, JVMTI_ENABLE, in Agent_OnLoad()
405 if (ret != JVMTI_ERROR_NONE) { in Agent_OnLoad()
406 print_error(jvmti, "SetEventNotificationMode(CODE_GENERATED)", ret); in Agent_OnLoad()
415 int ret; in Agent_OnUnload() local
417 ret = jvmti_close(jvmti_agent); in Agent_OnUnload()
418 if (ret) in Agent_OnUnload()