RFR (M) JDK-8202605: Standardize on ClassLoaderData::loader_name() throughout the VM to obtain a class loader's name

Lois Foltan lois.foltan at oracle.com
Wed Jun 13 22:58:42 UTC 2018


Please review this change to standardize on how to obtain a class 
loader's name within the VM.  SystemDictionary::loader_name() methods 
have been removed in favor of ClassLoaderData::loader_name().

Since the loader name is largely used in the VM for display purposes 
(error messages, logging, jcmd, JFR) this change also adopts a new 
format to append to a class loader's name its identityHashCode and if 
the loader has not been explicitly named it's qualified class name is 
used instead.

391 /**
392 * If the defining loader has a name explicitly set then
393 * '<loader-name>' @<id>
394 * If the defining loader has no name then
395 * <qualified-class-name> @<id>
396 * If it's built-in loader then omit `@<id>` as there is only one 
instance.
397 */

The names for the builtin loaders are 'bootstrap', 'app' and 'platform'.

open webrev at http://cr.openjdk.java.net/~lfoltan/bug_jdk8202605/webrev/
bug link at https://bugs.openjdk.java.net/browse/JDK-8202605

Testing: hs-tier(1-2), jdk-tier(1-2) complete
                hs-tier(3-5), jdk-tier(3) in progress

Thanks,
Lois



More information about the hotspot-dev mailing list