Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8232071

Avoid shared dictionary lookup when the class name is not shared

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 14
    • None
    • hotspot
    • b19

      The names of all shared classes must also be a shared Symbol. If name->is_shared() == false, the following lookup will always fail:

      http://hg.openjdk.java.net/jdk/jdk/file/5b5de2618756/src/hotspot/share/classfile/systemDictionaryShared.cpp#l1415
      const RunTimeSharedClassInfo*

      SystemDictionaryShared::find_record(RunTimeSharedDictionary* dict, Symbol* name) {
        if (UseSharedSpaces) {
          unsigned int hash = primitive_hash<Symbol*>(name);
          return dict->lookup(name, hash, 0);
        } else {
          return NULL;
        }
      }

      To improve loading time of non-shared classes, we should avoid doing the hashtable lookup, if name->is_shared() == false.

            iklam Ioi Lam
            iklam Ioi Lam
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: