8132287: obsolete the "InlineNotify" flag option
authordcubed
Fri, 11 May 2018 11:08:32 -0400
changeset 50083 07015dd8157f
parent 50082 0fbe52a4c3f3
child 50084 44b64fc0baa3
8132287: obsolete the "InlineNotify" flag option Reviewed-by: kvn, dlong, dholmes
src/hotspot/share/opto/library_call.cpp
src/hotspot/share/runtime/arguments.cpp
src/hotspot/share/runtime/globals.hpp
src/hotspot/share/runtime/objectMonitor.cpp
src/hotspot/share/runtime/objectMonitor.hpp
src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/GraalHotSpotVMConfigVersioned.java
--- a/src/hotspot/share/opto/library_call.cpp	Fri May 11 17:50:00 2018 +0800
+++ b/src/hotspot/share/opto/library_call.cpp	Fri May 11 11:08:32 2018 -0400
@@ -52,6 +52,7 @@
 #include "opto/subnode.hpp"
 #include "prims/nativeLookup.hpp"
 #include "prims/unsafe.hpp"
+#include "runtime/objectMonitor.hpp"
 #include "runtime/sharedRuntime.hpp"
 #ifdef TRACE_HAVE_INTRINSICS
 #include "trace/traceMacros.hpp"
@@ -545,7 +546,7 @@
 
   case vmIntrinsics::_notify:
   case vmIntrinsics::_notifyAll:
-    if (InlineNotify) {
+    if (ObjectMonitor::Knob_InlineNotify) {
       return inline_notify(intrinsic_id());
     }
     return false;
--- a/src/hotspot/share/runtime/arguments.cpp	Fri May 11 17:50:00 2018 +0800
+++ b/src/hotspot/share/runtime/arguments.cpp	Fri May 11 11:08:32 2018 -0400
@@ -544,6 +544,7 @@
   { "SharedMiscCodeSize",            JDK_Version::undefined(), JDK_Version::jdk(10), JDK_Version::undefined() },
   { "UseUTCFileTimestamp",           JDK_Version::undefined(), JDK_Version::jdk(11), JDK_Version::jdk(12) },
   { "UseAppCDS",                     JDK_Version::undefined(), JDK_Version::jdk(11), JDK_Version::jdk(12) },
+  { "InlineNotify",                  JDK_Version::undefined(), JDK_Version::jdk(11), JDK_Version::jdk(12) },
 
 #ifdef TEST_VERIFY_SPECIAL_JVM_FLAGS
   { "dep > obs",                    JDK_Version::jdk(9), JDK_Version::jdk(8), JDK_Version::undefined() },
--- a/src/hotspot/share/runtime/globals.hpp	Fri May 11 17:50:00 2018 +0800
+++ b/src/hotspot/share/runtime/globals.hpp	Fri May 11 11:08:32 2018 -0400
@@ -847,8 +847,6 @@
                                                                             \
   experimental(intx, SyncVerbose, 0, "(Unstable)")                          \
                                                                             \
-  diagnostic(bool, InlineNotify, true, "intrinsify subset of notify")       \
-                                                                            \
   experimental(intx, hashCode, 5,                                           \
                "(Unstable) select hashCode generation algorithm")           \
                                                                             \
--- a/src/hotspot/share/runtime/objectMonitor.cpp	Fri May 11 17:50:00 2018 +0800
+++ b/src/hotspot/share/runtime/objectMonitor.cpp	Fri May 11 11:08:32 2018 -0400
@@ -98,13 +98,14 @@
 // The knob* variables are effectively final.  Once set they should
 // never be modified hence.  Consider using __read_mostly with GCC.
 
-int ObjectMonitor::Knob_ExitRelease = 0;
-int ObjectMonitor::Knob_Verbose     = 0;
-int ObjectMonitor::Knob_VerifyInUse = 0;
-int ObjectMonitor::Knob_VerifyMatch = 0;
-int ObjectMonitor::Knob_SpinLimit   = 5000;    // derived by an external tool -
+int ObjectMonitor::Knob_ExitRelease  = 0;
+int ObjectMonitor::Knob_InlineNotify = 1;
+int ObjectMonitor::Knob_Verbose      = 0;
+int ObjectMonitor::Knob_VerifyInUse  = 0;
+int ObjectMonitor::Knob_VerifyMatch  = 0;
+int ObjectMonitor::Knob_SpinLimit    = 5000;    // derived by an external tool -
+
 static int Knob_ReportSettings      = 0;
-
 static int Knob_SpinBase            = 0;       // Floor AKA SpinMin
 static int Knob_SpinBackOff         = 0;       // spin-loop backoff
 static int Knob_CASPenalty          = -1;      // Penalty for failed CAS
@@ -2319,6 +2320,7 @@
   #define SETKNOB(x) { Knob_##x = kvGetInt(knobs, #x, Knob_##x); }
   SETKNOB(ReportSettings);
   SETKNOB(ExitRelease);
+  SETKNOB(InlineNotify);
   SETKNOB(Verbose);
   SETKNOB(VerifyInUse);
   SETKNOB(VerifyMatch);
--- a/src/hotspot/share/runtime/objectMonitor.hpp	Fri May 11 17:50:00 2018 +0800
+++ b/src/hotspot/share/runtime/objectMonitor.hpp	Fri May 11 11:08:32 2018 -0400
@@ -199,6 +199,7 @@
   static PerfLongVariable * _sync_MonExtant;
 
   static int Knob_ExitRelease;
+  static int Knob_InlineNotify;
   static int Knob_Verbose;
   static int Knob_VerifyInUse;
   static int Knob_VerifyMatch;
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/GraalHotSpotVMConfigVersioned.java	Fri May 11 17:50:00 2018 +0800
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/GraalHotSpotVMConfigVersioned.java	Fri May 11 11:08:32 2018 -0400
@@ -44,7 +44,7 @@
     final boolean useCRC32CIntrinsics = getFlag("UseCRC32CIntrinsics", Boolean.class);
 
     // JDK-8075171
-    final boolean inlineNotify = getFlag("InlineNotify", Boolean.class);
+    final boolean inlineNotify = getFlag("InlineNotify", Boolean.class, true);
 
     // JDK-8046936
     final int javaThreadReservedStackActivationOffset = getFieldOffset("JavaThread::_reserved_stack_activation", Integer.class, "address");