[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-hotspot-runtime-dev
Subject:    RFR: 8293182: Improve testing of CDS archive heap
From:       Ioi Lam <iklam () openjdk ! org>
Date:       2022-08-31 22:56:16
Message-ID: ZYoryf_dc9VHQJTM480t_vsKMvDp-KyT19yHXADrvHs=.6009b31d-ecfb-4a58-83cf-2e96aa136cdd () github ! com
[Download RAW message or body]

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-L107


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](https://github.com/openjdk/jdk/blob/607612 \
899678234c093dc644d3a40cb831c7e43b/src/java.base/share/classes/sun/invoke/util/Wrapper.java), \
which doesn't work yet (see \
[JDK-8293187](https://bugs.openjdk.org/browse/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.

- Added `-XX:ArchiveHeapTestClass` to inject extra classes into the archive heap. See \
the test case ArchiveHeapTestClass.java for examples. For paranoia, This flag is \
                available only in debug builds.
- I also tighten the requirement for the type of classes that can be stored into the \
archive heap. E.g., we no longer allow classes outside of the `java.base` module.

-------------

Commit messages:
 - 8293182: Improve testing of CDS archive heap

Changes: https://git.openjdk.org/jdk/pull/10110/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=10110&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8293182
  Stats: 582 lines in 9 files changed: 512 ins; 31 del; 39 mod
  Patch: https://git.openjdk.org/jdk/pull/10110.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/10110/head:pull/10110

PR: https://git.openjdk.org/jdk/pull/10110


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic