From 5e26e64cbfa4baf81024efeb57768458e59971f5 Mon Sep 17 00:00:00 2001 From: "Daniel D. Daugherty" Date: Sat, 13 May 2023 14:39:58 +0000 Subject: [PATCH] 8307067: remove broken EnableThreadSMRExtraValidityChecks option Reviewed-by: coleenp, dholmes, sspitsyn, rehn --- src/hotspot/share/prims/jvmtiExport.cpp | 4 ---- src/hotspot/share/runtime/globals.hpp | 3 --- src/hotspot/share/runtime/threadSMR.cpp | 8 ++++---- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/src/hotspot/share/prims/jvmtiExport.cpp b/src/hotspot/share/prims/jvmtiExport.cpp index 0dd00937d1b..32ca314d577 100644 --- a/src/hotspot/share/prims/jvmtiExport.cpp +++ b/src/hotspot/share/prims/jvmtiExport.cpp @@ -829,8 +829,6 @@ JvmtiExport::cv_external_thread_to_JavaThread(ThreadsList * t_list, } // Looks like a live JavaThread at this point. - // We do not check the EnableThreadSMRExtraValidityChecks option - // for this includes() call because JVM/TI's spec is tighter. if (!t_list->includes(java_thread)) { // Not on the JavaThreads list so it is not alive. return JVMTI_ERROR_THREAD_NOT_ALIVE; @@ -872,8 +870,6 @@ JvmtiExport::cv_oop_to_JavaThread(ThreadsList * t_list, oop thread_oop, } // Looks like a live JavaThread at this point. - // We do not check the EnableThreadSMRExtraValidityChecks option - // for this includes() call because JVM/TI's spec is tighter. if (!t_list->includes(java_thread)) { // Not on the JavaThreads list so it is not alive. return JVMTI_ERROR_THREAD_NOT_ALIVE; diff --git a/src/hotspot/share/runtime/globals.hpp b/src/hotspot/share/runtime/globals.hpp index f7b07986f31..222b215a442 100644 --- a/src/hotspot/share/runtime/globals.hpp +++ b/src/hotspot/share/runtime/globals.hpp @@ -953,9 +953,6 @@ const int ObjectAlignmentInBytes = 8; "null (+offset) will not raise a SIGSEGV, i.e.," \ "ImplicitNullChecks don't work (PPC64).") \ \ - product(bool, EnableThreadSMRExtraValidityChecks, true, DIAGNOSTIC, \ - "Enable Thread SMR extra validity checks") \ - \ product(bool, EnableThreadSMRStatistics, trueInDebug, DIAGNOSTIC, \ "Enable Thread SMR Statistics") \ \ diff --git a/src/hotspot/share/runtime/threadSMR.cpp b/src/hotspot/share/runtime/threadSMR.cpp index dd64b129308..b543039653b 100644 --- a/src/hotspot/share/runtime/threadSMR.cpp +++ b/src/hotspot/share/runtime/threadSMR.cpp @@ -824,10 +824,10 @@ bool ThreadsListHandle::cv_internal_thread_to_JavaThread(jobject jthread, // Looks like a live JavaThread at this point. if (java_thread != JavaThread::current()) { - // jthread is not for the current JavaThread so have to verify - // the JavaThread * against the ThreadsList. - if (EnableThreadSMRExtraValidityChecks && !includes(java_thread)) { - // Not on the JavaThreads list so it is not alive. + // java_thread is not the current JavaThread so we have to verify it + // against the ThreadsList. + if (!includes(java_thread)) { + // Not on this ThreadsList so it is not protected. return false; } }