RFR: 8266642: improve ResolvedMethodTable hash function [v7]
Vladimir Ivanov
vlivanov at openjdk.java.net
Fri May 14 12:34:36 UTC 2021
On Fri, 14 May 2021 12:04:55 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:
>
> refactor
Looks good to me, but, please, wait for somebody from Runtime team to approve it.
src/hotspot/share/prims/resolvedMethodTable.cpp line 56:
> 54:
> 55: unsigned int method_hash(const Method* method) {
> 56: unsigned int hash = method->method_holder()->class_loader_data()->identity_hash();
I don't see "#include classfile/classLoaderData.hpp" in your patch. Did you verify it builds successfully? I saw a compilation failure without the include:
src/hotspot/share/prims/resolvedMethodTable.cpp:56:67: error: member access into incomplete type 'ClassLoaderData'
unsigned int hash = method->method_holder()->class_loader_data()->identity_hash();
^
src/hotspot/share/memory/allocation.hpp:260:7: note: forward declaration of 'ClassLoaderData'
class ClassLoaderData;
^
1 error generated.
-------------
Marked as reviewed by vlivanov (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/3901
More information about the hotspot-dev
mailing list