RFR: 8266642: improve ResolvedMethodTable hash function [v8]

Stefan Karlsson stefank at openjdk.java.net
Mon May 17 11:25:39 UTC 2021


On Fri, 14 May 2021 16:00:09 GMT, Denghui Dong <ddong at openjdk.org> wrote:

>> JDK-8249719 has fixed the bad hash function problem, however, the performance problem still exists when there are a large number of classes with the same name.
>> Adding the address of the corresponding ClassLoaderData as a factor of hash can solve the problem.
>
> Denghui Dong has updated the pull request incrementally with one additional commit since the last revision:
> 
>   add missing include

Changes requested by stefank (Reviewer).

src/hotspot/share/classfile/classLoaderData.hpp line 331:

> 329: 
> 330:   unsigned identity_hash() const {
> 331:     return (unsigned)((uintptr_t)this >> (LogMinObjAlignmentInBytes + 3));

LogMinObjAlignmentInBytes describes the alignment requirements for Java objects. I know that some other places in the VM reuse this for generating hash codes, but I don't think that's appropriate, and they should be cleaned out.

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

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


More information about the hotspot-runtime-dev mailing list