1.1 --- a/src/share/vm/memory/metaspaceShared.cpp Tue Oct 28 09:17:36 2014 +0100 1.2 +++ b/src/share/vm/memory/metaspaceShared.cpp Mon Oct 13 16:09:57 2014 -0700 1.3 @@ -24,6 +24,7 @@ 1.4 1.5 #include "precompiled.hpp" 1.6 #include "classfile/dictionary.hpp" 1.7 +#include "classfile/classLoaderExt.hpp" 1.8 #include "classfile/loaderConstraints.hpp" 1.9 #include "classfile/placeholders.hpp" 1.10 #include "classfile/sharedClassUtil.hpp" 1.11 @@ -39,6 +40,7 @@ 1.12 #include "runtime/signature.hpp" 1.13 #include "runtime/vm_operations.hpp" 1.14 #include "runtime/vmThread.hpp" 1.15 +#include "utilities/hashtable.hpp" 1.16 #include "utilities/hashtable.inline.hpp" 1.17 1.18 PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 1.19 @@ -533,6 +535,8 @@ 1.20 ClassLoader::copy_package_info_table(&md_top, md_end); 1.21 ClassLoader::verify(); 1.22 1.23 + ClassLoaderExt::copy_lookup_cache_to_archive(&md_top, md_end); 1.24 + 1.25 // Write the other data to the output array. 1.26 WriteClosure wc(md_top, md_end); 1.27 MetaspaceShared::serialize(&wc); 1.28 @@ -745,6 +749,8 @@ 1.29 } 1.30 tty->print_cr("Loading classes to share: done."); 1.31 1.32 + ClassLoaderExt::init_lookup_cache(THREAD); 1.33 + 1.34 if (PrintSharedSpaces) { 1.35 tty->print_cr("Shared spaces: preloaded %d classes", class_count); 1.36 } 1.37 @@ -1056,6 +1062,8 @@ 1.38 buffer += sizeof(intptr_t); 1.39 buffer += len; 1.40 1.41 + buffer = ClassLoaderExt::restore_lookup_cache_from_archive(buffer); 1.42 + 1.43 intptr_t* array = (intptr_t*)buffer; 1.44 ReadClosure rc(&array); 1.45 serialize(&rc);