8218751: Do not store original classfiles inside the CDS archive

Remove the OD shared region and decode classfiles on the fly

Reviewed-by: jiangli, ccheung, sspitsyn, redestad
This commit is contained in:
Ioi Lam 2019-02-21 17:07:35 -08:00
parent b7ed42eedd
commit d06f3e7e28
16 changed files with 128 additions and 131 deletions

View file

@ -803,7 +803,7 @@ InstanceKlass* SystemDictionaryShared::load_shared_class_for_builtin_loader(
SystemDictionary::is_platform_class_loader(class_loader()))) {
Handle protection_domain =
SystemDictionaryShared::init_security_info(class_loader, ik, CHECK_NULL);
return load_shared_class(ik, class_loader, protection_domain, THREAD);
return load_shared_class(ik, class_loader, protection_domain, NULL, THREAD);
}
}
return NULL;
@ -873,13 +873,15 @@ InstanceKlass* SystemDictionaryShared::lookup_from_stream(Symbol* class_name,
}
return acquire_class_for_current_thread(record->_klass, class_loader,
protection_domain, THREAD);
protection_domain, cfs,
THREAD);
}
InstanceKlass* SystemDictionaryShared::acquire_class_for_current_thread(
InstanceKlass *ik,
Handle class_loader,
Handle protection_domain,
const ClassFileStream *cfs,
TRAPS) {
ClassLoaderData* loader_data = ClassLoaderData::class_loader_data(class_loader());
@ -900,7 +902,8 @@ InstanceKlass* SystemDictionaryShared::acquire_class_for_current_thread(
loader_data->add_class(ik);
// Load and check super/interfaces, restore unsharable info
InstanceKlass* shared_klass = load_shared_class(ik, class_loader, protection_domain, THREAD);
InstanceKlass* shared_klass = load_shared_class(ik, class_loader, protection_domain,
cfs, THREAD);
if (shared_klass == NULL || HAS_PENDING_EXCEPTION) {
// TODO: clean up <ik> so it can be used again
return NULL;