RFR: 8353325: Rewrite appcds/methodHandles test cases to use CDSAppTester [v4]

Ioi Lam iklam at openjdk.org
Wed Apr 2 16:02:02 UTC 2025


On Wed, 2 Apr 2025 03:49:05 GMT, Ioi Lam <iklam at openjdk.org> wrote:

>> These test cases are rewritten to use CDSAppTester, so that they can also be executed in the new JEP 483 workflow (with `-XX:AOTCache=xxx`, etc). This will increase coverage of current and upcoming AOT features (such as AOT linking of invokedynamic, and AOT method profiling).
>> 
>> These test cases are generated by a bash script. This PR minimizes the generated part so that the main portions of the tests can be modified as a normal java source file.
>
> Ioi Lam has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Fixed failure with ZGC + AOT test case

I had to add the following to the `id=aot` part of the tests:


@requires vm.cds.supports.aot.class.linking


This would exclude this part of the tests when ZGC is enabled by jtreg. Since ZGC doesn’t supported archived Java oops, all AOT method handle optimizations are disabled for ZGC. As a result, the following message will not be printed:


out.shouldMatch(".class.load. test.java.lang.invoke." + testClassName +
                "[$][$]Lambda.*/0x.*source:.*shared.*objects.*file");


So it doesn't make sense to run this part of the with ZGC.

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

PR Comment: https://git.openjdk.org/jdk/pull/24340#issuecomment-2773051659


More information about the hotspot-dev mailing list