Skip to content

Commit 494cf45

Browse files
committed
8307067: remove broken EnableThreadSMRExtraValidityChecks option
Backport-of: 5e26e64cbfa4baf81024efeb57768458e59971f5
1 parent d98ac18 commit 494cf45

File tree

3 files changed

+4
-11
lines changed

3 files changed

+4
-11
lines changed

src/hotspot/share/prims/jvmtiExport.cpp

-4
Original file line numberDiff line numberDiff line change
@@ -808,8 +808,6 @@ JvmtiExport::cv_external_thread_to_JavaThread(ThreadsList * t_list,
808808
}
809809
// Looks like a live JavaThread at this point.
810810

811-
// We do not check the EnableThreadSMRExtraValidityChecks option
812-
// for this includes() call because JVM/TI's spec is tighter.
813811
if (!t_list->includes(java_thread)) {
814812
// Not on the JavaThreads list so it is not alive.
815813
return JVMTI_ERROR_THREAD_NOT_ALIVE;
@@ -851,8 +849,6 @@ JvmtiExport::cv_oop_to_JavaThread(ThreadsList * t_list, oop thread_oop,
851849
}
852850
// Looks like a live JavaThread at this point.
853851

854-
// We do not check the EnableThreadSMRExtraValidityChecks option
855-
// for this includes() call because JVM/TI's spec is tighter.
856852
if (!t_list->includes(java_thread)) {
857853
// Not on the JavaThreads list so it is not alive.
858854
return JVMTI_ERROR_THREAD_NOT_ALIVE;

src/hotspot/share/runtime/globals.hpp

-3
Original file line numberDiff line numberDiff line change
@@ -982,9 +982,6 @@ const intx ObjectAlignmentInBytes = 8;
982982
"null (+offset) will not raise a SIGSEGV, i.e.," \
983983
"ImplicitNullChecks don't work (PPC64).") \
984984
\
985-
product(bool, EnableThreadSMRExtraValidityChecks, true, DIAGNOSTIC, \
986-
"Enable Thread SMR extra validity checks") \
987-
\
988985
product(bool, EnableThreadSMRStatistics, trueInDebug, DIAGNOSTIC, \
989986
"Enable Thread SMR Statistics") \
990987
\

src/hotspot/share/runtime/threadSMR.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -801,10 +801,10 @@ bool ThreadsListHandle::cv_internal_thread_to_JavaThread(jobject jthread,
801801
// Looks like a live JavaThread at this point.
802802

803803
if (java_thread != JavaThread::current()) {
804-
// jthread is not for the current JavaThread so have to verify
805-
// the JavaThread * against the ThreadsList.
806-
if (EnableThreadSMRExtraValidityChecks && !includes(java_thread)) {
807-
// Not on the JavaThreads list so it is not alive.
804+
// java_thread is not the current JavaThread so we have to verify it
805+
// against the ThreadsList.
806+
if (!includes(java_thread)) {
807+
// Not on this ThreadsList so it is not protected.
808808
return false;
809809
}
810810
}

0 commit comments

Comments
 (0)