RFR: 8350982: -server|-client causes fatal exception on static JDK [v2]
Alan Bateman
alanb at openjdk.org
Mon Mar 10 19:57:00 UTC 2025
On Thu, 6 Mar 2025 02:18:43 GMT, Jiangli Zhou <jiangli at openjdk.org> wrote:
>> Please review the `Arguments::parse_each_vm_init_arg` change to ignore`-server|-client` options, which avoids unrecognized option error on static JDK.
>>
>> On regular JDK, '-server|-client' options are processed/removed from command-line arguments by `CheckJvmType` during `CreateExecutionEnvironment`. That happens before `Arguments::parse_each_vm_init_arg` is called. With jvm.cfg setting, only server vm is known and client is ignored. So specifying '-server' and '-client' in command-line is really a no-op.
>>
>> On static JDK, the VM is statically linked with the launcher, and `CreateExecutionEnvironment` & `CheckJvmType` are not called. As the result, `Arguments::parse_each_vm_init_arg` could see `-server|-client` when running on static JDK, if the options are specified in the command line.
>
> Jiangli Zhou has updated the pull request incrementally with two additional commits since the last revision:
>
> - Remove '-server' from all following tests.
>
> Add @requires vm.flavor == "server" & !vm.emulatedClient since these tests run on c2:
> - compiler/c2/TestReduceAllocationAndHeapDump.java
> - compiler/inlining/InlineBimorphicVirtualCallAfterMorphismChanged.java
>
> These tests already have @requires vm.compiler2.enabled:
> - compiler/c2/TestReduceAllocationAndLoadKlass.java
> - compiler/c2/TestReduceAllocationAndNonExactAllocate.java
> - compiler/c2/TestReduceAllocationAndNullableLoads.java
> - compiler/c2/TestReduceAllocationAndPointerComparisons.java
> - compiler/escapeAnalysis/TestIterativeEA.java
>
> Can run on c1/c2:
> - compiler/escapeAnalysis/TestReduceAllocationAndNonReduciblePhi.java
>
> Already have @requires vm.flavor == "server":
> - compiler/intrinsics/math/TestMinMaxIntrinsics.java
> - compiler/profiling/TestTypeProfiling.java
> - gc/stress/gcbasher/TestGCBasherWithG1.java
> - gc/stress/gcbasher/TestGCBasherWithParallel.java
> - gc/stress/gcbasher/TestGCBasherWithSerial.java
>
> Not compiler specific:
> - runtime/CDSCompressedKPtrs/XShareAuto.java
> - Revert src/hotspot/share/runtime/arguments.cpp.
Marked as reviewed by alanb (Reviewer).
-------------
PR Review: https://git.openjdk.org/jdk/pull/23881#pullrequestreview-2672048988
More information about the hotspot-compiler-dev
mailing list