Store Java mirrors in AOT configuration file

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 27
    • Affects Version/s: None
    • Component/s: hotspot
    • b08

      The AOT configuration file is currently implemented as a special AOT cache that doesn't have archived heap objects.

      However, in both Valhalla and Leyden, we have found the need to store heap objects into the AOT configuration file:

      [1] In Valhalla, meta information related to a class can be stored as injected fields in the class's Java mirror. For example, Valhalla-specific acmp operations requires certain classes to have a property called ".acmp_maps" which is represented as an integer array. Because the acmp operation is implemented in Java code, this array needs to be a regular Java array (not the usual C++ type of Array<int> traditionally used by HotSpot).

      As we expect more JVM capabilities to be implemented in Java code in future evolution of HotSpot, we should expect more "metadata" related to a Java class to be represented as Java objects.

      [2] In Leyden, we are trying improve support for custom class loaders. While the design is not finalized, it's likely that we will need to store the classes defined by custom loaders from the training run into the AOT configuration file. In the production run, we must properly restore these classes with the correct ProtectionDomain and CodeSource objects. A simple solution will be to store the {Java mirror + ProtectionDomain) for these classes into the AOT configuration during the training run, and pass these into the AOT cache during the AOT assembly phase.

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

              Created:
              Updated:
              Resolved: