RFR: 8355798: Implement JEP 514: Ahead-of-Time Command Line Ergonomics [v3]
Ioi Lam
iklam at openjdk.org
Mon May 5 01:00:31 UTC 2025
On Tue, 29 Apr 2025 15:56:59 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:
>> Ioi Lam has updated the pull request incrementally with one additional commit since the last revision:
>>
>> @vnkozlov comments
>
> src/hotspot/share/cds/metaspaceShared.cpp line 1068:
>
>> 1066: }
>> 1067:
>> 1068: // Pass all arguments. These include those from JAVA_TOOL_OPTIONS and _JAVA_OPTIONS.
>
> `_JAVA_OPTIONS`. Do you mean `JAVA_AOT_OPTIONS`?
`JAVA_AOT_OPTIONS` is not parsed here. I added comments.
> src/hotspot/share/cds/metaspaceShared.cpp line 1071:
>
>> 1069: for (int i = 0; i < Arguments::num_jvm_args(); i++) {
>> 1070: const char* arg = Arguments::jvm_args_array()[i];
>> 1071: if (strncmp("-XX:AOTMode", arg, 11) == 0) {
>
> In arguments.cpp you do `strncmp("-XX:AOTMode=", arg, 12) == 0`. I think you need to be consistent.
Fixed.
> src/java.base/share/classes/jdk/internal/misc/CDS.java line 510:
>
>> 508:
>> 509: Map<String, String> env = pb.environment();
>> 510: env.put("JAVA_TOOL_OPTIONS", sb.toString());
>
> What about `JAVA_AOT_OPTIONS`?
This method doesn't not touch `JAVA_AOT_OPTIONS`, which will be inherited by the child process.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24942#discussion_r2072761734
PR Review Comment: https://git.openjdk.org/jdk/pull/24942#discussion_r2072761745
PR Review Comment: https://git.openjdk.org/jdk/pull/24942#discussion_r2072761767
More information about the core-libs-dev
mailing list