RFR: 8338017: Add AOT command-line flag aliases [v3]

Mat Carter macarte at openjdk.org
Thu Sep 19 21:46:35 UTC 2024


On Thu, 29 Aug 2024 22:11:36 GMT, Ioi Lam <iklam at openjdk.org> wrote:

>> This is the 1st PR for [JEP 483: Ahead-of-Time Class Loading & Linking](https://bugs.openjdk.org/browse/JDK-8315737).
>> 
>> Add the following command-line options as specified in JEP 483:
>> 
>> 
>> - `-XX:AOTMode=off/record/create/auto/on`
>> - `-XX:AOTConfiguration=<file>.aotconfig`
>> - `-XX:AOTCache=<file>.aot`
>> 
>> These options are implemented as aliases to existing command-line flags such as `-Xshare:dump`, `-XX:SharedArchiveFile`, `-XX:DumpLoadedClassesList`, etc.
>> 
>> Please see the CSR (TODO) for detailed specification.
>> 
>> -----
>> See [here](https://bugs.openjdk.org/browse/JDK-8315737) for the sequence of dependent RFEs for implementing JEP 483.
>
> Ioi Lam has updated the pull request incrementally with one additional commit since the last revision:
> 
>   @dholmes-ora comments: do not check for -XX:AOTMode=create in JLI java.c

src/hotspot/share/cds/cds_globals.hpp line 102:

> 100:   /* See CDSConfig::check_flag_aliases().                               */  \
> 101:                                                                             \
> 102:   product(ccstr, AOTMode, nullptr,                                          \

you can replace nullptr with "auto" as that's the default, that would simplify some of the FLAG_IS_DEFAULT(AOTMode) || (strcmp(AOTMode, "auto") == 0 checks.  So you would now check strcmp(AOTMode, "auto") == 0 which I guess is slightly less performant (as FLAG_IS_DEFAULT is a cheap early out), however the current implementation means that the definition of the default value can spread across the codebase vs only being specified in cds_globals.h

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20516#discussion_r1767636303


More information about the core-libs-dev mailing list