Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8202854 Hybrid archiving
  3. JDK-8202951

Implementation of JEPJDK-8204247: Include default CDS (Class Data Sharing) archive in JDK binary



    • Sub-task
    • Status: Resolved
    • P3
    • Resolution: Fixed
    • 11
    • 12
    • hotspot
    • b15


      Currently, a JDK image includes a classlist generated at build time in lib/ directory. For any users who want to take advantage of CDS even with the default classlist, they need to run -Xshare:dump as an extra step. It would be beneficial to create a default archive (run -Xshare:dump using the generated default classlist) as part of the JDK build and package the archive together with the JDK binary. Thanks to Karen and Alan for initiating the idea.

      Benefits of including a default CDS archive in JDK distribution:
      - Startup performance improvement (default behavior). With the latest JDK 11 EA build 11-ea+14, using CDS archive improves JVM startup time by 32.59% on linux-x64 with default settings. On other platforms, similar or higher performance gains have been observed with CDS enabled.
      - Reduce overhead for users.

      Size measurement shows the CDS archive generated from the default classlist is 13% of the lib/modules on linux-x64. Including a default CDS archive will have a small increase for JDK binary footprint.

      As the CDS archive contains generated code (CPU specific) although minimum, the packaged archive should be generated on a platform with the same OS and CPU for the target machine.

      The impact on testing is large as all test executions will enable CDS by default once a JDK binary is packaged with a default archive. All tiers need to be tested before the proposed change can be integrated.


        Issue Links



              jiangli Jiangli Zhou
              jiangli Jiangli Zhou
              0 Vote for this issue
              9 Start watching this issue