JDK-8245851 : Obsolete UseLWPSynchronization
  • Type: CSR
  • Component: hotspot
  • Sub-Component: runtime
  • Priority: P4
  • Status: Closed
  • Resolution: Approved
  • Fix Versions: 15
  • Submitted: 2020-05-26
  • Updated: 2020-05-27
  • Resolved: 2020-05-27
Related Reports
CSR :  
Relates :  
Description
Summary
-------

Obsolete the -XX:+UseLWPSynchronization flag.

Problem
-------

After the removal of Solaris in JDK-8241787 the UseLWPSynchronization flag no longer has any effect and should be removed. Since the flag was really only useful on Solaris and since all the code it once controlled is now gone the flag will go directly to obsolete, skipping the deprecation step.

Solution
--------

The UseLWPSynchronization flag will be obsoleted, meaning it will still be recognized but a warning will be generated at startup if it is specified on the command line.

Specification
-------------

Mark the flag as obsoleted:

    diff -r c2b1decc8efe src/hotspot/share/runtime/arguments.cpp
    --- a/src/hotspot/share/runtime/arguments.cpp   Tue May 26 10:18:32 2020 -0700
    +++ b/src/hotspot/share/runtime/arguments.cpp   Tue May 26 11:59:46 2020 -0700
    @@ -560,6 +560,7 @@
     #endif // !X86
       { "UseAdaptiveGCBoundary",         JDK_Version::undefined(), JDK_Version::jdk(15), JDK_Version::jdk(16) },
       { "MonitorBound",                  JDK_Version::jdk(14),     JDK_Version::jdk(15), JDK_Version::jdk(16) },
    +  { "UseLWPSynchronization",         JDK_Version::undefined(), JDK_Version::jdk(15), JDK_Version::jdk(16) },

     #ifdef TEST_VERIFY_SPECIAL_JVM_FLAGS
       // These entries will generate build errors.  Their purpose is to test the macros.

And remove it from the global flags:

    diff -r c2b1decc8efe src/hotspot/share/runtime/globals.hpp
    --- a/src/hotspot/share/runtime/globals.hpp     Tue May 26 10:18:32 2020 -0700
    +++ b/src/hotspot/share/runtime/globals.hpp     Tue May 26 12:02:22 2020 -0700
    @@ -683,10 +683,6 @@
                    "Disable the use of stack guard pages if the JVM is loaded " \
                    "on the primordial process thread")                          \
                                                                             \
    -  product(bool, UseLWPSynchronization, true,                                \
    -          "Use LWP-based instead of libthread-based synchronization "       \
    -          "(SPARC only)")                                                   \
    -                                                                            \
       experimental(intx, MonitorUsedDeflationThreshold, 90,                     \
                     "Percentage of used monitors before triggering cleanup "    \
                     "safepoint which deflates monitors (0 is off). "            \
Comments
Moving to Approved.
27-05-2020

I concur. The flag has no use at all on platforms other than Solaris and should never have been a shared flag. Reviewed. Please move to Finalized.
27-05-2020