JNI DEFINE_NEWSCALARARRAY uses DT_RETURN_MARK_DECL_FOR

Andrew John Hughes gnu_andrew at member.fsf.org
Wed Oct 28 08:58:54 PDT 2009


2009/10/22 Keith McGuigan <Keith.McGuigan at sun.com>:
>
> Thank you for these fixes, Mark, I've integrated them into
> http://hg.openjdk.java.net/jdk7/hotspot-rt/hotspot and they'll bubble up to
> the other repos (hotspot/hotspot and jdk7/hotspot) soon.
>
> Please refer to CR 6893483 to track these fixes.
>
> --
> - Keith
>
> Mark Wielaard wrote:
>>
>> Hi,
>>
>> In jni.cpp the DEFINE_NEWSCALARARRAY macro uses DT_RETURN_MARK_DECL_FOR
>> instead of the normal DT_RETURN_MARK_DECL. The DT_RETURN_MARK_DECL_FOR
>> macro should only be used for mark probes that could return a primitive
>> jfloat or jdouble. But DEFINE_NEWSCALARARRAY creates the functions for
>> New<Type>Array which return primitiveTypeArrays. This means that for
>> NewFloatArray and NewDoubleArray you cannot get the return value in the
>> return mark probe.
>>
>> According to hotspot_jni.d the intention is to return these values in
>> those cases:
>>
>>  probe NewDoubleArray__entry(void*, uintptr_t);
>>  probe NewDoubleArray__return(void*);
>>  probe NewFloatArray__entry(void*, uintptr_t);
>>  probe NewFloatArray__return(void*);
>>
>> The attached trivial patch fixes it and makes the actual return value in
>> those cases available.
>>
>> Tested against Systemtap, but the same should work for DTrace also.
>> I don't have access to a system with solaris/dtrace on it, so it would
>> be nice of someone who does could double check the above on such a
>> system.
>>
>> Please let me know if I should create a bug also on
>> https://bugs.openjdk.java.net/ and/or if I should report/post this patch
>> on some other mailing-list.
>>
>> Thanks,
>>
>> Mark
>>
>
>

Keith,

Shouldn't Mark have at least received a 'Contributed-by' credit on
this changeset?

Thanks,
-- 
Andrew :-)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

Support Free Java!
Contribute to GNU Classpath and the OpenJDK
http://www.gnu.org/software/classpath
http://openjdk.java.net

PGP Key: 94EFD9D8 (http://subkeys.pgp.net)
Fingerprint: F8EF F1EA 401E 2E60 15FA  7927 142C 2591 94EF D9D8


More information about the serviceability-dev mailing list