src/share/vm/prims/jvm.cpp

Print this page
rev 6853 : 8046070: Class Data Sharing clean up and refactoring
Summary: Cleaned up CDS to be more configurable, maintainable and extensible
Reviewed-by: dholmes, coleenp, acorn, mchung

*** 26,35 **** --- 26,39 ---- #include "classfile/classLoader.hpp" #include "classfile/javaAssertions.hpp" #include "classfile/javaClasses.hpp" #include "classfile/stringTable.hpp" #include "classfile/systemDictionary.hpp" + #if INCLUDE_CDS + #include "classfile/sharedClassUtil.hpp" + #include "classfile/systemDictionaryShared.hpp" + #endif #include "classfile/vmSymbols.hpp" #include "gc_interface/collectedHeap.inline.hpp" #include "interpreter/bytecode.hpp" #include "memory/oopFactory.hpp" #include "memory/universe.inline.hpp"
*** 991,1001 **** Klass* k = SystemDictionary::find_instance_or_array_klass(klass_name, h_loader, Handle(), CHECK_NULL); ! return (k == NULL) ? NULL : (jclass) JNIHandles::make_local(env, k->java_mirror()); JVM_END --- 995,1013 ---- Klass* k = SystemDictionary::find_instance_or_array_klass(klass_name, h_loader, Handle(), CHECK_NULL); ! #if INCLUDE_CDS ! if (k == NULL) { ! // If the class is not already loaded, try to see if it's in the shared ! // archive for the current classloader (h_loader). ! instanceKlassHandle ik = SystemDictionaryShared::find_or_load_shared_class( ! klass_name, h_loader, CHECK_NULL); ! k = ik(); ! } ! #endif return (k == NULL) ? NULL : (jclass) JNIHandles::make_local(env, k->java_mirror()); JVM_END