RFR: 8352084: Add more test code in TestSetupAOT.java

Leonid Mesnik lmesnik at openjdk.org
Fri Mar 14 23:30:52 UTC 2025


On Fri, 14 Mar 2025 20:13:57 GMT, Ioi Lam <iklam at openjdk.org> wrote:

> I modified TestSetupAOT.java to exercise more functionalities in the JDK so that we can have a more substantial AOT cache when running tests with `AOT_JDK=true`. E.g:
> 
> 
> make test JTREG=AOT_JDK=true \
>     TEST=open/test/jdk/java/util/TimeZone/ListTimeZones.java
> 
> 
> Before: the generated AOT cache was about 20 MB, with 2245 classes and 125 resolved indies
> After:  the generated AOT cache is about 34 MB, with 4703 classes and 912 resolved indies
> 
> I verified with Mach5 tiers 4, 5, 6, 10 with all tests tasks that have the label `.*aot.jdkcache.*`

Changes requested by lmesnik (Reviewer).

make/RunTests.gmk line 738:

> 736:   $1_AOT_JDK_CACHE := $$($1_TEST_SUPPORT_DIR)/aot/jdk.aotcache
> 737:   $1_AOT_JDK_LOG := $$($1_TEST_SUPPORT_DIR)/aot/TestSetupAOT.log
> 738:   $1_AOT_JDK_OUTPUT_DIR := $$($1_TEST_SUPPORT_DIR)/aot

Better to move it before line 735, and reuse in other definitions instead of $$($1_TEST_SUPPORT_DIR)/aot

test/setup_aot/TestSetupAOT.java line 147:

> 145: 
> 146: 
> 147:     static void streamOps(String args[]) {

Can you please add a comment with explanation of purpose of 'streamOps' method.

test/setup_aot/TestSetupAOT.java line 201:

> 199:         String CSCC   = "string" + s + "string" + c;
> 200: 
> 201:         long l = System.currentTimeMillis();

the l should be logged and  allow to be defined using property.
So any testing could be repeated.
 long l =  Long.getLong("test.aot.seed", System.currentTimeMillis());

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

PR Review: https://git.openjdk.org/jdk/pull/24067#pullrequestreview-2687055469
PR Review Comment: https://git.openjdk.org/jdk/pull/24067#discussion_r1996419066
PR Review Comment: https://git.openjdk.org/jdk/pull/24067#discussion_r1996422306
PR Review Comment: https://git.openjdk.org/jdk/pull/24067#discussion_r1996424173


More information about the build-dev mailing list