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

Calvin Cheung calvin.cheung at oracle.com
Tue May 3 23:32:00 UTC 2016


Hi Jiangli,

Just a minor comment in classLoaderExt.hpp:

58           jshort classloader_type = ClassLoader::classloader_type(

How about u2 instead of jshort?

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