8209850: Allow NamedThreads to use GlobalCounter critical sections

Add NamedThreads iterator and make GlobalCounter use it.

Reviewed-by: eosterlund, rehn
This commit is contained in:
Kim Barrett 2018-08-23 18:14:53 -04:00
parent 8b138c684a
commit 23f0fb4cde
11 changed files with 458 additions and 69 deletions

View file

@ -76,6 +76,7 @@ Monitor* VMOperationRequest_lock = NULL;
Monitor* Safepoint_lock = NULL;
Monitor* SerializePage_lock = NULL;
Monitor* Threads_lock = NULL;
Mutex* NamedThreadsList_lock = NULL;
Monitor* CGC_lock = NULL;
Monitor* STS_lock = NULL;
Monitor* FullGCCount_lock = NULL;
@ -256,6 +257,7 @@ void mutex_init() {
def(Safepoint_lock , PaddedMonitor, safepoint, true, Monitor::_safepoint_check_sometimes); // locks SnippetCache_lock/Threads_lock
def(Threads_lock , PaddedMonitor, barrier, true, Monitor::_safepoint_check_sometimes);
def(NamedThreadsList_lock , PaddedMutex, leaf, true, Monitor::_safepoint_check_never);
def(VMOperationQueue_lock , PaddedMonitor, nonleaf, true, Monitor::_safepoint_check_sometimes); // VM_thread allowed to block on these
def(VMOperationRequest_lock , PaddedMonitor, nonleaf, true, Monitor::_safepoint_check_sometimes);