RFR(S) 8240244 Avoid calling resolve_super_or_fail in SystemDictionary::load_shared_class

Ioi Lam ioi.lam at oracle.com
Tue Mar 3 18:01:47 UTC 2020



On 3/3/20 9:42 AM, Yumin Qi wrote:
>
> Hi, Ioi
>
>    Looks good to me.
>
>    One comment:
>
> 1276 if (SystemDictionary::find_class(d_hash, name, dictionary) != 
> NULL) { Should be replaced with == super_type?

Hi Yumin,

Thanks for the review. You're right. I changed it to "== super_type". 
Re-running the tests.

- Ioi
> Thanks Yumin
>
> On 3/2/20 10:34 PM, Ioi Lam wrote:
>> https://bugs.openjdk.java.net/browse/JDK-8240244
>> http://cr.openjdk.java.net/~iklam/jdk15/8240244-reduce-resolve-super.v01/ 
>>
>>
>> When loading shared classes from the CDS archive, we need to test if the
>> actually loaded super types are the same as those used during CDS 
>> dumping.
>> That was done with a pretty expensive call to resolve_super_or_fail.
>>
>> In most cases, the super type has already been loaded (about 350 out 
>> of 400
>> cases when running HelloWorld), so we can quickly determine that by
>> doing a look up in the super type's dictionary.
>>
>> This saves about 250,000 out of about 112M instructions (about 0.22%) 
>> when
>> running HelloWorld with the default archive on Linux/x64.
>>
>> I also renamed a few functions in instanceKlass.hpp to 
>> _xxx_shared_xxx since
>> they are used only for CDS.
>>
>> Thanks
>> - Ioi
>>
>>



More information about the hotspot-runtime-dev mailing list