On Thu, 15 May 2025 03:23:40 GMT, Ioi Lam <ik...@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 `JAVA_AOT_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
>> Picked up JAVA_TOOL_OPTIONS: -Djava.class.path=HelloWorld.jar 
>> -XX:AOTCacheOutput=foo.aot -XX:AOTConfiguration=foo.aot.config 
>> -XX:AOTMode=create
>> 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).
>
> Ioi Lam has updated the pull request with a new target base due to a merge or 
> a rebase. The pull request now contains 22 commits:
> 
>  - @vnkozlov comments
>  - added info about JTREG/AOT_JDK testing
>  - fixed whitespace
>  - Merge branch 'master' into 8355798-implement-leyden-ergo-jep-8350022
>  - java.md updates from @rose00
>  - Resolved differences with CSR JDK-8356010
>  - Added param to makefile function SetupAOT for choosing onestep vs twostep
>  - Allow one-step training even when -XX:AOTMode=auto is specified
>  - Merge branch 'master' into 8355798-implement-leyden-ergo-jep-8350022
>  - Update java man page
>  - ... and 12 more: https://git.openjdk.org/jdk/compare/5e50a584...7f4c0e8b

doc/testing.md line 619:

> 617: run existing jtreg test cases in a special "AOT_JDK" mode. Example:
> 618: 
> 619: 

Is this extra newline intentional?

doc/testing.md line 629:

> 627: these classes (such as pre-linked lambda expressions, execution 
> profiles, and pre-generated native code)
> 628: are stored into an AOT cache file, which will be used by all the JVMs 
> launched by the selected jtreg
> 629: test cases.

Some of these lines are >80 chars. Can you try to format line lengths in this 
file to stay under where reasonably feasible? It's ok if long markups such as 
links go over, just try to keep the normal text adhering to this.

doc/testing.md line 640:

> 638: Also, test cases that were written specifically to test AOT, such as the 
> tests
> 639: under 
> [test/hotspot/jtreg/runtime/cds](../test/hotspot/jtreg/runtime/cds/), cannot
> 640: be execute with the AOT_JDK mode.

Suggestion:

be executed with the AOT_JDK mode.

doc/testing.md line 642:

> 640: be execute with the AOT_JDK mode.
> 641: 
> 642: Valid values for `AOT_JDK` are `one_step` and `two_step`. These control 
> how

Looks like the values are `onestep` and `twostep` in the makefile.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24942#discussion_r2091117516
PR Review Comment: https://git.openjdk.org/jdk/pull/24942#discussion_r2091125422
PR Review Comment: https://git.openjdk.org/jdk/pull/24942#discussion_r2091121317
PR Review Comment: https://git.openjdk.org/jdk/pull/24942#discussion_r2091122470

Reply via email to