RFR: 8348028: Unable to run gtests with CDS enabled [v2]

Ioi Lam iklam at openjdk.org
Wed Feb 26 19:31:55 UTC 2025


On Wed, 26 Feb 2025 18:02:43 GMT, Calvin Cheung <ccheung at openjdk.org> wrote:

>> A simple fix in `os::jvm_path()` so that gtest can be run with CDS (`-Xshare:on`). The fix is just to change the directory name from `hotspot` to `server`.
>> Note that the bug doesn't exist on macOS and thus no change is required for `os_bsd.cpp`.
>> 
>> Testing:
>> 
>> - run gtest with -Xshare:on on linux-x64
>> - tier1
>
> Calvin Cheung has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Ioi's suggestion

src/hotspot/share/cds/cdsConfig.cpp line 96:

> 94:     const char* subdir = WINDOWS_ONLY("bin") NOT_WINDOWS("lib");
> 95:     tmp.print("%s%s%s%s%s%sclasses", Arguments::get_java_home(), os::file_separator(), subdir,
> 96:               os::file_separator(), JVM_VARIANT, os::file_separator());

I think the above call to os::jvm_path (lines 90-92) can also be removed.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23758#discussion_r1972255748


More information about the hotspot-runtime-dev mailing list