6893483: DTrace probe return values for a couple JNI methods are wrong

Tue, 20 Oct 2009 16:34:08 -0400

author
kamg
date
Tue, 20 Oct 2009 16:34:08 -0400
changeset 1469
08780c8a9f04
parent 1452
e715b51789d8
child 1470
a3b9e96881fe

6893483: DTrace probe return values for a couple JNI methods are wrong
Summary: Fix the shadowing and incorrect macro usages
Reviewed-by: coleenp

src/share/vm/prims/jni.cpp file | annotate | diff | comparison | revisions
     1.1 --- a/src/share/vm/prims/jni.cpp	Fri Oct 16 14:08:44 2009 -0700
     1.2 +++ b/src/share/vm/prims/jni.cpp	Tue Oct 20 16:34:08 2009 -0400
     1.3 @@ -2116,7 +2116,7 @@
     1.4    DT_RETURN_MARK(GetObjectArrayElement, jobject, (const jobject&)ret);
     1.5    objArrayOop a = objArrayOop(JNIHandles::resolve_non_null(array));
     1.6    if (a->is_within_bounds(index)) {
     1.7 -    jobject ret = JNIHandles::make_local(env, a->obj_at(index));
     1.8 +    ret = JNIHandles::make_local(env, a->obj_at(index));
     1.9      return ret;
    1.10    } else {
    1.11      char buf[jintAsStringSize];
    1.12 @@ -2150,14 +2150,14 @@
    1.13  
    1.14  #define DEFINE_NEWSCALARARRAY(Return,Allocator,Result) \
    1.15  \
    1.16 -  DT_RETURN_MARK_DECL_FOR(Result, New##Result##Array, Return);\
    1.17 +  DT_RETURN_MARK_DECL(New##Result##Array, Return);\
    1.18  \
    1.19  JNI_ENTRY(Return, \
    1.20            jni_New##Result##Array(JNIEnv *env, jsize len)) \
    1.21    JNIWrapper("New" XSTR(Result) "Array"); \
    1.22    DTRACE_PROBE2(hotspot_jni, New##Result##Array__entry, env, len);\
    1.23    Return ret = NULL;\
    1.24 -  DT_RETURN_MARK_FOR(Result, New##Result##Array, Return, (const Return&)ret);\
    1.25 +  DT_RETURN_MARK(New##Result##Array, Return, (const Return&)ret);\
    1.26  \
    1.27    oop obj= oopFactory::Allocator(len, CHECK_0); \
    1.28    ret = (Return) JNIHandles::make_local(env, obj); \

mercurial