Integrated: 8355798: Implement JEP 514: Ahead-of-Time Command Line Ergonomics
Ioi Lam
iklam at openjdk.org
Wed May 28 22:15:02 UTC 2025
On Tue, 29 Apr 2025 04:50:42 GMT, Ioi Lam <iklam at openjdk.org> wrote:
> This is the implementation of the draft [JEP: Ahead-of-time Command Line Ergonomics](https://bugs.openjdk.org/browse/JDK-8350022)
>
> - Implemented new flag `AOTCacheOutput`, which can be used to create an AOT cache using the "one-command workflow"
> - Added processing of the `JDK_AOT_VM_OPTIONS` environment variable that can supply extra VM options when creating an AOT cache
> - Added `%p` substitution for `AOTCache`, `AOTCacheOutput`, and `AOTConfiguration` options
>
> Please see the [JEP](https://bugs.openjdk.org/browse/JDK-8350022) and [CSR](https://bugs.openjdk.org/browse/JDK-8356010) for detailed specification.
>
> Examples:
>
>
> # Create an AOT cache with a single command:
> $ java -cp HelloWorld.jar -XX:AOTMode=record -XX:AOTCacheOutput=foo.aot HelloWorld
> Hello World
> Temporary AOTConfiguration recorded: foo.aot.config
> Launching child process /usr/bin/java to assemble AOT cache foo.aot using configuration foo.aot.config
> [...]
> Reading AOTConfiguration foo.aot.config and writing AOTCache foo.aot
> AOTCache creation is complete: foo.aot 10240000 bytes
>
> # Create logging file for the AOT cache assembly phase
> $ export AOT_TOOL_COMMAND=-Xlog:cds:file=log.txt
> $ java -cp HelloWorld.jar -XX:AOTMode=record -XX:AOTCacheOutput=foo.aot HelloWorld
>
>
> Note: the child process is launched with Java API because the HotSpot native APIs are not sufficient (no way to set env vars for child process).
This pull request has now been integrated.
Changeset: dede3532
Author: Ioi Lam <iklam at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/dede3532f7238d527fb89be41f1b8050bde02ee3
Stats: 2107 lines in 26 files changed: 1564 ins; 459 del; 84 mod
8355798: Implement JEP 514: Ahead-of-Time Command Line Ergonomics
Reviewed-by: erikj, kvn, asmehra
-------------
PR: https://git.openjdk.org/jdk/pull/24942
More information about the hotspot-runtime-dev
mailing list