8141024: [Solaris] Obsolete UseAltSigs

Reviewed-by: dcubed, ddmitriev
diff --git a/hotspot/src/os/solaris/vm/jvm_solaris.h b/hotspot/src/os/solaris/vm/jvm_solaris.h
index 5e4c41e..e961d36 100644
--- a/hotspot/src/os/solaris/vm/jvm_solaris.h
+++ b/hotspot/src/os/solaris/vm/jvm_solaris.h
@@ -91,10 +91,6 @@
 #define SHUTDOWN1_SIGNAL SIGHUP            /* Shutdown Hooks support.    */
 #define SHUTDOWN2_SIGNAL SIGINT
 #define SHUTDOWN3_SIGNAL SIGTERM
-/* alternative signals used with -XX:+UseAltSigs (or for backward
-   compatibility with 1.2, -Xusealtsigs) flag. Chosen to be
-   unlikely to conflict with applications embedding the vm */
-#define ALT_ASYNC_SIGNAL     (SIGRTMIN + SIGRTMAX)/2  /* alternate async signal */
 
 /* With 1.4.1 libjsig added versioning: used in os_solaris.cpp and jsig.c */
 #define JSIG_VERSION_1_4_1   0x30140100
diff --git a/hotspot/src/os/solaris/vm/os_solaris.cpp b/hotspot/src/os/solaris/vm/os_solaris.cpp
index 36ee014..de90c5c 100644
--- a/hotspot/src/os/solaris/vm/os_solaris.cpp
+++ b/hotspot/src/os/solaris/vm/os_solaris.cpp
@@ -997,9 +997,8 @@
 }
 
 // defined for >= Solaris 10. This allows builds on earlier versions
-// of Solaris to take advantage of the newly reserved Solaris JVM signals
-// With SIGJVM1, SIGJVM2, ASYNC_SIGNAL is SIGJVM2 and -XX:+UseAltSigs does
-// nothing since these should have no conflict. Previously INTERRUPT_SIGNAL
+// of Solaris to take advantage of the newly reserved Solaris JVM signals.
+// With SIGJVM1, SIGJVM2, ASYNC_SIGNAL is SIGJVM2. Previously INTERRUPT_SIGNAL
 // was SIGJVM1.
 //
 #if !defined(SIGJVM1)
@@ -1053,13 +1052,9 @@
   sigaddset(&unblocked_sigs, SIGBUS);
   sigaddset(&unblocked_sigs, SIGFPE);
 
-  if (isJVM1available) {
-    os::Solaris::set_SIGasync(SIGJVM2);
-  } else if (UseAltSigs) {
-    os::Solaris::set_SIGasync(ALT_ASYNC_SIGNAL);
-  } else {
-    os::Solaris::set_SIGasync(ASYNC_SIGNAL);
-  }
+  // Always true on Solaris 10+
+  guarantee(isJVM1available(), "SIGJVM1/2 missing!");
+  os::Solaris::set_SIGasync(SIGJVM2);
 
   sigaddset(&unblocked_sigs, os::Solaris::SIGasync());
 
@@ -3922,7 +3917,7 @@
         // save the old handler in jvm
         save_preinstalled_handler(sig, oldAct);
       } else {
-        vm_exit_during_initialization("Signal chaining not allowed for VM interrupt signal, try -XX:+UseAltSigs.");
+        vm_exit_during_initialization("Signal chaining not allowed for VM interrupt signal.");
       }
       // libjsig also interposes the sigaction() call below and saves the
       // old sigaction on it own.
@@ -3991,7 +3986,7 @@
     DO_SIGNAL_CHECK(BREAK_SIGNAL);
   }
 
-  // See comments above for using JVM1/JVM2 and UseAltSigs
+  // See comments above for using JVM1/JVM2
   DO_SIGNAL_CHECK(os::Solaris::SIGasync());
 
 }
diff --git a/hotspot/src/share/vm/runtime/arguments.cpp b/hotspot/src/share/vm/runtime/arguments.cpp
index 0efd30b..ca98eb8 100644
--- a/hotspot/src/share/vm/runtime/arguments.cpp
+++ b/hotspot/src/share/vm/runtime/arguments.cpp
@@ -366,6 +366,7 @@
   { "StarvationMonitorInterval",     JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) },
   { "PreInflateSpin",                JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) },
   { "JNIDetachReleasesMonitors",     JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) },
+  { "UseAltSigs",                    JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) },
 
 #ifdef TEST_VERIFY_SPECIAL_JVM_FLAGS
   { "dep > obs",                    JDK_Version::jdk(9), JDK_Version::jdk(8), JDK_Version::undefined() },
@@ -2949,11 +2950,12 @@
                        round_to((int)long_ThreadStackSize, K) / K) != Flag::SUCCESS) {
         return JNI_EINVAL;
       }
-    // -Xoss, -Xsqnopause, -Xoptimize, -Xboundthreads
+    // -Xoss, -Xsqnopause, -Xoptimize, -Xboundthreads, -Xusealtsigs
     } else if (match_option(option, "-Xoss", &tail) ||
                match_option(option, "-Xsqnopause") ||
                match_option(option, "-Xoptimize") ||
-               match_option(option, "-Xboundthreads")) {
+               match_option(option, "-Xboundthreads") ||
+               match_option(option, "-Xusealtsigs")) {
       // All these options are deprecated in JDK 9 and will be removed in a future release
       char version[256];
       JDK_Version::jdk(9).to_string(version, sizeof(version));
@@ -3036,11 +3038,6 @@
       if (FLAG_SET_CMDLINE(bool, ReduceSignalUsage, true) != Flag::SUCCESS) {
         return JNI_EINVAL;
       }
-    } else if (match_option(option, "-Xusealtsigs")) {
-          // change default internal VM signals used - lower case for back compat
-      if (FLAG_SET_CMDLINE(bool, UseAltSigs, true) != Flag::SUCCESS) {
-        return JNI_EINVAL;
-      }
     // -Xprof
     } else if (match_option(option, "-Xprof")) {
 #if INCLUDE_FPROF
diff --git a/hotspot/src/share/vm/runtime/globals.hpp b/hotspot/src/share/vm/runtime/globals.hpp
index 49153c0..fb61f55 100644
--- a/hotspot/src/share/vm/runtime/globals.hpp
+++ b/hotspot/src/share/vm/runtime/globals.hpp
@@ -1334,10 +1334,6 @@
           "Use signal-chaining to invoke signal handlers installed "        \
           "by the application (Solaris & Linux only)")                      \
                                                                             \
-  product(bool, UseAltSigs, false,                                          \
-          "Use alternate signals instead of SIGUSR1 & SIGUSR2 for VM "      \
-          "internal signals (Solaris only)")                                \
-                                                                            \
   product(bool, AllowJNIEnvProxy, false,                                    \
           "Allow JNIEnv proxies for jdbx")                                  \
                                                                             \