hotspot/src/share/vm/prims/jni.cpp
void quicken_jni_functions() {
{- -------------------------------------------
(1) 以下のような条件が成り立っている場合,
jni_NativeInterface 内の各 Get<Primitive>Field を
対応する JNI_FastGetField のメソッドで生成したコード片に置き換える.
(条件が成り立っていなければ何もしない)
---------------------------------------- -}
// Replace Get<Primitive>Field with fast versions
if (UseFastJNIAccessors && !JvmtiExport::can_post_field_access()
&& !VerifyJNIFields && !TraceJNICalls && !CountJNICalls && !CheckJNICalls
#if defined(_WINDOWS) && defined(IA32) && defined(COMPILER2)
// windows x86 currently needs SEH wrapper and the gain of the fast
// versions currently isn't certain for server vm on uniprocessor.
&& os::is_MP()
#endif
) {
address func;
func = JNI_FastGetField::generate_fast_get_boolean_field();
if (func != (address)-1) {
jni_NativeInterface.GetBooleanField = (GetBooleanField_t)func;
}
func = JNI_FastGetField::generate_fast_get_byte_field();
if (func != (address)-1) {
jni_NativeInterface.GetByteField = (GetByteField_t)func;
}
func = JNI_FastGetField::generate_fast_get_char_field();
if (func != (address)-1) {
jni_NativeInterface.GetCharField = (GetCharField_t)func;
}
func = JNI_FastGetField::generate_fast_get_short_field();
if (func != (address)-1) {
jni_NativeInterface.GetShortField = (GetShortField_t)func;
}
func = JNI_FastGetField::generate_fast_get_int_field();
if (func != (address)-1) {
jni_NativeInterface.GetIntField = (GetIntField_t)func;
}
func = JNI_FastGetField::generate_fast_get_long_field();
if (func != (address)-1) {
jni_NativeInterface.GetLongField = (GetLongField_t)func;
}
func = JNI_FastGetField::generate_fast_get_float_field();
if (func != (address)-1) {
jni_NativeInterface.GetFloatField = (GetFloatField_t)func;
}
func = JNI_FastGetField::generate_fast_get_double_field();
if (func != (address)-1) {
jni_NativeInterface.GetDoubleField = (GetDoubleField_t)func;
}
}
}
This document is available under the GNU GENERAL PUBLIC LICENSE Version 2.