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

Stephane Nicoll stephane.nicoll at broadcom.com
Fri Aug 16 06:08:36 UTC 2024


This looks good and having shorter configuration switches is better, IMO.

Thanks!

On Thu, Aug 15, 2024 at 11: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).
>
>

-- 
This electronic communication and the information and any files transmitted 
with it, or attached to it, are confidential and are intended solely for 
the use of the individual or entity to whom it is addressed and may contain 
information that is confidential, legally privileged, protected by privacy 
laws, or otherwise restricted from disclosure to anyone else. If you are 
not the intended recipient or the person responsible for delivering the 
e-mail to the intended recipient, you are hereby notified that any use, 
copying, distributing, dissemination, forwarding, printing, or copying of 
this e-mail is strictly prohibited. If you received this e-mail in error, 
please return the e-mail to the sender, delete it from your computer, and 
destroy any printed copy of it.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/leyden-dev/attachments/20240816/eb1d9f2b/attachment.htm>


More information about the leyden-dev mailing list