8236604: Optimize SystemDictionary::resolve_well_known_classes for CDS

Serialize SystemDictionary::_well_known_classes into CDS and quickly resolve them at runtime in vm startup stage.

Reviewed-by: iklam, coleenp
This commit is contained in:
Yumin Qi 2020-02-28 15:30:29 -08:00
parent b247e6d908
commit add146cc8b
7 changed files with 87 additions and 23 deletions

View file

@ -1410,6 +1410,12 @@ void SystemDictionaryShared::serialize_dictionary_headers(SerializeClosure* soc,
}
}
void SystemDictionaryShared::serialize_well_known_klasses(SerializeClosure* soc) {
for (int i = FIRST_WKID; i < WKID_LIMIT; i++) {
soc->do_ptr((void**)&_well_known_klasses[i]);
}
}
const RunTimeSharedClassInfo*
SystemDictionaryShared::find_record(RunTimeSharedDictionary* static_dict, RunTimeSharedDictionary* dynamic_dict, Symbol* name) {
if (!UseSharedSpaces || !name->is_shared()) {