src/hotspot/share/runtime/mutexLocker.cpp
changeset 55740 b3ff56f955c8
parent 55498 e64383344f14
child 57699 4aea554692aa
equal deleted inserted replaced
55739:ba2bd51ce67e 55740:b3ff56f955c8
    51 Mutex*   JNIWeakAlloc_lock            = NULL;
    51 Mutex*   JNIWeakAlloc_lock            = NULL;
    52 Mutex*   JNIWeakActive_lock           = NULL;
    52 Mutex*   JNIWeakActive_lock           = NULL;
    53 Mutex*   StringTableWeakAlloc_lock    = NULL;
    53 Mutex*   StringTableWeakAlloc_lock    = NULL;
    54 Mutex*   StringTableWeakActive_lock   = NULL;
    54 Mutex*   StringTableWeakActive_lock   = NULL;
    55 Mutex*   JNIHandleBlockFreeList_lock  = NULL;
    55 Mutex*   JNIHandleBlockFreeList_lock  = NULL;
       
    56 Mutex*   VMGlobalAlloc_lock           = NULL;
       
    57 Mutex*   VMGlobalActive_lock          = NULL;
    56 Mutex*   VMWeakAlloc_lock             = NULL;
    58 Mutex*   VMWeakAlloc_lock             = NULL;
    57 Mutex*   VMWeakActive_lock            = NULL;
    59 Mutex*   VMWeakActive_lock            = NULL;
    58 Mutex*   ResolvedMethodTableWeakAlloc_lock  = NULL;
    60 Mutex*   ResolvedMethodTableWeakAlloc_lock  = NULL;
    59 Mutex*   ResolvedMethodTableWeakActive_lock = NULL;
    61 Mutex*   ResolvedMethodTableWeakActive_lock = NULL;
    60 Mutex*   JmethodIdCreation_lock       = NULL;
    62 Mutex*   JmethodIdCreation_lock       = NULL;
   159 Mutex*   DumpTimeTable_lock           = NULL;
   161 Mutex*   DumpTimeTable_lock           = NULL;
   160 #endif // INCLUDE_CDS
   162 #endif // INCLUDE_CDS
   161 
   163 
   162 #if INCLUDE_JVMCI
   164 #if INCLUDE_JVMCI
   163 Monitor* JVMCI_lock                   = NULL;
   165 Monitor* JVMCI_lock                   = NULL;
   164 Mutex*   JVMCIGlobalAlloc_lock        = NULL;
       
   165 Mutex*   JVMCIGlobalActive_lock       = NULL;
       
   166 #endif
   166 #endif
   167 
   167 
   168 
   168 
   169 #define MAX_NUM_MUTEX 128
   169 #define MAX_NUM_MUTEX 128
   170 static Monitor * _mutex_array[MAX_NUM_MUTEX];
   170 static Monitor * _mutex_array[MAX_NUM_MUTEX];
   214   def(tty_lock                     , PaddedMutex  , tty,         true,  Monitor::_safepoint_check_never);      // allow to lock in VM
   214   def(tty_lock                     , PaddedMutex  , tty,         true,  Monitor::_safepoint_check_never);      // allow to lock in VM
   215 
   215 
   216   def(CGC_lock                     , PaddedMonitor, special,     true,  Monitor::_safepoint_check_never);      // coordinate between fore- and background GC
   216   def(CGC_lock                     , PaddedMonitor, special,     true,  Monitor::_safepoint_check_never);      // coordinate between fore- and background GC
   217   def(STS_lock                     , PaddedMonitor, leaf,        true,  Monitor::_safepoint_check_never);
   217   def(STS_lock                     , PaddedMonitor, leaf,        true,  Monitor::_safepoint_check_never);
   218 
   218 
   219   def(VMWeakAlloc_lock             , PaddedMutex  , vmweak,      true,  Monitor::_safepoint_check_never);
   219   def(VMGlobalAlloc_lock           , PaddedMutex  , oopstorage,  true,  Monitor::_safepoint_check_never);
   220   def(VMWeakActive_lock            , PaddedMutex  , vmweak-1,    true,  Monitor::_safepoint_check_never);
   220   def(VMGlobalActive_lock          , PaddedMutex  , oopstorage-1,true,  Monitor::_safepoint_check_never);
   221 
   221 
   222   def(StringTableWeakAlloc_lock    , PaddedMutex  , vmweak,      true,  Monitor::_safepoint_check_never);
   222   def(VMWeakAlloc_lock             , PaddedMutex  , oopstorage,  true,  Monitor::_safepoint_check_never);
   223   def(StringTableWeakActive_lock   , PaddedMutex  , vmweak-1,    true,  Monitor::_safepoint_check_never);
   223   def(VMWeakActive_lock            , PaddedMutex  , oopstorage-1,true,  Monitor::_safepoint_check_never);
   224 
   224 
   225   def(ResolvedMethodTableWeakAlloc_lock    , PaddedMutex  , vmweak,      true,  Monitor::_safepoint_check_never);
   225   def(StringTableWeakAlloc_lock    , PaddedMutex  , oopstorage,  true,  Monitor::_safepoint_check_never);
   226   def(ResolvedMethodTableWeakActive_lock   , PaddedMutex  , vmweak-1,    true,  Monitor::_safepoint_check_never);
   226   def(StringTableWeakActive_lock   , PaddedMutex  , oopstorage-1,true,  Monitor::_safepoint_check_never);
       
   227 
       
   228   def(ResolvedMethodTableWeakAlloc_lock    , PaddedMutex  , oopstorage,   true,  Monitor::_safepoint_check_never);
       
   229   def(ResolvedMethodTableWeakActive_lock   , PaddedMutex  , oopstorage-1, true,  Monitor::_safepoint_check_never);
   227 
   230 
   228   def(FullGCCount_lock             , PaddedMonitor, leaf,        true,  Monitor::_safepoint_check_never);      // in support of ExplicitGCInvokesConcurrent
   231   def(FullGCCount_lock             , PaddedMonitor, leaf,        true,  Monitor::_safepoint_check_never);      // in support of ExplicitGCInvokesConcurrent
   229   if (UseG1GC) {
   232   if (UseG1GC) {
   230     def(DirtyCardQ_CBL_mon         , PaddedMonitor, access,      true,  Monitor::_safepoint_check_never);
   233     def(DirtyCardQ_CBL_mon         , PaddedMonitor, access,      true,  Monitor::_safepoint_check_never);
   231     def(Shared_DirtyCardQ_lock     , PaddedMutex  , access + 1,  true,  Monitor::_safepoint_check_never);
   234     def(Shared_DirtyCardQ_lock     , PaddedMutex  , access + 1,  true,  Monitor::_safepoint_check_never);
   354   def(CDSClassFileStream_lock      , PaddedMutex  , max_nonleaf, false, Monitor::_safepoint_check_always);
   357   def(CDSClassFileStream_lock      , PaddedMutex  , max_nonleaf, false, Monitor::_safepoint_check_always);
   355 #endif
   358 #endif
   356 
   359 
   357 #if INCLUDE_JVMCI
   360 #if INCLUDE_JVMCI
   358   def(JVMCI_lock                   , PaddedMonitor, nonleaf+2,   true,  Monitor::_safepoint_check_always);
   361   def(JVMCI_lock                   , PaddedMonitor, nonleaf+2,   true,  Monitor::_safepoint_check_always);
   359   def(JVMCIGlobalAlloc_lock        , PaddedMutex  , nonleaf,     true,  Monitor::_safepoint_check_never);
       
   360   def(JVMCIGlobalActive_lock       , PaddedMutex  , nonleaf-1,   true,  Monitor::_safepoint_check_never);
       
   361 #endif
   362 #endif
   362   def(DumpTimeTable_lock           , PaddedMutex  , leaf,        true,  Monitor::_safepoint_check_never);
   363   def(DumpTimeTable_lock           , PaddedMutex  , leaf,        true,  Monitor::_safepoint_check_never);
   363 #endif // INCLUDE_CDS
   364 #endif // INCLUDE_CDS
   364 }
   365 }
   365 
   366