Request for review 7170638: Use DTRACE_PROBE[N] in JNI Set and SetStatic Field.
Coleen Phillimore
coleen.phillimore at oracle.com
Mon Oct 1 12:50:00 PDT 2012
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.
Thanks,
Coleen
On 10/1/2012 2:20 PM, Mark Wielaard wrote:
> On Mon, 2012-10-01 at 08:22 -0400, Keith McGuigan wrote:
>> Those lines in jni.cpp are bordering on "ludicrous" character length,
>> IMO. I know we don't have an hard-set character limit (much to my
>> chagrin), but we should at least try to keep it reasonable to and close
>> what else is in the surrounding code. (My bad for not mentioning this
>> eariler.)
> Please feel free to add a \ line continuation before the second
> DTRACE_PROBE macro on each line. That would still be ~100 character, but
> that would be shorter than some of the surrounding code, and seems like
> a "natural" break place. Normally I don't like such long lines either
> and keep to< 76 so things fit nicely in my terminal window, but since
> this file already had 160+ character lines I thought I would go with the
> flow.
>
>> The rest looks good to me.
> Thanks,
>
> Mark
More information about the hotspot-dev
mailing list