Lines Matching refs:env
70 makeUnsignedInt64(JNIEnv *env, uint64_t value) in makeUnsignedInt64() argument
77 if (!(byteArray = (*env)->NewByteArray(env, 9))) in makeUnsignedInt64()
79 if (!(bytes = (*env)->GetByteArrayElements(env, byteArray, NULL))) in makeUnsignedInt64()
91 (*env)->ReleaseByteArrayElements(env, byteArray, bytes, 0); in makeUnsignedInt64()
93 if (!(valueObj = (*env)->NewObject(env, ui64class, ui64cons_mid, in makeUnsignedInt64()
104 makeLong(JNIEnv *env, jlong value) in makeLong() argument
108 if (!(valueObj = (*env)->NewObject(env, longclass, longcons_mid, in makeLong()
119 makeDouble(JNIEnv *env, jdouble value) in makeDouble() argument
123 if (!(valueObj = (*env)->NewObject(env, doubleclass, doublecons_mid, in makeDouble()
135 Java_com_sun_solaris_service_kstat_KstatCtl_open(JNIEnv *env, jobject obj) in Java_com_sun_solaris_service_kstat_KstatCtl_open() argument
145 Java_com_sun_solaris_service_kstat_KstatCtl_close(JNIEnv *env, jobject obj, in Java_com_sun_solaris_service_kstat_KstatCtl_close() argument
158 JNIEnv *env, jobject obj) in Java_com_sun_solaris_service_kstat_Kstat_read() argument
161 ((kstat_ctl_t *)(uintptr_t)(*env)->GetLongField(env, obj, in Java_com_sun_solaris_service_kstat_Kstat_read()
163 kstat_t *ksp = ((kstat_t *)(uintptr_t)(*env)->GetLongField(env, obj, in Java_com_sun_solaris_service_kstat_Kstat_read()
173 if (!(e = (*env)->FindClass(env, KSTAT_READ_EX_CLASS_DESC))) in Java_com_sun_solaris_service_kstat_Kstat_read()
176 (*env)->Throw(env, (*env)->NewObject(env, e, in Java_com_sun_solaris_service_kstat_Kstat_read()
177 (*env)->GetStaticMethodID(env, e, "<init>", in Java_com_sun_solaris_service_kstat_Kstat_read()
187 Java_com_sun_solaris_service_kstat_KstatCtl_lookup(JNIEnv *env, jobject obj, in Java_com_sun_solaris_service_kstat_KstatCtl_lookup() argument
199 if (!(module = (*env)->GetStringUTFChars(env, moduleObj, NULL))) in Java_com_sun_solaris_service_kstat_KstatCtl_lookup()
201 if (!(name = (*env)->GetStringUTFChars(env, nameObj, NULL))) in Java_com_sun_solaris_service_kstat_KstatCtl_lookup()
204 kctl = (kstat_ctl_t *)(uintptr_t)(*env)->GetLongField(env, obj, in Java_com_sun_solaris_service_kstat_KstatCtl_lookup()
208 kstatObject = (*env)->NewObject(env, kstatclass, kstatcons_mid, in Java_com_sun_solaris_service_kstat_KstatCtl_lookup()
213 (*env)->ReleaseStringUTFChars(env, nameObj, name); in Java_com_sun_solaris_service_kstat_KstatCtl_lookup()
215 (*env)->ReleaseStringUTFChars(env, moduleObj, module); in Java_com_sun_solaris_service_kstat_KstatCtl_lookup()
229 Java_com_sun_solaris_service_kstat_Kstat_getValue(JNIEnv *env, jobject obj, in Java_com_sun_solaris_service_kstat_Kstat_getValue() argument
232 kstat_t *ksp = ((kstat_t *)(uintptr_t)(*env)->GetLongField(env, obj, in Java_com_sun_solaris_service_kstat_Kstat_getValue()
242 if (!(name = (*env)->GetStringUTFChars(env, nameObj, NULL))) in Java_com_sun_solaris_service_kstat_Kstat_getValue()
245 if (!(exceptionClass = (*env)->FindClass(env, in Java_com_sun_solaris_service_kstat_Kstat_getValue()
247 (*env)->ReleaseStringUTFChars(env, nameObj, name); in Java_com_sun_solaris_service_kstat_Kstat_getValue()
258 valueObj = makeLong(env, ksnp->value.c[0]); in Java_com_sun_solaris_service_kstat_Kstat_getValue()
261 valueObj = makeLong(env, ksnp->value.i32); in Java_com_sun_solaris_service_kstat_Kstat_getValue()
264 valueObj = makeLong(env, ksnp->value.ui32); in Java_com_sun_solaris_service_kstat_Kstat_getValue()
267 valueObj = makeLong(env, ksnp->value.i64); in Java_com_sun_solaris_service_kstat_Kstat_getValue()
270 valueObj = makeUnsignedInt64(env, ksnp->value.ui64); in Java_com_sun_solaris_service_kstat_Kstat_getValue()
273 valueObj = (*env)->NewStringUTF(env, in Java_com_sun_solaris_service_kstat_Kstat_getValue()
277 valueObj = makeDouble(env, ksnp->value.f); in Java_com_sun_solaris_service_kstat_Kstat_getValue()
280 valueObj = makeDouble(env, ksnp->value.d); in Java_com_sun_solaris_service_kstat_Kstat_getValue()
290 (*env)->ReleaseStringUTFChars(env, nameObj, name); in Java_com_sun_solaris_service_kstat_Kstat_getValue()
294 (*env)->ReleaseStringUTFChars(env, nameObj, name); in Java_com_sun_solaris_service_kstat_Kstat_getValue()
295 (*env)->Throw(env, (*env)->NewObject(env, exceptionClass, in Java_com_sun_solaris_service_kstat_Kstat_getValue()
296 (*env)->GetStaticMethodID(env, exceptionClass, "<init>", in Java_com_sun_solaris_service_kstat_Kstat_getValue()
307 ksobj_get_hrtime(JNIEnv *env, jobject obj, offset_t ksfieldoff) in ksobj_get_hrtime() argument
309 kstat_t *ksp = ((kstat_t *)(uintptr_t)(*env)->GetLongField(env, obj, in ksobj_get_hrtime()
315 return ((*env)->NewObject(env, hrtimeclass, hrtimecons_mid, in ksobj_get_hrtime()
316 makeUnsignedInt64(env, *((hrtime_t *)ksp + ksfieldoff * in ksobj_get_hrtime()
325 Java_com_sun_solaris_service_kstat_Kstat_getSnapTime(JNIEnv *env, jobject obj) in Java_com_sun_solaris_service_kstat_Kstat_getSnapTime() argument
327 return (ksobj_get_hrtime(env, obj, offsetof(kstat_t, ks_snaptime))); in Java_com_sun_solaris_service_kstat_Kstat_getSnapTime()
335 Java_com_sun_solaris_service_kstat_Kstat_getCreationTime(JNIEnv *env, in Java_com_sun_solaris_service_kstat_Kstat_getCreationTime() argument
338 return (ksobj_get_hrtime(env, obj, offsetof(kstat_t, ks_crtime))); in Java_com_sun_solaris_service_kstat_Kstat_getCreationTime()
346 Java_com_sun_solaris_service_kstat_KstatCtl_chainUpdate(JNIEnv *env, in Java_com_sun_solaris_service_kstat_KstatCtl_chainUpdate() argument
351 kctl = (kstat_ctl_t *)(uintptr_t)(*env)->GetLongField(env, obj, in Java_com_sun_solaris_service_kstat_KstatCtl_chainUpdate()
362 Java_com_sun_solaris_service_kstat_KstatCtl_init(JNIEnv *env, jclass clazz) in Java_com_sun_solaris_service_kstat_KstatCtl_init() argument
371 if (!(doubleclass_lref = (*env)->FindClass(env, DOUBLE_CLASS_DESC))) in Java_com_sun_solaris_service_kstat_KstatCtl_init()
373 if (!(doubleclass = (*env)->NewGlobalRef(env, doubleclass_lref))) in Java_com_sun_solaris_service_kstat_KstatCtl_init()
375 if (!(doublecons_mid = (*env)->GetMethodID(env, doubleclass, "<init>", in Java_com_sun_solaris_service_kstat_KstatCtl_init()
379 if (!(hrtimeclass_lref = (*env)->FindClass(env, HRTIME_CLASS_DESC))) in Java_com_sun_solaris_service_kstat_KstatCtl_init()
381 if (!(hrtimeclass = (*env)->NewGlobalRef(env, hrtimeclass_lref))) in Java_com_sun_solaris_service_kstat_KstatCtl_init()
383 if (!(hrtimecons_mid = (*env)->GetMethodID(env, hrtimeclass, "<init>", in Java_com_sun_solaris_service_kstat_KstatCtl_init()
387 if (!(kstatclass_lref = (*env)->FindClass(env, KSTAT_CLASS_DESC))) in Java_com_sun_solaris_service_kstat_KstatCtl_init()
389 if (!(kstatclass = (*env)->NewGlobalRef(env, kstatclass_lref))) in Java_com_sun_solaris_service_kstat_KstatCtl_init()
391 if (!(kstatcons_mid = (*env)->GetMethodID(env, kstatclass, "<init>", in Java_com_sun_solaris_service_kstat_KstatCtl_init()
394 if (!(kstat_kctl_fieldid = (*env)->GetFieldID(env, kstatclass, "kctl", in Java_com_sun_solaris_service_kstat_KstatCtl_init()
397 if (!(kstat_ksp_fieldid = (*env)->GetFieldID(env, kstatclass, "ksp", in Java_com_sun_solaris_service_kstat_KstatCtl_init()
401 if (!(kstatctlclass_lref = (*env)->FindClass(env, KSTATCTL_CLASS_DESC))) in Java_com_sun_solaris_service_kstat_KstatCtl_init()
403 if (!(kstatctlclass = (*env)->NewGlobalRef(env, kstatctlclass_lref))) in Java_com_sun_solaris_service_kstat_KstatCtl_init()
405 if (!(kstatctl_kctl_fieldid = (*env)->GetFieldID(env, kstatctlclass, in Java_com_sun_solaris_service_kstat_KstatCtl_init()
409 if (!(longclass_lref = (*env)->FindClass(env, LONG_CLASS_DESC))) in Java_com_sun_solaris_service_kstat_KstatCtl_init()
411 if (!(longclass = (*env)->NewGlobalRef(env, longclass_lref))) in Java_com_sun_solaris_service_kstat_KstatCtl_init()
413 if (!(longcons_mid = (*env)->GetMethodID(env, longclass, "<init>", in Java_com_sun_solaris_service_kstat_KstatCtl_init()
417 if (!(ui64class_lref = (*env)->FindClass(env, UI64_CLASS_DESC))) in Java_com_sun_solaris_service_kstat_KstatCtl_init()
419 if (!(ui64class = (*env)->NewGlobalRef(env, ui64class_lref))) in Java_com_sun_solaris_service_kstat_KstatCtl_init()
421 ui64cons_mid = (*env)->GetMethodID(env, ui64class, "<init>", "([B)V"); in Java_com_sun_solaris_service_kstat_KstatCtl_init()