Skip to content

Commit a8f662e

Browse files
committed
8303908: Add missing check in VTMS_transition_disable_for_all() for suspend mode
Reviewed-by: sspitsyn, dholmes
1 parent 5685107 commit a8f662e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/hotspot/share/prims/jvmtiThreadState.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,8 @@ JvmtiVTMSTransitionDisabler::VTMS_transition_disable_for_all() {
328328
}
329329
if (_is_SR) {
330330
_SR_mode = true;
331-
while (_VTMS_transition_disable_for_all_count > 0) {
331+
while (_VTMS_transition_disable_for_all_count > 0 ||
332+
_VTMS_transition_disable_for_one_count > 0) {
332333
ml.wait(10); // Wait while there is any active jvmtiVTMSTransitionDisabler.
333334
}
334335
}
@@ -369,7 +370,7 @@ JvmtiVTMSTransitionDisabler::VTMS_transition_enable_for_one() {
369370
MonitorLocker ml(JvmtiVTMSTransition_lock);
370371
java_lang_Thread::dec_VTMS_transition_disable_count(vth());
371372
Atomic::dec(&_VTMS_transition_disable_for_one_count);
372-
if (_VTMS_transition_disable_for_one_count == 0 || _is_SR) {
373+
if (_VTMS_transition_disable_for_one_count == 0) {
373374
ml.notify_all();
374375
}
375376
#ifdef ASSERT

0 commit comments

Comments
 (0)