mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8213137: Remove static initialization of monitor/mutex instances
Moved to the global mutex list in mutexLocker Reviewed-by: tschatzl, dcubed, rehn, eosterlund
This commit is contained in:
parent
fdfbfb2f8b
commit
eac28d7fae
13 changed files with 37 additions and 44 deletions
|
@ -106,7 +106,7 @@ Monitor* Notify_lock = NULL;
|
|||
Mutex* ProfilePrint_lock = NULL;
|
||||
Mutex* ExceptionCache_lock = NULL;
|
||||
Mutex* OsrList_lock = NULL;
|
||||
|
||||
Mutex* NMethodSweeperStats_lock = NULL;
|
||||
#ifndef PRODUCT
|
||||
Mutex* FullGCALot_lock = NULL;
|
||||
#endif
|
||||
|
@ -138,6 +138,7 @@ Mutex* JfrStacktrace_lock = NULL;
|
|||
Monitor* JfrMsg_lock = NULL;
|
||||
Mutex* JfrBuffer_lock = NULL;
|
||||
Mutex* JfrStream_lock = NULL;
|
||||
Monitor* JfrThreadSampler_lock = NULL;
|
||||
#endif
|
||||
|
||||
#ifndef SUPPORTS_NATIVE_CX8
|
||||
|
@ -147,6 +148,9 @@ Monitor* CodeHeapStateAnalytics_lock = NULL;
|
|||
|
||||
Mutex* MetaspaceExpand_lock = NULL;
|
||||
Mutex* ClassLoaderDataGraph_lock = NULL;
|
||||
Monitor* ThreadsSMRDelete_lock = NULL;
|
||||
Mutex* SharedDecoder_lock = NULL;
|
||||
Mutex* DCmdFactory_lock = NULL;
|
||||
|
||||
#define MAX_NUM_MUTEX 128
|
||||
static Monitor * _mutex_array[MAX_NUM_MUTEX];
|
||||
|
@ -243,7 +247,7 @@ void mutex_init() {
|
|||
def(JmethodIdCreation_lock , PaddedMutex , leaf, true, Monitor::_safepoint_check_always); // used for creating jmethodIDs.
|
||||
|
||||
def(SystemDictionary_lock , PaddedMonitor, leaf, true, Monitor::_safepoint_check_always); // lookups done by VM thread
|
||||
def(SharedDictionary_lock , PaddedMutex, leaf, true, Monitor::_safepoint_check_always); // lookups done by VM thread
|
||||
def(SharedDictionary_lock , PaddedMutex , leaf, true, Monitor::_safepoint_check_always); // lookups done by VM thread
|
||||
def(Module_lock , PaddedMutex , leaf+2, true, Monitor::_safepoint_check_always);
|
||||
def(InlineCacheBuffer_lock , PaddedMutex , leaf, true, Monitor::_safepoint_check_always);
|
||||
def(VMStatistic_lock , PaddedMutex , leaf, false, Monitor::_safepoint_check_always);
|
||||
|
@ -318,6 +322,7 @@ void mutex_init() {
|
|||
def(JfrBuffer_lock , PaddedMutex , leaf, true, Monitor::_safepoint_check_never);
|
||||
def(JfrStream_lock , PaddedMutex , leaf+1, true, Monitor::_safepoint_check_never); // ensure to rank lower than 'safepoint'
|
||||
def(JfrStacktrace_lock , PaddedMutex , special, true, Monitor::_safepoint_check_sometimes);
|
||||
def(JfrThreadSampler_lock , PaddedMonitor, leaf, true, Monitor::_safepoint_check_never);
|
||||
#endif
|
||||
|
||||
#ifndef SUPPORTS_NATIVE_CX8
|
||||
|
@ -325,6 +330,11 @@ void mutex_init() {
|
|||
#endif
|
||||
|
||||
def(CodeHeapStateAnalytics_lock , PaddedMutex , leaf, true, Monitor::_safepoint_check_never);
|
||||
|
||||
def(NMethodSweeperStats_lock , PaddedMutex , special, true, Monitor::_safepoint_check_sometimes);
|
||||
def(ThreadsSMRDelete_lock , PaddedMonitor, special, false, Monitor::_safepoint_check_never);
|
||||
def(SharedDecoder_lock , PaddedMutex , native, false, Monitor::_safepoint_check_never);
|
||||
def(DCmdFactory_lock , PaddedMutex , leaf, true, Monitor::_safepoint_check_never);
|
||||
}
|
||||
|
||||
GCMutexLocker::GCMutexLocker(Monitor * mutex) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue