< prev index next >
src/share/vm/memory/metaspaceShared.cpp
Print this page
rev 6864 : 8061651: Interface to the Lookup Index Cache to improve URLClassPath search time
Summary: Implemented the interface in sun.misc.URLClassPath and corresponding JVM_XXX APIs
Reviewed-by: mchung, acorn, jiangli, dholmes
*** 22,31 ****
--- 22,32 ----
*
*/
#include "precompiled.hpp"
#include "classfile/dictionary.hpp"
+ #include "classfile/classLoaderExt.hpp"
#include "classfile/loaderConstraints.hpp"
#include "classfile/placeholders.hpp"
#include "classfile/sharedClassUtil.hpp"
#include "classfile/symbolTable.hpp"
#include "classfile/systemDictionary.hpp"
*** 37,46 ****
--- 38,48 ----
#include "oops/objArrayOop.hpp"
#include "oops/oop.inline.hpp"
#include "runtime/signature.hpp"
#include "runtime/vm_operations.hpp"
#include "runtime/vmThread.hpp"
+ #include "utilities/hashtable.hpp"
#include "utilities/hashtable.inline.hpp"
PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
int MetaspaceShared::_max_alignment = 0;
*** 531,540 ****
--- 533,544 ----
SystemDictionary::copy_table(&md_top, md_end);
ClassLoader::verify();
ClassLoader::copy_package_info_table(&md_top, md_end);
ClassLoader::verify();
+ ClassLoaderExt::copy_lookup_cache_to_archive(&md_top, md_end);
+
// Write the other data to the output array.
WriteClosure wc(md_top, md_end);
MetaspaceShared::serialize(&wc);
md_top = wc.get_top();
*** 743,752 ****
--- 747,758 ----
class_count += preload_and_dump(ExtraSharedClassListFile, class_promote_order,
THREAD);
}
tty->print_cr("Loading classes to share: done.");
+ ClassLoaderExt::init_lookup_cache(THREAD);
+
if (PrintSharedSpaces) {
tty->print_cr("Shared spaces: preloaded %d classes", class_count);
}
// Rewrite and link classes
*** 1054,1063 ****
--- 1060,1071 ----
len = *(intptr_t*)buffer; // skip over package info table char[] arrays.
buffer += sizeof(intptr_t);
buffer += len;
+ buffer = ClassLoaderExt::restore_lookup_cache_from_archive(buffer);
+
intptr_t* array = (intptr_t*)buffer;
ReadClosure rc(&array);
serialize(&rc);
// Close the mapinfo file
< prev index next >