Prototype for new AOT command-line ergonomics

ioi.lam at oracle.com ioi.lam at oracle.com
Thu Apr 17 04:18:41 UTC 2025


I have implemented part of the draft JEP "Ahead-of-time Command Line 
Ergonomics" (https://openjdk.org/jeps/8350022) in the Leyden premain branch:

https://github.com/openjdk/leyden/blob/premain/README.md#prototype-for-jep-draft-8350022-ahead-of-time-command-line-ergonomics

Please check it out and let us know what you think.

Here's an example that creates an AOT cache with a single command:

$ java -XX:AOTCacheOutput=JavacBenchApp.aot -cp JavacBenchApp.jar \
       JavacBenchApp 50
Generated source code for 51 classes and compiled them in 2212 ms
[3.720s][warning][cds] Skipping Sanity: Unsupported location
Temporary AOTConfiguration recorded: JavacBenchApp.aot.config
Launching child process /bld/images/jdk/bin/java to assemble AOT cache 
JavacBenchApp.aot
using configuration JavacBenchApp.aot.config
Picked up JAVA_TOOL_OPTIONS: -Djava.class.path=JavacBenchApp.jar
-XX:AOTCacheOutput=JavacBenchApp.aot
-XX:AOTConfiguration=JavacBenchApp.aot.config -XX:AOTMode=create
Reading AOTConfiguration JavacBenchApp.aot.config and writing AOTCache 
JavacBenchApp.aot
AOTCache creation is complete: JavacBenchApp.aot 39956480 bytes
Removed temporary AOT configuration file JavacBenchApp.aot.config

Thanks

- Ioi



More information about the leyden-dev mailing list