From c0b82ff2e5b696371de62e0f4fcbba61361fc6b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joel=20Sikstr=C3=B6m?= Date: Mon, 10 Nov 2025 09:41:55 +0000 Subject: [PATCH] 8370843: Deprecate AlwaysActAsServerClassMachine and NeverActAsServerClassMachine Reviewed-by: ayang, kvn --- src/hotspot/share/gc/shared/gc_globals.hpp | 4 +-- src/hotspot/share/runtime/arguments.cpp | 2 ++ src/java.base/share/man/java.md | 40 +++++++++++----------- 3 files changed, 24 insertions(+), 22 deletions(-) diff --git a/src/hotspot/share/gc/shared/gc_globals.hpp b/src/hotspot/share/gc/shared/gc_globals.hpp index 4fb72f4102a..e86a8744847 100644 --- a/src/hotspot/share/gc/shared/gc_globals.hpp +++ b/src/hotspot/share/gc/shared/gc_globals.hpp @@ -263,10 +263,10 @@ "before pushing a continuation entry") \ \ product_pd(bool, NeverActAsServerClassMachine, \ - "Never act like a server-class machine") \ + "(Deprecated) Never act like a server-class machine") \ \ product(bool, AlwaysActAsServerClassMachine, false, \ - "Always act like a server-class machine") \ + "(Deprecated) Always act like a server-class machine") \ \ product(uint64_t, MaxRAM, 0, \ "(Deprecated) Real memory size (in bytes) used to set maximum " \ diff --git a/src/hotspot/share/runtime/arguments.cpp b/src/hotspot/share/runtime/arguments.cpp index 730bb7871e2..79027cf113f 100644 --- a/src/hotspot/share/runtime/arguments.cpp +++ b/src/hotspot/share/runtime/arguments.cpp @@ -537,6 +537,8 @@ static SpecialFlag const special_jvm_flags[] = { { "PSChunkLargeArrays", JDK_Version::jdk(26), JDK_Version::jdk(27), JDK_Version::jdk(28) }, { "MaxRAM", JDK_Version::jdk(26), JDK_Version::jdk(27), JDK_Version::jdk(28) }, { "AggressiveHeap", JDK_Version::jdk(26), JDK_Version::jdk(27), JDK_Version::jdk(28) }, + { "NeverActAsServerClassMachine", JDK_Version::jdk(26), JDK_Version::jdk(27), JDK_Version::jdk(28) }, + { "AlwaysActAsServerClassMachine", JDK_Version::jdk(26), JDK_Version::jdk(27), JDK_Version::jdk(28) }, // --- Deprecated alias flags (see also aliased_jvm_flags) - sorted by obsolete_in then expired_in: { "CreateMinidumpOnCrash", JDK_Version::jdk(9), JDK_Version::undefined(), JDK_Version::undefined() }, diff --git a/src/java.base/share/man/java.md b/src/java.base/share/man/java.md index 0f9d8e89bfc..43719ff619a 100644 --- a/src/java.base/share/man/java.md +++ b/src/java.base/share/man/java.md @@ -1235,26 +1235,6 @@ These `java` options control the runtime behavior of the Java HotSpot VM. This option is only supported on Linux with GNU C Library (glibc). -`-XX:+NeverActAsServerClassMachine` -: Enable the "Client VM emulation" mode which only uses the C1 JIT compiler, - a 32Mb CodeCache and the Serial GC. The maximum amount of memory that the - JVM may use (controlled by the `-XX:MaxRAM=n` flag) is set to 1GB by default. - The string "emulated-client" is added to the JVM version string. - - By default the flag is set to `true` only on Windows in 32-bit mode and - `false` in all other cases. - - The "Client VM emulation" mode will not be enabled if any of the following - flags are used on the command line: - - ``` - -XX:{+|-}TieredCompilation - -XX:CompilationMode=mode - -XX:TieredStopAtLevel=n - -XX:{+|-}EnableJVMCI - -XX:{+|-}UseJVMCICompiler - ``` - `-XX:ObjectAlignmentInBytes=`*alignment* : Sets the memory alignment of Java objects (in bytes). By default, the value is set to 8 bytes. The specified value should be a power of 2, and must be @@ -2951,6 +2931,26 @@ they're used. the configuration of the computer (RAM and CPU). By default, the option is disabled and the heap sizes are configured less aggressively. +`-XX:+NeverActAsServerClassMachine` +: Enable the "Client VM emulation" mode which only uses the C1 JIT compiler, + a 32Mb CodeCache and the Serial GC. The maximum amount of memory that the + JVM may use (controlled by the `-XX:MaxRAM=n` flag) is set to 1GB by default. + The string "emulated-client" is added to the JVM version string. + + By default the flag is set to `true` only on Windows in 32-bit mode and + `false` in all other cases. + + The "Client VM emulation" mode will not be enabled if any of the following + flags are used on the command line: + + ``` + -XX:{+|-}TieredCompilation + -XX:CompilationMode=mode + -XX:TieredStopAtLevel=n + -XX:{+|-}EnableJVMCI + -XX:{+|-}UseJVMCICompiler + ``` + ## Obsolete Java Options These `java` options are still accepted but ignored, and a warning is issued