RFR(XS) 8249096: Clean up code for DumpLoadedClassList

Yumin Qi yumin.qi at oracle.com
Thu Aug 20 17:46:51 UTC 2020


Hi, Please review the very small change for cleaning up DumpLoadedClassList code.


bug: https://bugs.openjdk.java.net/browse/JDK-8249096

Webrev: http://cr.openjdk.java.net/~minqi/2020/8249096/webrev-01/


There are two places where when DumpLoadedClassList is set we log loaded class to log file, one is in ClassFileParser::parse_stream, and the other is in SystemDictionaryShared::load_shared_class_misc which is after shared class loaded from CDS. The former is positioned after parsing constants, and before parsing interface, fields and methods etc. There is possibility an exception or error happens before the InstanceKlass is created, so the fix move the logging to after the InstanceKlass is successfully created, also move the logging code to InstanceKlass which seems more reasonable.


Test: local jtreg on cds.

Mach5 tier1-4


Thanks

Yumin



More information about the hotspot-runtime-dev mailing list