-
Bug
-
Resolution: Fixed
-
P3
-
25
-
b03
$ java -cp HelloWorld.jar -XX:AOTMode=record -XX:AOTConfiguration=hw.aotconfig HelloWorld
Hello World
AOTConfiguration recorded: hw.aotconfig
$ java -cp HelloWorld.jar -XX:AOTMode=create -XX:AOTCache=hw.aot -XX:AOTConfiguration=hw.aotconfig HelloWorld
Reading AOTConfiguration hw.aotconfig and writing AOTCache hw.aot
AOTCache creation is complete: hw.aot 10317824 bytes
$ java -XX:+UnlockExperimentalVMOptions -XX:+UseGraalJIT -cp HelloWorld.jar -XX:AOTMode=on -XX:AOTCache=hw.aot HelloWorld
[0.007s][error][aot] An error has occurred while processing the AOT cache. Run with -Xlog:aot for details.
[0.007s][error][aot] The AOT cache's TypeProfileLevel setting (111) does not equal the current TypeProfileLevel setting (0).
[0.007s][error][aot] Loading static archive failed.
[0.007s][error][aot] Unable to map shared spaces
Error occurred during initialization of VM
Unable to use AOT cache.
====================
The reverse is also true: AOT cache created with graal jit cannot be used without graal jit
$ java -XX:+UnlockExperimentalVMOptions -XX:+UseGraalJIT -cp HelloWorld.jar -XX:AOTMode=record -XX:AOTConfiguration=hw.aotconfig HelloWorld
Hello World
AOTConfiguration recorded: hw.aotconfig
$ java -XX:+UnlockExperimentalVMOptions -XX:+UseGraalJIT -cp HelloWorld.jar -XX:AOTMode=create -XX:AOTCache=hw.aot -XX:AOTConfiguration=hw.aotconfig HelloWorld
Reading AOTConfiguration hw.aotconfig and writing AOTCache hw.aot
AOTCache creation is complete: hw.aot 10358784 bytes
$ java -XX:+UnlockExperimentalVMOptions -XX:+UseGraalJIT -cp HelloWorld.jar -XX:AOTMode=on -XX:AOTCache=hw.aot HelloWorld
Hello World
$ java -cp HelloWorld.jar -XX:AOTMode=on -XX:AOTCache=hw.aot HelloWorld
[0.007s][error][aot] An error has occurred while processing the AOT cache. Run with -Xlog:aot for details.
[0.007s][error][aot] The AOT cache's TypeProfileLevel setting (0) does not equal the current TypeProfileLevel setting (111).
[0.007s][error][aot] Loading static archive failed.
[0.007s][error][aot] Unable to map shared spaces
Error occurred during initialization of VM
Unable to use AOT cache.
Note: "-XX:+UnlockExperimentalVMOptions -XX:+UseGraalJIT -Xint" also fails:
$ java -XX:+UnlockExperimentalVMOptions -XX:+UseGraalJIT -Xint -cp HelloWorld.jar -XX:AOTMode=on -XX:AOTCache=hw.aot HelloWorld
[0.007s][error][aot] An error has occurred while processing the AOT cache. Run with -Xlog:aot for details.
[0.007s][error][aot] The AOT cache's TypeProfileLevel setting (0) does not equal the current TypeProfileLevel setting (111).
[0.007s][error][aot] Loading static archive failed.
[0.007s][error][aot] Unable to map shared spaces
Error occurred during initialization of VM
Unable to use AOT cache.
Hello World
AOTConfiguration recorded: hw.aotconfig
$ java -cp HelloWorld.jar -XX:AOTMode=create -XX:AOTCache=hw.aot -XX:AOTConfiguration=hw.aotconfig HelloWorld
Reading AOTConfiguration hw.aotconfig and writing AOTCache hw.aot
AOTCache creation is complete: hw.aot 10317824 bytes
$ java -XX:+UnlockExperimentalVMOptions -XX:+UseGraalJIT -cp HelloWorld.jar -XX:AOTMode=on -XX:AOTCache=hw.aot HelloWorld
[0.007s][error][aot] An error has occurred while processing the AOT cache. Run with -Xlog:aot for details.
[0.007s][error][aot] The AOT cache's TypeProfileLevel setting (111) does not equal the current TypeProfileLevel setting (0).
[0.007s][error][aot] Loading static archive failed.
[0.007s][error][aot] Unable to map shared spaces
Error occurred during initialization of VM
Unable to use AOT cache.
====================
The reverse is also true: AOT cache created with graal jit cannot be used without graal jit
$ java -XX:+UnlockExperimentalVMOptions -XX:+UseGraalJIT -cp HelloWorld.jar -XX:AOTMode=record -XX:AOTConfiguration=hw.aotconfig HelloWorld
Hello World
AOTConfiguration recorded: hw.aotconfig
$ java -XX:+UnlockExperimentalVMOptions -XX:+UseGraalJIT -cp HelloWorld.jar -XX:AOTMode=create -XX:AOTCache=hw.aot -XX:AOTConfiguration=hw.aotconfig HelloWorld
Reading AOTConfiguration hw.aotconfig and writing AOTCache hw.aot
AOTCache creation is complete: hw.aot 10358784 bytes
$ java -XX:+UnlockExperimentalVMOptions -XX:+UseGraalJIT -cp HelloWorld.jar -XX:AOTMode=on -XX:AOTCache=hw.aot HelloWorld
Hello World
$ java -cp HelloWorld.jar -XX:AOTMode=on -XX:AOTCache=hw.aot HelloWorld
[0.007s][error][aot] An error has occurred while processing the AOT cache. Run with -Xlog:aot for details.
[0.007s][error][aot] The AOT cache's TypeProfileLevel setting (0) does not equal the current TypeProfileLevel setting (111).
[0.007s][error][aot] Loading static archive failed.
[0.007s][error][aot] Unable to map shared spaces
Error occurred during initialization of VM
Unable to use AOT cache.
Note: "-XX:+UnlockExperimentalVMOptions -XX:+UseGraalJIT -Xint" also fails:
$ java -XX:+UnlockExperimentalVMOptions -XX:+UseGraalJIT -Xint -cp HelloWorld.jar -XX:AOTMode=on -XX:AOTCache=hw.aot HelloWorld
[0.007s][error][aot] An error has occurred while processing the AOT cache. Run with -Xlog:aot for details.
[0.007s][error][aot] The AOT cache's TypeProfileLevel setting (0) does not equal the current TypeProfileLevel setting (111).
[0.007s][error][aot] Loading static archive failed.
[0.007s][error][aot] Unable to map shared spaces
Error occurred during initialization of VM
Unable to use AOT cache.
- links to
-
Commit(master) openjdk/jdk/12a0dd03
-
Review(master) openjdk/jdk/25782