The names of all shared classes must also be a shared Symbol. If name->is_shared() == false, the following lookup will always fail:
http://hg.openjdk.java.net/jdk/jdk/file/5b5de2618756/src/hotspot/share/classfile/systemDictionaryShared.cpp#l1415
const RunTimeSharedClassInfo*
SystemDictionaryShared::find_record(RunTimeSharedDictionary* dict, Symbol* name) {
if (UseSharedSpaces) {
unsigned int hash = primitive_hash<Symbol*>(name);
return dict->lookup(name, hash, 0);
} else {
return NULL;
}
}
To improve loading time of non-shared classes, we should avoid doing the hashtable lookup, if name->is_shared() == false.
http://hg.openjdk.java.net/jdk/jdk/file/5b5de2618756/src/hotspot/share/classfile/systemDictionaryShared.cpp#l1415
const RunTimeSharedClassInfo*
SystemDictionaryShared::find_record(RunTimeSharedDictionary* dict, Symbol* name) {
if (UseSharedSpaces) {
unsigned int hash = primitive_hash<Symbol*>(name);
return dict->lookup(name, hash, 0);
} else {
return NULL;
}
}
To improve loading time of non-shared classes, we should avoid doing the hashtable lookup, if name->is_shared() == false.