RFR: 8341452: Test runtime/cds/appcds/DumpRuntimeClassesTest.java from JDK-8324259 is failing [v2]
Ioi Lam
iklam at openjdk.org
Wed Oct 9 16:31:06 UTC 2024
On Tue, 8 Oct 2024 17:18:46 GMT, Matias Saavedra Silva <matsaave at openjdk.org> wrote:
>> DumpRuntimeClassesTest.java was added in [JDK-8324259](https://bugs.openjdk.org/browse/JDK-8324259) to verify that the newly added dummy call archived classes that are used at CDS runtime. This new test exposed a case where `JarVerifier` is used at CDS runtime while not being in the archive, so this patch performs a dummy call to `JarVerifier`.
>>
>> When using `-Xcomp`, the class `Manifest` is compiled which causes `JarVerifier` to be loaded. This does not occur in other modes since the constructor of `Manifest` doesn't create any instances of `JarVerifier`. The existing dummy call to `Manifest` doesn't load `JarVerifier` either, so a separate dummy call can be used to ensure it is loaded at dumptime. Now that there are multiple dummy calls, they are pulled out into a new method `make_dummy_calls()`. Verified with tier x-y tests.
>
> Matias Saavedra Silva has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:
>
> - Removed test from problem list
> - Merge branch 'master' into dumpRuntimeClassesTest_8341452
> - 8341452: Test runtime/cds/appcds/DumpRuntimeClassesTest.java from JDK-8324259 is failing
The purpose of [JDK-8324259](https://bugs.openjdk.org/browse/JDK-8324259) is to optimize the execution of regular apps executed normally. Since -Xcomp is a testing flag, it's outside of the scope of JDK-8324259.
As -Xcomp may load classes that are not used in the normal execution path, it may load other classes if the implementation of the Manifest class changes, which would require similar whack-a-mole changes as in this PR.
In addition, adding JarVerifier will increase the footprint of the CDS archive.
I think it's better to exclude this test case when -Xcomp is selected.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/21329#issuecomment-2402785360
More information about the hotspot-dev
mailing list