Request Review: JDK-6479237 (cl) Add support for classloader names

Mandy Chung mandy.chung at oracle.com
Fri Oct 28 21:36:03 UTC 2016


> On Oct 28, 2016, at 12:06 AM, serguei.spitsyn at oracle.com wrote:
> 
>   Can we give the bootstrap classloader the name "boot" or "bootstrap”?

BootClassLoader is not the boostrap class loader but instead it's implementation details.  The bootstrap ClassLoader instance is null and so you can’t invoke ClassLoader::getName.

>   
> Also, the lines 415 and 422 can be simplified: 415 s += m.getName(); 422 s += version;

OK.  At one point, that was how it was coded.  

> Also, if the loader has a name but (m == null || !m.isNamed())  then it looks like the sign "/" will be added twice (see L410 and L428). It can be fixed and simplified with: Add line before 425: s += "/"; 428 return s + cls.getName();

“<loader>//<classname>” is correct.

> 
>  Also, it is not clear why the loader name is not included for an instance of theBuiltinClassLoader?

Make the output compact when it can, for example, the class loader name “app” and “platform” from classes from the JDK can be implied.

>  Would it make sense to add a comment explaining it?

Maybe not much to add that.

Mandy


More information about the hotspot-runtime-dev mailing list