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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 25
    • 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)

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

              Created:
              Updated: