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

Avoid calling resolve_super_or_fail in SystemDictionary::load_shared_class

    XMLWordPrintable

Details

    • b14

    Description

      Small optimization in shared class loading:

      http://hg.openjdk.java.net/jdk/jdk/file/7ef41e83066b/src/hotspot/share/classfile/systemDictionary.cpp#l1281

      In SystemDictionary::load_shared_class() we call resolve_super_or_fail to check if the super types of a shared class has been redefined at run time. However, this requires looking up the super types by name.

        if (ik->super() != NULL) {
          Symbol* cn = ik->super()->name();
          Klass *s = resolve_super_or_fail(class_name, ....)

      We can avoid the look up altogether if the super type has already been loaded. Something like this:

        if (ik->super() != NULL) {
           if (ik->super() is shared class for boot/platform/app loaders) {
             if (ik->super()->class_loader_data() != NULL) {
                 // We known for sure that the super class has been loaded from
                 // CDS, so it's not redefined.
            } else {
              resolve_super_or_fail(....)
            }


      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: