Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8316682: serviceability/jvmti/vthread/SelfSuspendDisablerTest timed out #24269

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions src/hotspot/share/prims/jvmtiThreadState.cpp
Original file line number Diff line number Diff line change
@@ -259,11 +259,9 @@ JvmtiVTMSTransitionDisabler::JvmtiVTMSTransitionDisabler(jthread thread)
_is_self(false),
_thread(thread)
{
#if 0
if (!Continuations::enabled()) {
return; // JvmtiVTMSTransitionDisabler is no-op without virtual threads
}
#endif
if (Thread::current_or_null() == nullptr) {
return; // Detached thread, can be a call from Agent_OnLoad.
}
@@ -300,11 +298,9 @@ JvmtiVTMSTransitionDisabler::JvmtiVTMSTransitionDisabler(bool is_SR)
_is_self(false),
_thread(nullptr)
{
#if 0
if (!Continuations::enabled()) {
return; // JvmtiVTMSTransitionDisabler is no-op without virtual threads
}
#endif
if (Thread::current_or_null() == nullptr) {
return; // Detached thread, can be a call from Agent_OnLoad.
}
@@ -318,11 +314,9 @@ JvmtiVTMSTransitionDisabler::JvmtiVTMSTransitionDisabler(bool is_SR)
}

JvmtiVTMSTransitionDisabler::~JvmtiVTMSTransitionDisabler() {
#if 0
if (!Continuations::enabled()) {
return; // JvmtiVTMSTransitionDisabler is a no-op without virtual threads
}
#endif
if (Thread::current_or_null() == nullptr) {
return; // Detached thread, can be a call from Agent_OnLoad.
}
4 changes: 1 addition & 3 deletions src/hotspot/share/runtime/handshake.cpp
Original file line number Diff line number Diff line change
@@ -778,12 +778,10 @@ bool HandshakeState::suspend() {
if (_handshakee == self) {
// If target is the current thread we can bypass the handshake machinery
// and just suspend directly
JavaThreadState jts = self->thread_state();
self->set_thread_state(_thread_blocked);
ThreadBlockInVM tbivm(self);
MutexLocker ml(&_lock, Mutex::_no_safepoint_check_flag);
set_suspended(true);
do_self_suspend();
self->set_thread_state(jts);
return true;
} else {
SuspendThreadHandshake st;