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

Staffan Larsen staffan.larsen at oracle.com
Thu Jan 23 05:44:53 PST 2014


Looks good!

Thanks,
/Staffan

On 23 jan 2014, at 08:12, Yumin Qi <yumin.qi at oracle.com> 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