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

Refactor handling VM options for AOT cache input and output

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P3 P3
    • 25
    • None
    • hotspot
    • b18

      Since JEP 483 (JDK-8315737), VM options such as -XX:AOTCache are implemented as aliases of "classical" CDS options such as -XX:SharedArchiveFile.

      Example:
      https://github.com/openjdk/jdk/blob/b01026abaab0b65f9ec0920d66a8ff1fa868d351/src/hotspot/share/cds/cdsConfig.cpp#L414-L417

      In anticipation of the JEP "Ahead-of-time Command Line Ergonomics" (JDK-8350022), we should refactor the code that deals with the AOT options. Specifically, as we expect the JVM to be able to load from an "input AOT cache" and write to an "output AOT cache", we should clearly identify the input and output caches in separate APIs:

          const char* CDSConfig::input_static_archive_path();
          const char* CDSConfig::input_dynamic_archive_path();
          const char* CDSConfig::output_archive_path();

      (Currently, the above information is obtained from global variables such as SharedArchiveFile, ArchiveClassesAtExit, and AOTCache, so the logic is difficult to understand).

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

              Created:
              Updated:
              Resolved: