diff --git a/src/hotspot/os/linux/globals_linux.hpp b/src/hotspot/os/linux/globals_linux.hpp index 4afaf5041287b..331690ec3ee51 100644 --- a/src/hotspot/os/linux/globals_linux.hpp +++ b/src/hotspot/os/linux/globals_linux.hpp @@ -36,7 +36,7 @@ constraint) \ \ product(bool, UseOprofile, false, \ - "enable support for Oprofile profiler") \ + "(Deprecated) enable support for Oprofile profiler") \ \ product(bool, UseTransparentHugePages, false, \ "Use MADV_HUGEPAGE for large pages") \ diff --git a/src/hotspot/share/runtime/arguments.cpp b/src/hotspot/share/runtime/arguments.cpp index 094d36d1fef2e..ca4364d1181cd 100644 --- a/src/hotspot/share/runtime/arguments.cpp +++ b/src/hotspot/share/runtime/arguments.cpp @@ -524,6 +524,7 @@ static SpecialFlag const special_jvm_flags[] = { { "UseSharedSpaces", JDK_Version::jdk(18), JDK_Version::jdk(19), JDK_Version::undefined() }, #ifdef LINUX { "UseLinuxPosixThreadCPUClocks", JDK_Version::jdk(24), JDK_Version::jdk(25), JDK_Version::jdk(26) }, + { "UseOprofile", JDK_Version::jdk(25), JDK_Version::jdk(26), JDK_Version::jdk(27) }, #endif { "LockingMode", JDK_Version::jdk(24), JDK_Version::jdk(26), JDK_Version::jdk(27) }, // --- Deprecated alias flags (see also aliased_jvm_flags) - sorted by obsolete_in then expired_in: diff --git a/test/hotspot/jtreg/runtime/CommandLine/VMDeprecatedOptions.java b/test/hotspot/jtreg/runtime/CommandLine/VMDeprecatedOptions.java index bd7663c965de4..96bbf5e9251d1 100644 --- a/test/hotspot/jtreg/runtime/CommandLine/VMDeprecatedOptions.java +++ b/test/hotspot/jtreg/runtime/CommandLine/VMDeprecatedOptions.java @@ -63,6 +63,13 @@ public class VMDeprecatedOptions { {"CreateMinidumpOnCrash", "false"} } )); + if (Platform.isLinux()) { + deprecated.addAll( + Arrays.asList(new String[][] { + {"UseOprofile", "false"} + }) + ); + } if (Platform.isX86() || Platform.isX64()) { deprecated.addAll( Arrays.asList(new String[][] {