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

Denghui Dong denghui.ddh at alibaba-inc.com
Mon Apr 26 11:05:18 UTC 2021


Thanks for the review!
I have tagged for approval.

Denghui
------------------------------------------------------------------
From:Aleksey Shipilev <shade at redhat.com>
Send Time:2021年4月26日(星期一) 17:37
To:董登辉(卓昂) <denghui.ddh at alibaba-inc.com>; jdk8u-dev <jdk8u-dev at openjdk.java.net>
Subject:Re: PING [8u] RFR 8264816: Weak handles leak causes GC to take longer

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: https://bugs.openjdk.java.net/browse/JDK-8264816
> webrev: http://cr.openjdk.java.net/~ddong/8264816/webrev.00

OK, I can reproduce it with the test from:
  https://mail.openjdk.java.net/pipermail/jdk8u-dev/2021-April/013618.html

...with:

  $ 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

-- 
Thanks,
-Aleksey


More information about the jdk8u-dev mailing list