Request for review 7170638: Use DTRACE_PROBE[N] in JNI Set and SetStatic Field.

Coleen Phillimore coleen.phillimore at oracle.com
Mon Oct 1 13:49:21 PDT 2012


Oh good, I see that.

I have another question.   You check for the presence of  
/usr/include/sys/sdt.h to set DTRACE_ENABLED.   Is this file installed 
with gcc versions 4.5+ or can it be installed with a latest version of 
linux?   Is dtrace only supported with gcc 4.5+ or only supported with a 
version of linux that enables this?

If we upgraded our tool chains to be gcc 4.5+ (4.7) does that mean we 
might enable this?   Or is it tied to the linux version?  Does this 
question make sense?

Thanks,
Coleen

On 10/1/2012 4:02 PM, Mark Wielaard wrote:
> 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