mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-24 17:20:06 +00:00
8375457: Test serviceability/jvmti/vthread/SelfSuspendDisablerTest/SelfSuspendDisablerTest.java#default timed out
Reviewed-by: pchilanomate, amenkov
This commit is contained in:
parent
75f8f08f3b
commit
f0da04a40a
@ -1077,11 +1077,19 @@ JvmtiEnv::SuspendAllVirtualThreads(jint except_count, const jthread* except_list
|
||||
JvmtiVTSuspender::register_vthread_resume(thread_oop);
|
||||
}
|
||||
}
|
||||
// Restore resumed state for current thread if it is virtual.
|
||||
// It must be suspended in the suspend_thread call out of disabler context.
|
||||
oop cur_oop = self_tobj();
|
||||
if (cur_oop != nullptr) {
|
||||
assert(JvmtiVTSuspender::is_vthread_suspended(cur_oop), "sanity check");
|
||||
JvmtiVTSuspender::register_vthread_resume(cur_oop);
|
||||
}
|
||||
}
|
||||
// Self suspend after all other suspends if necessary.
|
||||
// Do not use MountUnmountDisabler in context of self suspend to avoid deadlocks.
|
||||
if (self_tobj() != nullptr) {
|
||||
suspend_thread(self_tobj(), current, /* single_suspend */ false);
|
||||
// Register current vthread as suspended with the suspend_thread call.
|
||||
suspend_thread(self_tobj(), current, /* single_suspend */ true);
|
||||
}
|
||||
return JVMTI_ERROR_NONE;
|
||||
} /* end SuspendAllVirtualThreads */
|
||||
|
||||
@ -111,7 +111,7 @@ public class SelfSuspendDisablerTest {
|
||||
t3.start();
|
||||
|
||||
while(!isSuspended(t3)) {
|
||||
sleep(100);
|
||||
sleep(1);
|
||||
}
|
||||
|
||||
testJvmtiThreadState(t3, SUSPENDED);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user