Obsolete/remove unused UseBsdPosixThreadCPUClocks

Christoph Dreis christoph.dreis at freenet.de
Sat Jun 6 18:54:17 UTC 2020


Hi,

Please forgive me if this is not the correct mailing list.

I've stumbled upon UseBsdPosixThreadCPUClocks that seems unused in the code.

I don't know what the process for already unused flags is.
E.g. if they need to be deprecated first or can be removed directly.

I've prepared two patches - one for each option:

===== REMOVAL PATCH =====
--- a/src/hotspot/os/bsd/globals_bsd.hpp        Sat Jun 06 08:13:40 2020 +0000
+++ b/src/hotspot/os/bsd/globals_bsd.hpp        Sat Jun 06 20:25:58 2020 +0200
@@ -40,11 +40,6 @@
                                                                                 \
   product(bool, UseOprofile, false,                                             \
         "enable support for Oprofile profiler")                                 \
-                                                                                \
-  /*  NB: The default value of UseBsdPosixThreadCPUClocks may be  */            \
-  /*  overridden in Arguments::parse_each_vm_init_arg.            */            \
-  product(bool, UseBsdPosixThreadCPUClocks, true,                               \
-          "enable fast Bsd Posix clocks where available")                       \

===== DEPRECATION PATCH =====
--- a/src/hotspot/share/runtime/arguments.cpp   Sat Jun 06 08:13:40 2020 +0000
+++ b/src/hotspot/share/runtime/arguments.cpp   Sat Jun 06 20:48:05 2020 +0200
@@ -535,6 +535,7 @@
   { "PrintPreciseBiasedLockingStatistics", JDK_Version::jdk(15), JDK_Version::jdk(16), JDK_Version::jdk(17) },
   { "InitialBootClassLoaderMetaspaceSize", JDK_Version::jdk(15), JDK_Version::jdk(16), JDK_Version::jdk(17) },
   { "UseLargePagesInMetaspace",            JDK_Version::jdk(15), JDK_Version::jdk(16), JDK_Version::jdk(17) },
+  { "UseBsdPosixThreadCPUClocks",          JDK_Version::jdk(15), JDK_Version::jdk(16), JDK_Version::jdk(17) },

   // --- Deprecated alias flags (see also aliased_jvm_flags) - sorted by obsolete_in then expired_in:
   { "DefaultMaxRAMFraction",        JDK_Version::jdk(8),  JDK_Version::undefined(), JDK_Version::undefined() },

In case you think this is worthwhile, I'd appreciate if someone can sponsor this change.
(I've contributed to core-libs before, so CLA is signed)

Cheers,
Christoph




More information about the hotspot-runtime-dev mailing list