hotspot/src/share/vm/prims/jni.cpp
#define DEFINE_SETFIELD(Argument,Fieldname,Result,SigType,unionType) \
\
JNI_QUICK_ENTRY(void, jni_Set##Result##Field(JNIEnv *env, jobject obj, jfieldID fieldID, Argument value)) \
JNIWrapper("Set" XSTR(Result) "Field"); \
\
HS_DTRACE_PROBE_CDECL_N(hotspot_jni, Set##Result##Field__entry, \
( JNIEnv*, jobject, jfieldID FP_SELECT_##Result(COMMA Argument,/*empty*/) ) ); \
HS_DTRACE_PROBE_N(hotspot_jni, Set##Result##Field__entry, \
( env, obj, fieldID FP_SELECT_##Result(COMMA value,/*empty*/) ) ); \
\
oop o = JNIHandles::resolve_non_null(obj); \
klassOop k = o->klass(); \
int offset = jfieldIDWorkaround::from_instance_jfieldID(k, fieldID); \
/* Keep JVMTI addition small and only check enabled flag here. */ \
/* jni_SetField_probe_nh() assumes that is not okay to create handles */ \
/* and creates a ResetNoHandleMark. */ \
if (JvmtiExport::should_post_field_modification()) { \
jvalue field_value; \
field_value.unionType = value; \
o = JvmtiExport::jni_SetField_probe_nh(thread, obj, o, k, fieldID, false, SigType, (jvalue *)&field_value); \
} \
o->Fieldname##_field_put(offset, value); \
DTRACE_PROBE(hotspot_jni, Set##Result##Field__return);\
JNI_END
This document is available under the GNU GENERAL PUBLIC LICENSE Version 2.