RFR(XS): 6651256: 6651256: jstack: DeleteGlobalRef method call doesn't lead to descreasing of global refs count shown by jstack
Coleen Phillimore
coleen.phillimore at oracle.com
Thu Jan 23 07:50:54 PST 2014
Yumin, Can you make the parameter not be "oop"? I'm surprised it
compiles with fastdebug but maybe the compiler can separate the
namespaces for types better than I can visually. Call the parameter
oopptr or something like that. Otherwise change looks fine.
Thanks,
Coleen
On 01/23/2014 08:37 AM, Zhengyu Gu wrote:
> Good to me.
>
> -Zhengyu
>
> On 1/23/2014 2:12 AM, Yumin Qi wrote:
>> Please review this simple fix:
>>
>> bug: https://bugs.openjdk.java.net/browse/JDK-6651256
>> webrev: http://cr.openjdk.java.net/~minqi/6651256/webrev00/
>>
>> Summary: jni_DeleteGlobalRef does not really release the jni handle,
>> instead, set the handle point to JNIHandles::_deleted_handle which
>> holds an oop instance (java/lang/Object) in Java heap and never be
>> GC'ed. When counting number of global reference, it counts all the
>> handles on the chain list, which includes the already deleted ones.
>> Fix by not counting those already deleted references.
>>
>> Tests: JPRT, tmtools/jstack/jniglobalref/globalrefcount
>>
>> Thanks
>> Yumin
>
More information about the hotspot-runtime-dev
mailing list