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

Archived class pre-resolution and pre-initialization

    Details

    • Type: Enhancement
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 14
    • Fix Version/s: tbd
    • Component/s: hotspot

      Description

      During the execution of a Java application, the used Java classes must be loaded, linked (JVMS [1] §5.4), resolved (optionally, JVMS [1] §5.4.3) and initialized (JVMS [1] §5.5). These operations are relatively expensive, and are repeated for the same set of classes within different JVM processes when running the same Java application. Some of the JDK classes may be commonly used for all Java applications. The loading/linking/resolution/initialization work are repeated for those classes in every JVM process.

      Class Data Sharing supports archiving (caching) loaded class metadata and some of the selected Java heap objects in an archive image (.jsa). When that is being used, it avoids repeated classloading work for Java applications and improves performance. Good performance improvements have been observed when enabling archive in some use cases. However, the resolution, initialization and some of the linking work is still repeated during application runtime. The total runtime cost for those operations can be as high as class loading and verification. The cost can be substantially higher for large Java applications.

      This umbrella RFE seeks to extend the archiving mechanism for pre-resolving and pre-initializing classes, and preserving the processed data as part of the archive to achieve additional savings. The pre-resolving and pre-initializing work may be applied to selected targets only, rather than applying to all constant pool entries and static fields.

      This RFE is served as a place holder for investigation and work in this area. There are still open-ended questions related to this area.

      References
      [1] https://docs.oracle.com/javase/specs/jvms/se8/jvms8.pdf

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jiangli Jiangli Zhou
                Reporter:
                jiangli Jiangli Zhou
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated: