src/hotspot/share/classfile/systemDictionary.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File open Cdiff src/hotspot/share/classfile/systemDictionary.cpp

src/hotspot/share/classfile/systemDictionary.cpp

Print this page

        

*** 1054,1072 **** InstanceKlass* SystemDictionary::resolve_from_stream(Symbol* class_name, Handle class_loader, Handle protection_domain, ClassFileStream* st, TRAPS) { - #if INCLUDE_CDS - ResourceMark rm(THREAD); - if (DumpSharedSpaces && !class_loader.is_null() && - !UseAppCDS && strcmp(class_name->as_C_string(), "Unnamed") != 0) { - // If AppCDS is not enabled, don't define the class at dump time (except for the "Unnamed" - // class, which is used by MethodHandles). - THROW_MSG_NULL(vmSymbols::java_lang_ClassNotFoundException(), class_name->as_C_string()); - } - #endif HandleMark hm(THREAD); // Classloaders that support parallelism, e.g. bootstrap classloader, // do not acquire lock here --- 1054,1063 ----
*** 3077,3093 **** } } } }; ! // Combining platform and system loader dictionaries into boot loader dictionaries. // During run time, we only have one shared dictionary. void SystemDictionary::combine_shared_dictionaries() { assert(DumpSharedSpaces, "dump time only"); Dictionary* master_dictionary = ClassLoaderData::the_null_class_loader_data()->dictionary(); CombineDictionariesClosure cdc(master_dictionary); ClassLoaderDataGraph::cld_do(&cdc); // These tables are no longer valid or necessary. Keeping them around will // cause SystemDictionary::verify() to fail. Let's empty them. _placeholders = new PlaceholderTable(_placeholder_table_size); _loader_constraints = new LoaderConstraintTable(_loader_constraint_size); --- 3068,3088 ---- } } } }; ! // Combining platform and system loader dictionaries into boot loader dictionary. // During run time, we only have one shared dictionary. void SystemDictionary::combine_shared_dictionaries() { assert(DumpSharedSpaces, "dump time only"); + // If AppCDS isn't enabled, we only dump the classes in the boot loader dictionary + // into the shared archive. + if (UseAppCDS) { Dictionary* master_dictionary = ClassLoaderData::the_null_class_loader_data()->dictionary(); CombineDictionariesClosure cdc(master_dictionary); ClassLoaderDataGraph::cld_do(&cdc); + } // These tables are no longer valid or necessary. Keeping them around will // cause SystemDictionary::verify() to fail. Let's empty them. _placeholders = new PlaceholderTable(_placeholder_table_size); _loader_constraints = new LoaderConstraintTable(_loader_constraint_size);
src/hotspot/share/classfile/systemDictionary.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File