As part of JEP 483, we are adding new -XX:AOTXxx flags (see JDK-8338017) for controlling ahead-of-time optimizations. The -XX:CacheDataStore flag in the leyden/premain should be renamed to be consistent with the new naming scheme.
Proposal:
[1] Identical replacement of the -XX:CacheDataStore flag (aka "one step workflow", where the AOT cache is created with a single "java" command).
java -XX:CacheDataStore=app.cds -cp app.jar App
=>
java -XX:AOTMode=autocreate -XX:AOTCache=app.aot -cp app.jar App
- If app.aot exists, it will be used to run the application
- otherwise, app.aot will be created when the application exits
[2] "Two step work flow" (as proposed in JEP 483), where two "java" commands are executed: one to perform the training run, the other to perform the assembly phase.
java -XX:AOTMode=record -XX:AOTConfiguration=foo.aotconfig -cp app.jar App
java -XX:AOTMode=create -XX:AOTConfiguration=foo.aotconfig -XX:AOTCache=foo.aot -cp app.jar
[1] can be more convenient in some cases; [2] will be more flexible, as it allows the training run and assembly phase to run in two separate steps, possibly on two different hosts.
Note that [2] is partially supported in the premain repo (as of https://github.com/openjdk/leyden/commit/7b72b048474091f123c055bd5b8d7fd7c00d19d4). However, the AOTConfiguration file does not include the training data produced by -XX:+RecordTraining, so the AOT-compiled code cache cannot be created. This will be fixed in subtask JDK-8341690.
Proposal:
[1] Identical replacement of the -XX:CacheDataStore flag (aka "one step workflow", where the AOT cache is created with a single "java" command).
java -XX:CacheDataStore=app.cds -cp app.jar App
=>
java -XX:AOTMode=autocreate -XX:AOTCache=app.aot -cp app.jar App
- If app.aot exists, it will be used to run the application
- otherwise, app.aot will be created when the application exits
[2] "Two step work flow" (as proposed in JEP 483), where two "java" commands are executed: one to perform the training run, the other to perform the assembly phase.
java -XX:AOTMode=record -XX:AOTConfiguration=foo.aotconfig -cp app.jar App
java -XX:AOTMode=create -XX:AOTConfiguration=foo.aotconfig -XX:AOTCache=foo.aot -cp app.jar
[1] can be more convenient in some cases; [2] will be more flexible, as it allows the training run and assembly phase to run in two separate steps, possibly on two different hosts.
Note that [2] is partially supported in the premain repo (as of https://github.com/openjdk/leyden/commit/7b72b048474091f123c055bd5b8d7fd7c00d19d4). However, the AOTConfiguration file does not include the training data produced by -XX:+RecordTraining, so the AOT-compiled code cache cannot be created. This will be fixed in subtask JDK-8341690.
1.
|
[premain] AOTConfigure file should include data for -XX:+RecordTraining | Open | Unassigned |