changeset 9651:050821833f00

8131045: Obsolete JNIDetachReleasesMonitors Reviewed-by: dcubed, dsimms, sspitsyn
author dholmes
date Thu, 29 Oct 2015 18:59:22 -0400
parents 110260436fc6
children f81484d852ac
files src/share/vm/runtime/arguments.cpp src/share/vm/runtime/globals.hpp src/share/vm/runtime/thread.cpp
diffstat 3 files changed, 2 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/runtime/arguments.cpp	Thu Oct 29 17:32:08 2015 +0100
+++ b/src/share/vm/runtime/arguments.cpp	Thu Oct 29 18:59:22 2015 -0400
@@ -364,6 +364,7 @@
   { "LazyBootClassLoader",           JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) },
   { "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) },
 
 #ifdef TEST_VERIFY_SPECIAL_JVM_FLAGS
   { "dep > obs",                    JDK_Version::jdk(9), JDK_Version::jdk(8), JDK_Version::undefined() },
--- a/src/share/vm/runtime/globals.hpp	Thu Oct 29 17:32:08 2015 +0100
+++ b/src/share/vm/runtime/globals.hpp	Thu Oct 29 18:59:22 2015 -0400
@@ -1333,9 +1333,6 @@
   product(bool, AllowJNIEnvProxy, false,                                    \
           "Allow JNIEnv proxies for jdbx")                                  \
                                                                             \
-  product(bool, JNIDetachReleasesMonitors, true,                            \
-          "JNI DetachCurrentThread releases monitors owned by thread")      \
-                                                                            \
   product(bool, RestoreMXCSROnJNICalls, false,                              \
           "Restore MXCSR when returning from JNI calls")                    \
                                                                             \
--- a/src/share/vm/runtime/thread.cpp	Thu Oct 29 17:32:08 2015 +0100
+++ b/src/share/vm/runtime/thread.cpp	Thu Oct 29 18:59:22 2015 -0400
@@ -1868,13 +1868,10 @@
   // Optionally release any monitors for regular JavaThread exits. This
   // is provided as a work around for any bugs in monitor enter-exit
   // matching. This can be expensive so it is not enabled by default.
-  // ObjectMonitor::Knob_ExitRelease is a superset of the
-  // JNIDetachReleasesMonitors option.
   //
   // ensure_join() ignores IllegalThreadStateExceptions, and so does
   // ObjectSynchronizer::release_monitors_owned_by_thread().
-  if ((exit_type == jni_detach && JNIDetachReleasesMonitors) ||
-      ObjectMonitor::Knob_ExitRelease) {
+  if (exit_type == jni_detach || ObjectMonitor::Knob_ExitRelease) {
     // Sanity check even though JNI DetachCurrentThread() would have
     // returned JNI_ERR if there was a Java frame. JavaThread exit
     // should be done executing Java code by the time we get here.