AOT cache should support only boot classes with -Djava.system.class.loader

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: P4
    • 26
    • Affects Version/s: 25
    • Component/s: hotspot

      Currently we have some restrictions if`-Djava.system.class.loader=` is specified

      - we disable full module graph caching: https://github.com/openjdk/jdk/blob/0e223f1456c14efdb423595bee3444d5e26db7c6/src/hotspot/share/cds/cdsConfig.cpp#L286
      - we disable loading cached classes for platform and system loaders: https://github.com/openjdk/jdk/blob/0e223f1456c14efdb423595bee3444d5e26db7c6/src/hotspot/share/cds/filemap.cpp#L1874-L1886

      This is problematic for cases described in https://github.com/openjdk/jdk/pull/24223#discussion_r2034846610


      Proposed fix:

      We should extend the restrictions further
      - At dump time, dump only boot classes (no platform, system or unregistered); disable AOTClassLinking
      - At run time, load only boot classes (no platform, system or unregistered)

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

              Created:
              Updated: