hotspot/src/share/vm/prims/jni.cpp
changeset 13958 f5598a86c223
parent 13952 e3cf184080bc
child 13977 92de166c91b3
equal deleted inserted replaced
13957:0f9d3a89b1c2 13958:f5598a86c223
     1 /*
     1 /*
     2  * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
       
     3  * Copyright (c) 2012 Red Hat, Inc.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     5  *
     5  * This code is free software; you can redistribute it and/or modify it
     6  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     8  * published by the Free Software Foundation.
  2818 #define DEFINE_SETFIELD(Argument,Fieldname,Result,SigType,unionType) \
  2819 #define DEFINE_SETFIELD(Argument,Fieldname,Result,SigType,unionType) \
  2819 \
  2820 \
  2820 JNI_QUICK_ENTRY(void, jni_Set##Result##Field(JNIEnv *env, jobject obj, jfieldID fieldID, Argument value)) \
  2821 JNI_QUICK_ENTRY(void, jni_Set##Result##Field(JNIEnv *env, jobject obj, jfieldID fieldID, Argument value)) \
  2821   JNIWrapper("Set" XSTR(Result) "Field"); \
  2822   JNIWrapper("Set" XSTR(Result) "Field"); \
  2822 \
  2823 \
  2823   HS_DTRACE_PROBE_CDECL_N(hotspot_jni, Set##Result##Field__entry, \
  2824   FP_SELECT_##Result( \
  2824     ( JNIEnv*, jobject, jfieldID FP_SELECT_##Result(COMMA Argument,/*empty*/) ) ); \
  2825     DTRACE_PROBE4(hotspot_jni, Set##Result##Field__entry, env, obj, fieldID, value), \
  2825   HS_DTRACE_PROBE_N(hotspot_jni, Set##Result##Field__entry, \
  2826     DTRACE_PROBE3(hotspot_jni, Set##Result##Field__entry, env, obj, fieldID)); \
  2826     ( env, obj, fieldID FP_SELECT_##Result(COMMA value,/*empty*/) ) ); \
       
  2827 \
  2827 \
  2828   oop o = JNIHandles::resolve_non_null(obj); \
  2828   oop o = JNIHandles::resolve_non_null(obj); \
  2829   Klass* k = o->klass(); \
  2829   Klass* k = o->klass(); \
  2830   int offset = jfieldIDWorkaround::from_instance_jfieldID(k, fieldID);  \
  2830   int offset = jfieldIDWorkaround::from_instance_jfieldID(k, fieldID);  \
  2831   /* Keep JVMTI addition small and only check enabled flag here.       */ \
  2831   /* Keep JVMTI addition small and only check enabled flag here.       */ \
  3128 #ifndef USDT2
  3128 #ifndef USDT2
  3129 #define DEFINE_SETSTATICFIELD(Argument,Fieldname,Result,SigType,unionType) \
  3129 #define DEFINE_SETSTATICFIELD(Argument,Fieldname,Result,SigType,unionType) \
  3130 \
  3130 \
  3131 JNI_ENTRY(void, jni_SetStatic##Result##Field(JNIEnv *env, jclass clazz, jfieldID fieldID, Argument value)) \
  3131 JNI_ENTRY(void, jni_SetStatic##Result##Field(JNIEnv *env, jclass clazz, jfieldID fieldID, Argument value)) \
  3132   JNIWrapper("SetStatic" XSTR(Result) "Field"); \
  3132   JNIWrapper("SetStatic" XSTR(Result) "Field"); \
  3133   HS_DTRACE_PROBE_CDECL_N(hotspot_jni, SetStatic##Result##Field__entry,\
  3133   FP_SELECT_##Result( \
  3134     ( JNIEnv*, jclass, jfieldID FP_SELECT_##Result(COMMA Argument,/*empty*/) ) ); \
  3134      DTRACE_PROBE4(hotspot_jni, SetStatic##Result##Field__entry, env, clazz, fieldID, value), \
  3135   HS_DTRACE_PROBE_N(hotspot_jni, SetStatic##Result##Field__entry, \
  3135      DTRACE_PROBE3(hotspot_jni, SetStatic##Result##Field__entry, env, clazz, fieldID)); \
  3136     ( env, clazz, fieldID FP_SELECT_##Result(COMMA value,/*empty*/) ) ); \
       
  3137 \
  3136 \
  3138   JNIid* id = jfieldIDWorkaround::from_static_jfieldID(fieldID); \
  3137   JNIid* id = jfieldIDWorkaround::from_static_jfieldID(fieldID); \
  3139   assert(id->is_static_field_id(), "invalid static field id"); \
  3138   assert(id->is_static_field_id(), "invalid static field id"); \
  3140   /* Keep JVMTI addition small and only check enabled flag here. */ \
  3139   /* Keep JVMTI addition small and only check enabled flag here. */ \
  3141   /* jni_SetField_probe() assumes that is okay to create handles. */ \
  3140   /* jni_SetField_probe() assumes that is okay to create handles. */ \