src/share/vm/prims/jni.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File
*** old/src/share/vm/prims/jni.cpp Mon Sep 17 16:13:06 2012
--- new/src/share/vm/prims/jni.cpp Mon Sep 17 16:13:04 2012
*** 3001,3013 ****
--- 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
! #if INCLUDE_JNI_CHECK
DEBUG_ONLY(Klass* param_k = jniCheck::validate_class(thread, clazz);)
! #endif // JNICHECK_KERNEL
! #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 ****
--- 4975,4987 ----
}
}
// Returns the function structure
struct JNINativeInterface_* jni_functions() {
! #ifndef JNICHECK_KERNEL
! #if INCLUDE_JNI_CHECK
if (CheckJNICalls) return jni_functions_check();
! #else // JNICHECK_KERNEL
if (CheckJNICalls) warning("-Xcheck:jni is not supported in kernel vm.");
#endif // JNICHECK_KERNEL
! #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