RFR 8152271: MemberNameTable doesn't purge stale entries
Coleen Phillimore
coleen.phillimore at oracle.com
Fri Jun 10 18:33:44 UTC 2016
On 6/10/16 11:33 AM, Vladimir Ivanov wrote:
> Coleen,
>
> src/share/vm/prims/methodHandles.cpp:
>
> @@ -975,7 +969,7 @@
>
> - oop saved = MethodHandles::init_method_MemberName(result, info);
> + oop saved = MethodHandles::init_method_MemberName(result,
> info, /*intern*/false);
>
> Why do you disable interning in that case?
I added a comment. This case was looping through methods and creating
member names so shouldn't linear search the table.
// Since this is going through the methods to create
MemberNames, don't search
// for matching methods already in the table (there won't be any)
oop saved = MethodHandles::init_method_MemberName(result, info,
/*intern*/false);
>
> Otherwise, looks good.
Thanks!
Coleen
>
> Best regards,
> Vladimir Ivanov
>
> On 6/10/16 5:55 PM, Coleen Phillimore wrote:
>> Summary: Intern MemberNames in table instead of allocating new entries
>>
>> For degenerate case, we were leaking native code in the member name
>> table. Going with the suggested workaround, it was only a few more
>> lines of code to intern MemberName and return the MemberName that was
>> already in the table.
>>
>> This has been performance tested to show no regression and works really
>> well for the degenerate test case, even though the real percentage of
>> reused MemberName seems quite small.
>>
>> Tested with all runtime nightly tests, tests in
>> jdk/test/java/lang/invoke.
>>
>> open webrev at http://cr.openjdk.java.net/~coleenp/8152271.01/webrev
>> bug link https://bugs.openjdk.java.net/browse/JDK-8152271
>>
>> Thanks,
>> Coleen
More information about the hotspot-dev
mailing list