8074355: make MutexLocker smarter about non-JavaThreads

Use safepoint_check_always/safepoint_check_never instead of safepoint_check_sometimes for locks that are taken by JavaThreads and non-JavaThreads

Reviewed-by: dholmes, rehn, dcubed, lmesnik
This commit is contained in:
Coleen Phillimore 2019-05-01 08:56:38 -04:00
parent 0ab425c187
commit 6fb8502b77
10 changed files with 191 additions and 73 deletions

View file

@ -623,10 +623,8 @@ void VMThread::loop() {
}
//
// Notify (potential) waiting Java thread(s) - lock without safepoint
// check so that sneaking is not possible
{ MutexLocker mu(VMOperationRequest_lock,
Mutex::_no_safepoint_check_flag);
// Notify (potential) waiting Java thread(s)
{ MutexLocker mu(VMOperationRequest_lock, Mutex::_no_safepoint_check_flag);
VMOperationRequest_lock->notify_all();
}