--- old/src/hotspot/share/classfile/classLoader.cpp 2019-10-01 15:26:37.800989669 -0700 +++ new/src/hotspot/share/classfile/classLoader.cpp 2019-10-01 15:26:37.274970069 -0700 @@ -462,7 +462,7 @@ #if INCLUDE_CDS void ClassLoader::exit_with_path_failure(const char* error, const char* message) { - assert(DumpSharedSpaces || DynamicDumpSharedSpaces, "only called at dump time"); + assert(Arguments::is_dumping_archive(), "only called at dump time"); tty->print_cr("Hint: enable -Xlog:class+path=info to diagnose the failure"); vm_exit_during_initialization(error, message); } @@ -532,7 +532,7 @@ #if INCLUDE_CDS void ClassLoader::setup_app_search_path(const char *class_path) { - assert(DumpSharedSpaces || DynamicDumpSharedSpaces, "Sanity"); + assert(Arguments::is_dumping_archive(), "Sanity"); ResourceMark rm; ClasspathStream cp_stream(class_path); @@ -546,7 +546,7 @@ void ClassLoader::add_to_module_path_entries(const char* path, ClassPathEntry* entry) { assert(entry != NULL, "ClassPathEntry should not be NULL"); - assert(DumpSharedSpaces || DynamicDumpSharedSpaces, "dump time only"); + assert(Arguments::is_dumping_archive(), "dump time only"); // The entry does not exist, add to the list if (_module_path_entries == NULL) { @@ -560,7 +560,7 @@ // Add a module path to the _module_path_entries list. void ClassLoader::update_module_path_entry_list(const char *path, TRAPS) { - assert(DumpSharedSpaces || DynamicDumpSharedSpaces, "dump time only"); + assert(Arguments::is_dumping_archive(), "dump time only"); struct stat st; if (os::stat(path, &st) != 0) { tty->print_cr("os::stat error %d (%s). CDS dump aborted (path was \"%s\").", @@ -656,7 +656,7 @@ bool set_base_piece = true; #if INCLUDE_CDS - if (DumpSharedSpaces || DynamicDumpSharedSpaces) { + if (Arguments::is_dumping_archive()) { if (!Arguments::has_jimage()) { vm_exit_during_initialization("CDS is not supported in exploded JDK build", NULL); } @@ -1360,7 +1360,7 @@ // Record the shared classpath index and loader type for classes loaded // by the builtin loaders at dump time. void ClassLoader::record_result(InstanceKlass* ik, const ClassFileStream* stream, TRAPS) { - assert(DumpSharedSpaces || DynamicDumpSharedSpaces, "sanity"); + assert(Arguments::is_dumping_archive(), "sanity"); assert(stream != NULL, "sanity"); if (ik->is_unsafe_anonymous()) { @@ -1537,13 +1537,13 @@ #if INCLUDE_CDS void ClassLoader::initialize_shared_path() { - if (DumpSharedSpaces || DynamicDumpSharedSpaces) { + if (Arguments::is_dumping_archive()) { ClassLoaderExt::setup_search_paths(); } } void ClassLoader::initialize_module_path(TRAPS) { - if (DumpSharedSpaces || DynamicDumpSharedSpaces) { + if (Arguments::is_dumping_archive()) { ClassLoaderExt::setup_module_paths(THREAD); FileMapInfo::allocate_shared_path_table(); }