RFR(XS): 6651256: 6651256: jstack: DeleteGlobalRef method call doesn't lead to descreasing of global refs count shown by jstack

Zhengyu Gu zhengyu.gu at oracle.com
Thu Jan 23 05:37:06 PST 2014


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