RFR: 8171508: Remove -Dsun.java.launcher.is_altjvm option [v6]
David Holmes
dholmes at openjdk.org
Thu Apr 10 00:28:35 UTC 2025
On Wed, 9 Apr 2025 06:19:52 GMT, Calvin Cheung <ccheung at openjdk.org> wrote:
>> The `-Dsun.java.launcher.is_altjvm` option is only used in the gtest launcher and has no relationship with the similarly named `-XXaltjvm` option. The gtest launcher also sets the `-XX:+ExecutingUnitTests` option. This RFE involves removing the `-Dsun.java.launcher.is_altjvm` option, capturing the `-XX:+ExecutingUnitTests` option in Arguments::process_sun_java_launcher_properties() so that the os::jvm_path() can check if the option is set before using JAVA_HOME setting.
>>
>> Passed tiers 1 - 3 testing.
>
> Calvin Cheung has updated the pull request incrementally with one additional commit since the last revision:
>
> simplify the code by using stringStream
Looks okay. Some additional possible cleanup now you are using the stringStream.
src/hotspot/os/aix/os_aix.cpp line 1330:
> 1328:
> 1329: len = strlen(buf);
> 1330: assert(len < buflen, "Ran out of buffer room");
Suggestion:
assert(strlen(buf) < buflen, "Ran out of buffer room");
and then I think the `len` local is unused.
src/hotspot/os/bsd/os_bsd.cpp line 1524:
> 1522: len = strlen(buf);
> 1523: assert(len < buflen, "Ran out of buffer space");
> 1524: // Add the appropriate library and JVM variant subdirs
Suggestion:
// Add the appropriate library and JVM variant subdirs
-------------
PR Review: https://git.openjdk.org/jdk/pull/24310#pullrequestreview-2755056558
PR Review Comment: https://git.openjdk.org/jdk/pull/24310#discussion_r2036313005
PR Review Comment: https://git.openjdk.org/jdk/pull/24310#discussion_r2036315186
More information about the hotspot-runtime-dev
mailing list