Lines Matching refs:jenv
148 dtj_get_handle(JNIEnv *jenv, jobject caller)
153 dtj_throw_illegal_state(jenv, "JNI table not loaded");
156 handle = (*jenv)->CallIntMethod(jenv, caller, g_gethandle_jm);
157 if ((*jenv)->ExceptionCheck(jenv)) {
161 dtj_throw_illegal_state(jenv, "no consumer handle");
174 dtj_get_java_consumer(JNIEnv *jenv, jobject caller, dtj_java_consumer_t *jc)
177 int handle = dtj_get_handle(jenv, caller);
193 dtj_throw_no_such_element(jenv, "consumer handle %d", handle);
205 jc->dtjj_jenv = jenv;
217 dtj_add_consumer(JNIEnv *jenv, dtj_consumer_t *c, int *seq)
238 dtj_throw_out_of_memory(jenv,
248 dtj_throw_resource_limit(jenv, "Too many consumers");
269 dtj_throw_out_of_memory(jenv,
291 dtj_throw_illegal_state(jenv, "consumer table full,"
317 dtj_remove_consumer(JNIEnv *jenv, jobject caller)
320 int handle = dtj_get_handle(jenv, caller);
398 JNIEnv *jenv = jc->dtjj_jenv;
404 jprogram = (*jenv)->NewObject(jenv, g_program_jc,
408 jprogram = (*jenv)->NewObject(jenv, g_programfile_jc,
412 dtj_throw_illegal_argument(jenv, "unexpected program type %d\n",
415 if ((*jenv)->ExceptionCheck(jenv)) {
420 (*jenv)->SetIntField(jenv, jprogram, g_progid_jf,
424 (*jenv)->DeleteLocalRef(jenv, jprogram);
425 dtj_throw_out_of_memory(jenv,
440 JNIEnv *jenv = jc->dtjj_jenv;
452 (*jenv)->DeleteLocalRef(jenv, minProbeAttributes);
456 programInfo = (*jenv)->NewObject(jenv, g_proginfo_jc,
459 (*jenv)->DeleteLocalRef(jenv, minProbeAttributes);
460 (*jenv)->DeleteLocalRef(jenv, minStatementAttributes);
1342 JNIEnv *jenv, jobject caller, jobject address)
1354 if (dtj_get_java_consumer(jenv, caller, &jc) != DTJ_OK) {
1360 if ((*jenv)->IsInstanceOf(jenv, address, g_int_jc)) {
1362 addr = (GElf_Addr)(uint32_t)(*jenv)->CallIntMethod(jenv,
1364 } else if ((*jenv)->IsInstanceOf(jenv, address, g_number_jc)) {
1366 addr = (GElf_Addr)(*jenv)->CallLongMethod(jenv,
1369 dtj_throw_class_cast(jenv, "Expected Number address");
1376 dtj_throw_out_of_memory(jenv,
1382 jfunc = (*jenv)->NewStringUTF(jenv, s);
1391 Java_org_opensolaris_os_dtrace_LocalConsumer__1lookupUserFunction(JNIEnv *jenv,
1404 if (dtj_get_java_consumer(jenv, caller, &jc) != DTJ_OK) {
1410 if ((*jenv)->IsInstanceOf(jenv, address, g_int_jc)) {
1412 addr = (GElf_Addr)(uint32_t)(*jenv)->CallIntMethod(jenv,
1414 } else if ((*jenv)->IsInstanceOf(jenv, address, g_number_jc)) {
1416 addr = (GElf_Addr)(*jenv)->CallLongMethod(jenv,
1419 dtj_throw_class_cast(jenv, "Expected Number address");
1426 dtj_throw_out_of_memory(jenv,
1432 jfunc = (*jenv)->NewStringUTF(jenv, s);
1481 Java_org_opensolaris_os_dtrace_LocalConsumer__1createProcess(JNIEnv *jenv,
1490 if (dtj_get_java_consumer(jenv, caller, &jc) != DTJ_OK) {
1498 dtj_throw_out_of_memory(jenv,
1504 argv = dtj_make_argv(jenv, command, &argc);
1505 if ((*jenv)->ExceptionCheck(jenv)) {
1519 dtj_throw_out_of_memory(jenv,
1531 Java_org_opensolaris_os_dtrace_LocalConsumer__1grabProcess(JNIEnv *jenv,
1538 if (dtj_get_java_consumer(jenv, caller, &jc) != DTJ_OK) {
1546 dtj_throw_out_of_memory(jenv,
1560 dtj_throw_out_of_memory(jenv,
1661 JNIEnv *jenv = jc->dtjj_jenv;
1671 (*jenv)->CallVoidMethod(jenv, jc->dtjj_probelist, g_listadd_jm,
1673 (*jenv)->DeleteLocalRef(jenv, jprobedesc);
1674 if ((*jenv)->ExceptionCheck(jenv)) {
1687 JNIEnv *jenv = jc->dtjj_jenv;
1709 (*jenv)->DeleteLocalRef(jenv, jprobedesc);
1715 jprobe = (*jenv)->NewObject(jenv, g_probe_jc, g_probeinit_jm,
1717 (*jenv)->DeleteLocalRef(jenv, jprobedesc);
1718 (*jenv)->DeleteLocalRef(jenv, jprobeinfo);
1724 (*jenv)->CallVoidMethod(jenv, jc->dtjj_probelist, g_listadd_jm,
1726 (*jenv)->DeleteLocalRef(jenv, jprobe);
1727 if ((*jenv)->ExceptionCheck(jenv)) {