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

Avoid shared dictionary lookup when the class name is not shared

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 14
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b19

      Description

      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.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: