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

Split Split Close
Expand all
Collapse all
          --- old/src/share/vm/prims/jvm.h
          +++ new/src/share/vm/prims/jvm.h
↓ open down ↓ 1540 lines elided ↑ open up ↑
1541 1541   * Returns an array of the substate names representing the
1542 1542   * given Java thread state.  Returns NULL if the VM version is
1543 1543   * incompatible with the JDK or the VM doesn't support
1544 1544   * the given Java thread state.
1545 1545   * values must be the jintArray returned from JVM_GetThreadStateValues
1546 1546   * and javaThreadState.
1547 1547   */
1548 1548  JNIEXPORT jobjectArray JNICALL
1549 1549  JVM_GetThreadStateNames(JNIEnv* env, jint javaThreadState, jintArray values);
1550 1550  
     1551 +/*
     1552 + * Returns true if the JVM's lookup cache indicates that this class is
     1553 + * known to NOT exist for the given loader.
     1554 + */
     1555 +JNIEXPORT jboolean JNICALL
     1556 +JVM_KnownToNotExist(JNIEnv *env, jobject loader, const char *classname);
     1557 +
     1558 +/*
     1559 + * Returns an array of all URLs that are stored in the JVM's lookup cache
     1560 + * for the given loader. NULL if the lookup cache is unavailable.
     1561 + */
     1562 +JNIEXPORT jobjectArray JNICALL
     1563 +JVM_GetResourceLookupCacheURLs(JNIEnv *env, jobject loader);
     1564 +
     1565 +/*
     1566 + * Returns an array of all URLs that *may* contain the resource_name for the
     1567 + * given loader. This function returns an integer array, each element
     1568 + * of which can be used to index into the array returned by
     1569 + * JVM_GetResourceLookupCacheURLs of the same loader to determine the
     1570 + * URLs.
     1571 + */
     1572 +JNIEXPORT jintArray JNICALL
     1573 +JVM_GetResourceLookupCache(JNIEnv *env, jobject loader, const char *resource_name);
     1574 +
     1575 +
1551 1576  /* =========================================================================
1552 1577   * The following defines a private JVM interface that the JDK can query
1553 1578   * for the JVM version and capabilities.  sun.misc.Version defines
1554 1579   * the methods for getting the VM version and its capabilities.
1555 1580   *
1556 1581   * When a new bit is added, the following should be updated to provide
1557 1582   * access to the new capability:
1558 1583   *    HS:   JVM_GetVersionInfo and Abstract_VM_Version class
1559 1584   *    SDK:  Version class
1560 1585   *
↓ open down ↓ 121 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX