Proposal: Replace -XX:CacheDataStore with new "AOT" naming scheme

Vladimir Kozlov vladimir.kozlov at oracle.com
Thu Aug 15 22:21:09 UTC 2024


java -XX:AOTMode=create -XX:AOTCache=foo.aot -cp app.jar ...

This is for one step workflow.

For 5 steps workflow (which we still support for development) we may 
need all flags from JEP. Or it is different RFE?

Vladimir K

On 8/15/24 2:57 PM, ioi.lam at oracle.com wrote:
> Hi folks,
> 
> I've filed https://bugs.openjdk.org/browse/JDK-8338476 to rename 
> -XX:CacheDataStore.
> 
> Any comments? Without any strong objections I will implement this shortly.
> 
> Thanks
> 
> - Ioi
> 
> ------------------------------------------
> 
> 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.
> 
> Also, -XX:CacheDataStore=foo has automagic behavior -- if foo exists, 
> load it as the CDS archive; otherwise create foo at VM exit. While such 
> automagic behavior might be convenient for desktop users, it's not 
> particular useful for early adopters of Leyden -- i.e., developers who 
> are packaging apps for cloud deployment. For example, to make sure that 
> foo is created, you would need to remove it explicitly:
> 
>      rm -f foo
>      java -XX:CacheDataStore=foo -cp app.jar ...
> 
> Proposal:
> 
> In JEP 483, AOTConfiguration is required for creating an AOTCache. E.g.,
> 
>      java -XX:AOTMode=create -XX:AOTCache=foo.aot \
>          -XX:AOTConfiguration=foo.aotconfig \
>          -cp app.jar ...
> 
> In the leyden/premain branch, we allow the AOTConfiguration flag to be 
> omitted. In this case, the application will be executed once and the 
> AOTCache will be created at VM exit:
> 
>      java -XX:AOTMode=create -XX:AOTCache=foo.aot \
>          -cp app.jar ...
> 
> Also, in this mode, all Leyden optimizations (such as 
> -XX:+StoreCachedCode) are enabled by default (this is the same behavior 
> as with -XX:CacheDataStore).
> 


More information about the leyden-dev mailing list