Details

    • Type: CSR
    • Status: Closed
    • Priority: P4
    • Resolution: Approved
    • Fix Version/s: 15
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
    • Compatibility Kind:
      behavioral
    • Compatibility Risk:
      minimal
    • Compatibility Risk Description:
      The flag is unlikely to have been used a lot in the wild, especially on platforms other than Solaris.
    • Interface Kind:
      add/remove/modify command line option
    • Scope:
      Implementation

      Description

      Summary

      Obsolete the -XX:+BranchOnRegister flag.

      Problem

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

      Solution

      The BranchOnRegister 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 9207cfe2f936 src/hotspot/share/runtime/arguments.cpp
      --- a/src/hotspot/share/runtime/arguments.cpp   Tue May 26 12:36:59 2020 -0700
      +++ b/src/hotspot/share/runtime/arguments.cpp   Tue May 26 13:37:19 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) },
      +  { "BranchOnRegister",              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 9207cfe2f936 src/hotspot/share/opto/c2_globals.hpp
      --- a/src/hotspot/share/opto/c2_globals.hpp     Tue May 26 12:36:59 2020 -0700
      +++ b/src/hotspot/share/opto/c2_globals.hpp     Tue May 26 13:37:19 2020 -0700
      @@ -357,10 +357,6 @@
                 "Limit of ops to make speculative when using CMOVE")              \
                 range(0, max_jint)                                                \
                                                                               \
      -  /* Set BranchOnRegister == false. See 4965987. */                         \
      -  product(bool, BranchOnRegister, false,                                    \
      -          "Use Sparc V9 branch-on-register opcodes")                        \
      -                                                                            \
         product(bool, UseRDPCForConstantTableBase, false,                         \
                 "Use Sparc RDPC instruction for the constant table base.")        \
                                                                               \

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mikael Mikael Vidstedt
                Reporter:
                mikael Mikael Vidstedt
                Reviewed By:
                David Holmes, Vladimir Kozlov
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: