Request for review 7170638: Use DTRACE_PROBE[N] in JNI Set and SetStatic Field.
Mark Wielaard
mjw at redhat.com
Mon Oct 1 13:02:19 PDT 2012
On Mon, 2012-10-01 at 15:50 -0400, Coleen Phillimore wrote:
> http://cr.openjdk.java.net/~coleenp/7170638/src/share/vm/prims/jni.cpp.udiff.html
>
> In jni.cpp it looks like the macro change was a cleanup (?) but what
> happened to this? It seems to have gone away with the macro change?
>
> *! HS_DTRACE_PROBE_CDECL_N(hotspot_jni, SetStatic##Result##Field__entry,\*
> * ( JNIEnv*, jclass, jfieldID FP_SELECT_##Result(COMMA Argument,/*empty*/) ) ); \
> *
>
> On Solaris the DECL_N things add the extern "C" declaration.
>
> // Solaris dtrace needs actual extern function decls.
> #define HS_DTRACE_PROBE_DECL_N(provider,name,args) \
> DTRACE_ONLY(extern "C" void HS_DTRACE_PROBE_FN(provider,name) args)
>
> I tested solaris and it worked but I don't know how the extern "C"
> declaration got declared.
See also the explanation that was submitted with the original patch:
http://mail.openjdk.java.net/pipermail/hotspot-dev/2012-May/005739.html
But yes, that is basically precisely what the cleanup does. Instead of
having to specify things twice using two different macros
HS_DTRACE_PROBE_CDECL_N and then HS_DTRACE_PROBE_N. Just use what the
rest of the jni.cpp file uses, the DTRACE_PROBEN macro which does both
of them if needed.
Cheers,
Mark
More information about the hotspot-dev
mailing list