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

Improve testing of CDS archive heap

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 20
    • 20
    • hotspot
    • b15

      Currently, the CDS archive heap supports a fixed set of built-in classes, specified by hard-coded lists in heapShared.cpp:

      https://github.com/openjdk/jdk/blob/372fc58e897d25713db0dfe289ed25c40d9a3985/src/hotspot/share/cds/heapShared.cpp#L104-L127

      As we plan to improve the archive heap, it becomes critical to be able to write specific test cases for different scenarios.

      For example, supporting LambdaForms in the CDS archive heap would require archiving enums of the type sun.invoke.util.Wrapper, which doesn't work yet (see JDK-8293187). This RFE makes it possible to develop support for sun.invoke.util.Wrapper separately, without implementing the full support of LambdaForms in a single colossal step.

      The proposal is to add a new VM option. For safety, this option is not available in product builds:

        develop(ccstr, ArchiveHeapTestClass, NULL, \
                "For JVM internal testing only. Not available in " \
                "product builds. If specified, the static field named " \
                "\"archivedObjects\" in this class is stored into the CDS " \
                "archive heap")
       

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

              Created:
              Updated:
              Resolved: