RFR(S): 8240204: Optimize package handling for archived classes

Yumin Qi yumin.qi at oracle.com
Fri Apr 17 17:40:28 UTC 2020


Hi, Claes

   Thanks for the review.

On 4/17/20 5:04 AM, Claes Redestad wrote:
> Hi Yumin,
>
> looks good to me!
>
> Pre-existing, but in klassFactory.cpp path_index isn't used anywhere
> else, so could fold it into the call:
>
>   new_ik->set_classpath_index(ik->shared_classpath_index())
>
   Yes, for shared class, it is _shared_classpath_index which set at the 
dump time. From line 229:
   src/hotspot/share/classfile/klassFactory.cpp:226

   int path_index = ik->shared_classpath_index();

   So you are right, but I would like to keep using path_index here 
since we already have it on stack.

Thanks
Yumin
> Thanks!
>
> /Claes
>
> On 2020-04-17 07:56, Yumin Qi wrote:
>> Hi,
>>
>>    Please review:
>>    bug: 8240204: https://bugs.openjdk.java.net/browse/JDK-8240204
>>    webrev: http://cr.openjdk.java.net/~minqi/8240204/webrev-01/
>>
>>    Summary: Move ClassLoader::add_package to InstanceKlass since what 
>> it does is calling pkg->set_classpath_index. Also a minor 
>> optimization for InstanceKlass::set_package, for shared class, avoid 
>> call check_prohibited_package since CDS does not archive prohibited 
>> classes.
>>
>>    Tests: hs-tier1-4
>>    Performance data: javac and zprint showed a little improvement.
>>
>>    Thanks
>>    Yumin



More information about the hotspot-runtime-dev mailing list