8193213: Make the UseAppCDS option obsolete

8182731: Odd handling of -XX:-UseAppCDS and -XX:SharedArchiveFile

Application class data sharing is enabled without -XX:+UseAppCDS. SharedArchiveFile is now a product flag.

Reviewed-by: dholmes, ihse, erikj, ccheung
This commit is contained in:
Jiangli Zhou 2018-04-30 16:59:05 -04:00
parent cdd3f0ac39
commit 20edc74068
33 changed files with 189 additions and 238 deletions

View file

@ -3059,13 +3059,9 @@ class CombineDictionariesClosure : public CLDClosure {
// 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);
}
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.