RFR: 8348028: Unable to run gtests with CDS enabled
Magnus Ihse Bursie
ihse at openjdk.org
Wed Feb 26 14:38:52 UTC 2025
On Tue, 25 Feb 2025 00:51:55 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
I've been poking around a bit regarding loading of libjvm.so in relation to static builds (where there are no dynamic library to load). A lot of this code is ancient, poorly documented, and one hand does not know what the other does, so stuff is strangely converted from one format to another without any good reason more than "the rest of the chain seems to expect this".
I have come to the conclusion that the entire process on how we "bootstrap" java up to the point that we can call `JNI_CreateJavaVM` would benefit from a complete rehaul, where we can see the entire picture at once.
Also,
> That presumes you are dealing with a single variant JDK, not one that has both client and server.
Is this even relevant anymore? Afaik, the last platform to have both client and server where 32-bit Windows, which is now removed.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/23758#issuecomment-2685221296
PR Comment: https://git.openjdk.org/jdk/pull/23758#issuecomment-2685226308
More information about the hotspot-runtime-dev
mailing list