Mercurial > hg > truffle
comparison src/share/vm/prims/jvm.cpp @ 20608:4cb90023bf2b
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
author | iklam |
---|---|
date | Mon, 13 Oct 2014 16:09:57 -0700 |
parents | 8cb56c8cb30d |
children | fe34c5ab0b35 |
comparison
equal
deleted
inserted
replaced
20607:f5f752e74840 | 20608:4cb90023bf2b |
---|---|
22 * | 22 * |
23 */ | 23 */ |
24 | 24 |
25 #include "precompiled.hpp" | 25 #include "precompiled.hpp" |
26 #include "classfile/classLoader.hpp" | 26 #include "classfile/classLoader.hpp" |
27 #include "classfile/classLoaderExt.hpp" | |
27 #include "classfile/javaAssertions.hpp" | 28 #include "classfile/javaAssertions.hpp" |
28 #include "classfile/javaClasses.hpp" | 29 #include "classfile/javaClasses.hpp" |
29 #include "classfile/symbolTable.hpp" | 30 #include "classfile/symbolTable.hpp" |
30 #include "classfile/systemDictionary.hpp" | 31 #include "classfile/systemDictionary.hpp" |
31 #if INCLUDE_CDS | 32 #if INCLUDE_CDS |
391 (Arguments::mode() != Arguments::_int)) { | 392 (Arguments::mode() != Arguments::_int)) { |
392 PUTPROP(props, "sun.management.compiler", compiler_name); | 393 PUTPROP(props, "sun.management.compiler", compiler_name); |
393 } | 394 } |
394 } | 395 } |
395 | 396 |
397 const char* enableSharedLookupCache = "false"; | |
398 #if INCLUDE_CDS | |
399 if (ClassLoaderExt::is_lookup_cache_enabled()) { | |
400 enableSharedLookupCache = "true"; | |
401 } | |
402 #endif | |
403 PUTPROP(props, "sun.cds.enableSharedLookupCache", enableSharedLookupCache); | |
404 | |
396 return properties; | 405 return properties; |
397 JVM_END | 406 JVM_END |
398 | 407 |
399 | 408 |
400 /* | 409 /* |
764 JVMWrapper("JVM_ResolveClass"); | 773 JVMWrapper("JVM_ResolveClass"); |
765 if (PrintJVMWarnings) warning("JVM_ResolveClass not implemented"); | 774 if (PrintJVMWarnings) warning("JVM_ResolveClass not implemented"); |
766 JVM_END | 775 JVM_END |
767 | 776 |
768 | 777 |
778 JVM_ENTRY(jboolean, JVM_KnownToNotExist(JNIEnv *env, jobject loader, const char *classname)) | |
779 JVMWrapper("JVM_KnownToNotExist"); | |
780 #if INCLUDE_CDS | |
781 return ClassLoaderExt::known_to_not_exist(env, loader, classname, CHECK_(false)); | |
782 #else | |
783 return false; | |
784 #endif | |
785 JVM_END | |
786 | |
787 | |
788 JVM_ENTRY(jobjectArray, JVM_GetResourceLookupCacheURLs(JNIEnv *env, jobject loader)) | |
789 JVMWrapper("JVM_GetResourceLookupCacheURLs"); | |
790 #if INCLUDE_CDS | |
791 return ClassLoaderExt::get_lookup_cache_urls(env, loader, CHECK_NULL); | |
792 #else | |
793 return NULL; | |
794 #endif | |
795 JVM_END | |
796 | |
797 | |
798 JVM_ENTRY(jintArray, JVM_GetResourceLookupCache(JNIEnv *env, jobject loader, const char *resource_name)) | |
799 JVMWrapper("JVM_GetResourceLookupCache"); | |
800 #if INCLUDE_CDS | |
801 return ClassLoaderExt::get_lookup_cache(env, loader, resource_name, CHECK_NULL); | |
802 #else | |
803 return NULL; | |
804 #endif | |
805 JVM_END | |
806 | |
807 | |
769 // Returns a class loaded by the bootstrap class loader; or null | 808 // Returns a class loaded by the bootstrap class loader; or null |
770 // if not found. ClassNotFoundException is not thrown. | 809 // if not found. ClassNotFoundException is not thrown. |
771 // | 810 // |
772 // Rationale behind JVM_FindClassFromBootLoader | 811 // Rationale behind JVM_FindClassFromBootLoader |
773 // a> JVM_FindClassFromClassLoader was never exported in the export tables. | 812 // a> JVM_FindClassFromClassLoader was never exported in the export tables. |