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

@ -1153,7 +1153,9 @@ int InstanceKlass::nof_implementors() const {
//
// The _implementor field only exists for interfaces.
void InstanceKlass::add_implementor(Klass* k) {
assert_lock_strong(Compile_lock);
if (Universe::is_fully_initialized()) {
assert_lock_strong(Compile_lock);
}
assert(is_interface(), "not interface");
// Filter out my subinterfaces.
// (Note: Interfaces are never on the subklass list.)