RFR: 8266642: improve ResolvedMethodTable hash function [v8]

Stefan Karlsson stefank at openjdk.java.net
Tue May 18 08:39:41 UTC 2021


On Tue, 18 May 2021 02:21:29 GMT, Denghui Dong <ddong at openjdk.org> wrote:

>> 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.
>
> Hi,
> I think it makes sense.
> How about filing a new JBS issue to fix the problem you mentioned or you think we should fix it in this patch?

I created a CR for this:
https://bugs.openjdk.java.net/browse/JDK-8267303

but I still think that this usage should not be introduced in this patch.

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

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


More information about the hotspot-runtime-dev mailing list