src/share/vm/prims/jni.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File hotspot-npg Cdiff src/share/vm/prims/jni.cpp

src/share/vm/prims/jni.cpp

Print this page

        

*** 3001,3013 **** DTRACE_PROBE3(hotspot_jni, GetStaticObjectField__entry, env, clazz, fieldID); #else /* USDT2 */ HOTSPOT_JNI_GETSTATICOBJECTFIELD_ENTRY( env, clazz, (uintptr_t) fieldID); #endif /* USDT2 */ ! #ifndef JNICHECK_KERNEL DEBUG_ONLY(Klass* param_k = jniCheck::validate_class(thread, clazz);) ! #endif // JNICHECK_KERNEL JNIid* id = jfieldIDWorkaround::from_static_jfieldID(fieldID); assert(id->is_static_field_id(), "invalid static field id"); // Keep JVMTI addition small and only check enabled flag here. // jni_GetField_probe() assumes that is okay to create handles. if (JvmtiExport::should_post_field_access()) { --- 3001,3013 ---- DTRACE_PROBE3(hotspot_jni, GetStaticObjectField__entry, env, clazz, fieldID); #else /* USDT2 */ HOTSPOT_JNI_GETSTATICOBJECTFIELD_ENTRY( env, clazz, (uintptr_t) fieldID); #endif /* USDT2 */ ! #if INCLUDE_JNI_CHECK DEBUG_ONLY(Klass* param_k = jniCheck::validate_class(thread, clazz);) ! #endif // INCLUDE_JNI_CHECK JNIid* id = jfieldIDWorkaround::from_static_jfieldID(fieldID); assert(id->is_static_field_id(), "invalid static field id"); // Keep JVMTI addition small and only check enabled flag here. // jni_GetField_probe() assumes that is okay to create handles. if (JvmtiExport::should_post_field_access()) {
*** 3949,3958 **** --- 3949,3959 ---- // is not native. Ask JVM TI what prefixes have been specified. Then check // to see if the native method is now wrapped with the prefixes. See the // SetNativeMethodPrefix(es) functions in the JVM TI Spec for details. static Method* find_prefixed_native(KlassHandle k, Symbol* name, Symbol* signature, TRAPS) { + #if INCLUDE_JVMTI ResourceMark rm(THREAD); Method* method; int name_len = name->utf8_length(); char* name_str = name->as_utf8(); int prefix_count;
*** 3980,3989 **** --- 3981,3991 ---- } // found as non-native, so prefix is good, add it, probably just need more prefixes name_len = trial_len; name_str = trial_name_str; } + #endif // INCLUDE_JVMTI return NULL; // not found } static bool register_native(KlassHandle k, Symbol* name, Symbol* signature, address entry, TRAPS) { Method* method = Klass::cast(k())->lookup_method(name, signature);
*** 4973,4987 **** } } // Returns the function structure struct JNINativeInterface_* jni_functions() { ! #ifndef JNICHECK_KERNEL if (CheckJNICalls) return jni_functions_check(); ! #else // JNICHECK_KERNEL ! if (CheckJNICalls) warning("-Xcheck:jni is not supported in kernel vm."); ! #endif // JNICHECK_KERNEL return &jni_NativeInterface; } // Returns the function structure struct JNINativeInterface_* jni_functions_nocheck() { --- 4975,4987 ---- } } // Returns the function structure struct JNINativeInterface_* jni_functions() { ! #if INCLUDE_JNI_CHECK if (CheckJNICalls) return jni_functions_check(); ! #endif // INCLUDE_JNI_CHECK return &jni_NativeInterface; } // Returns the function structure struct JNINativeInterface_* jni_functions_nocheck() {
src/share/vm/prims/jni.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File