PING [8u] RFR 8264816: Weak handles leak causes GC to take longer

Aleksey Shipilev shade at
Mon Apr 26 09:37:01 UTC 2021

On 4/23/21 2:25 PM, Denghui Dong wrote:
> Could I have a review of this small fix that solve the weak handles leak problem that exists in MembernameTable.
> JBS:
> webrev:

OK, I can reproduce it with the test from:


  $ build/linux-x86_64-normal-server-fastdebug/images/j2sdk-image/bin/java -Xmx16m -verbose:gc 
-XX:+PrintGCDetails -XX:+PrintReferenceGC Test 2>&1 | grep "JNI Weak" | awk '{ print $25; }'

It is a very slow leak, but plotting the data from the command above shows it happens without the 
patch, and stops happening with the patch. And in JDK 10, this is resolved by JDK-8174749 that 
caches the MemberName in ResolvedMemberName properly.

Okay then!

Minor nit: typo, "destory":
   // destory the old handle


More information about the jdk8u-dev mailing list