Summary
Deprecate the UseOprofile
flag in JDK 25, obsolete it in JDK 26, and expire in JDK 27.
Problem
The VM has supported the Linux OProfile profiler since 2005, however to work properly with OProfile's Linux kernel module (ref lookup_dcookie()
), the VM has to change the way compiled code memory is mapped. That is done under the control of the UseOprofile
flag (default false). Since 2012 OProfile has not needed the kernel module, and it was removed from the kernel in 2021. Consequently this special code and the UseOprofile
flag are not needed.
Solution
Deprecate the UseOprofile
flag in JDK 25, obsolete it in JDK 26, and expire in JDK 27.
Specification
--- 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 094d36d1fef..ca4364d1181 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
- csr of
-
JDK-8345955 Deprecate the UseOprofile flag with a view to removing the legacy oprofile support in the VM
-
- Resolved
-