RFR: 8266642: improve ResolvedMethodTable hash function [v2]

Denghui Dong ddong at openjdk.java.net
Tue May 11 03:19:24 UTC 2021


On Tue, 11 May 2021 03:10:20 GMT, Denghui Dong <ddong at openjdk.org> wrote:

>> Unsafe.getUnsafe().defineAnonymousClass will create an unsafe anonymous class rather than a hidden class, and for unsafe anonymous class, JVM will create a new CLD, see the comment in SystemDictionary::resolve_hidden_class_from_stream:
>> 
>>   // - for unsafe anonymous class: create a new CLD whith a class holder that uses
>>   //                               the same class loader as the unsafe_anonymous_host.
>>   // - for hidden classes that are not strong: create a new CLD that has a class holder and
>>   //                                           whose loader is the Lookup class's loader.
>>   // - for hidden class: add the class to the Lookup class's loader's CLD.
>
>> Okay but we should only be concerned about the behaviour of public 
>> API's, so we should be testing and benchmarking those API's.
> 
>> defineAnonymousClass() maybe relevant for 11u, but not mainline.
> 
> I can use public API.
> Another reason I used Unsafe API here is for saving metaspace.

updated.

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

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


More information about the hotspot-runtime-dev mailing list