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

Short cut java.lang.Object super class loading

XMLWordPrintable

    • b03

      In ClassFileParser, if the super class to be loaded is java.lang.Object with a null class loader, we can assign the InstanceKlass rather than going into resolve_super_or_fail.
      This elides taking a lock and adding a short-lived placeholder entry for j.l.Object. Lots of threads load j.l.Object for lambda classes in parallel. I noticed this when debugging JDK-8298061.

      We tried a similar optimization but it needs to only do this if the class loader is the null class loader, otherwise we wouldn't add the entry in other class loaders as initiating loaders for java.lang.Object.

            coleenp Coleen Phillimore
            coleenp Coleen Phillimore
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: