RFR: 8266642: improve ResolvedMethodTable hash function [v5]

Denghui Dong ddong at openjdk.java.net
Wed May 12 17:34:26 UTC 2021


On Wed, 12 May 2021 16:19:09 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

>> Denghui Dong has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   update the implementation
>
> src/hotspot/share/prims/resolvedMethodTable.cpp line 59:
> 
>> 57:   hash = (hash * 31) ^ method->name()->identity_hash();
>> 58:   hash = (hash * 31) ^ method->signature()->identity_hash();
>> 59:   return hash ^ (unsigned)((uintptr_t)method >> (LogMinObjAlignmentInBytes + 3));
> 
> I agree with Vladimir that it makes sense to improve the hashing function of the ResolvedMethodTable for the special case of names matching.  You have to use the ClassLoaderData though, not the Method* because the reason for the table is to replace Method* in the case of redefinition.

fixed, thanks.

-------------

PR: https://git.openjdk.java.net/jdk/pull/3901


More information about the hotspot-runtime-dev mailing list