RFR: 8155678: ClassLoader::initialize_module_loader_map should only be called when dumping CDS archive

Jiangli Zhou jiangli.zhou at oracle.com
Tue May 3 23:42:53 UTC 2016


Hi Calvin,

> On May 3, 2016, at 4:32 PM, Calvin Cheung <calvin.cheung at oracle.com> wrote:
> 
> Hi Jiangli,
> 
> Just a minor comment in classLoaderExt.hpp:
> 
> 58           jshort classloader_type = ClassLoader::classloader_type(
> 
> How about u2 instead of jshort?

I agree. u2 is a better choice here. Will change it.

Thanks,
Jiangli

> 
> It is because in set_class_loader_type(), we are setting the _misc_flags which is of type u2.
> 
> If you make the above change, you'll need to change set_class_loader_type() as well.
> 
> thanks,
> Calvin
> 
> On 5/3/16, 3:59 PM, Jiangli Zhou wrote:
>> Please review the following changes that make ClassLoader::initialize_module_loader_map() CDS dump time only. The module to loader map is not used by CDS runtime, so this avoids the unnecessary overhead for runtime. As part of the changes, I moved the ClassLoader::class loader_type() call from ClassLoader::load_class() into ClassLoaderExt::Context::record_result(), since ‘class loader_type’ is only needed by record_result(). That allows ClassLoader::class loader_type() become a CDS only API.
>> 
>> webrev: http://cr.openjdk.java.net/~jiangli/8155678/webrev.00/
>> bug: JDK-8155678<https://bugs.openjdk.java.net/browse/JDK-8155678>
>> 
>> Thanks,
>> Jiangli



More information about the hotspot-runtime-dev mailing list