Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8203584 | 11.0.1 | Ioi Lam | P3 | Resolved | Fixed | team |
The SystemDictionary::compute_java_loaders() seems to do what the function name indicates by obtaining system loader and the PlatformClassLoader. However, it also does something extra by calling SystemDictionaryShared::initialize(), which seems to indicate it is initializing the shared system dictionary from the mapped archive. Based on the naming, the call sequence seems to be wrong as initializing the mapping shared system dictionary should happen earlier in the VM start up. However, the closed implementation of SystemDictionaryShared::initialize() only initializes of a few classes that's used by AppCDS. The function should be renamed to be more meaningful.
See http://hg.openjdk.java.net/jdk/jdk/file/9fec54fe663d/src/hotspot/share/classfile/systemDictionaryShared.cpp#l65
http://hg.openjdk.java.net/jdk/jdk/file/9fec54fe663d/src/hotspot/share/classfile/systemDictionary.cpp#l153
131 void SystemDictionary::compute_java_loaders(TRAPS) {
132 JavaValue result(T_OBJECT);
133 InstanceKlass* class_loader_klass = SystemDictionary::ClassLoader_klass();
134 JavaCalls::call_static(&result,
135 class_loader_klass,
136 vmSymbols::getSystemClassLoader_name(),
137 vmSymbols::void_classloader_signature(),
138 CHECK);
139
140 _java_system_loader = (oop)result.get_jobject();
141
142 JavaCalls::call_static(&result,
143 class_loader_klass,
144 vmSymbols::getPlatformClassLoader_name(),
145 vmSymbols::void_classloader_signature(),
146 CHECK);
147
148 _java_platform_loader = (oop)result.get_jobject();
149
150 CDS_ONLY(SystemDictionaryShared::initialize(CHECK);)
151 }
See http://hg.openjdk.java.net/jdk/jdk/file/9fec54fe663d/src/hotspot/share/classfile/systemDictionaryShared.cpp#l65
http://hg.openjdk.java.net/jdk/jdk/file/9fec54fe663d/src/hotspot/share/classfile/systemDictionary.cpp#l153
131 void SystemDictionary::compute_java_loaders(TRAPS) {
132 JavaValue result(T_OBJECT);
133 InstanceKlass* class_loader_klass = SystemDictionary::ClassLoader_klass();
134 JavaCalls::call_static(&result,
135 class_loader_klass,
136 vmSymbols::getSystemClassLoader_name(),
137 vmSymbols::void_classloader_signature(),
138 CHECK);
139
140 _java_system_loader = (oop)result.get_jobject();
141
142 JavaCalls::call_static(&result,
143 class_loader_klass,
144 vmSymbols::getPlatformClassLoader_name(),
145 vmSymbols::void_classloader_signature(),
146 CHECK);
147
148 _java_platform_loader = (oop)result.get_jobject();
149
150 CDS_ONLY(SystemDictionaryShared::initialize(CHECK);)
151 }
- backported by
-
JDK-8203584 SystemDictionaryShared::initialize() should be renamed to be more meaningful
-
- Resolved
-
- relates to
-
JDK-8203381 Replace InstanceKlass::allocate_instance_handle with JavaCalls::construct_new_instance
-
- Resolved
-
-
JDK-8185694 Replace SystemDictionaryShared::_java_platform_loader with SystemDictionary::is_platform_class_loader()
-
- Resolved
-