--- old/src/hotspot/share/classfile/classLoader.cpp 2020-06-08 16:46:08.277864729 -0700 +++ new/src/hotspot/share/classfile/classLoader.cpp 2020-06-08 16:46:07.977853436 -0700 @@ -1528,6 +1528,19 @@ FileMapInfo::allocate_shared_path_table(); } } + +// Helper function used by CDS code to get the number of module path +// entries during shared classpath setup time. +int ClassLoader::num_module_path_entries() { + Arguments::assert_is_dumping_archive(); + int num_entries = 0; + ClassPathEntry* e= ClassLoader::_module_path_entries; + while (e != NULL) { + num_entries ++; + e = e->next(); + } + return num_entries; +} #endif jlong ClassLoader::classloader_time_ms() {