< prev index next >

src/share/vm/runtime/mutexLocker.cpp

Print this page




  36 // set at JVM startup-time, they should never be subsequently mutated.
  37 // Instead of using pointers to malloc()ed monitors and mutexes we should consider
  38 // eliminating the indirection and using instances instead.
  39 // Consider using GCC's __read_mostly.
  40 
  41 Mutex*   Patching_lock                = NULL;
  42 Monitor* SystemDictionary_lock        = NULL;
  43 Mutex*   PackageTable_lock            = NULL;
  44 Mutex*   CompiledIC_lock              = NULL;
  45 Mutex*   InlineCacheBuffer_lock       = NULL;
  46 Mutex*   VMStatistic_lock             = NULL;
  47 Mutex*   JNIGlobalHandle_lock         = NULL;
  48 Mutex*   JNIHandleBlockFreeList_lock  = NULL;
  49 Mutex*   MemberNameTable_lock         = NULL;
  50 Mutex*   JmethodIdCreation_lock       = NULL;
  51 Mutex*   JfieldIdCreation_lock        = NULL;
  52 Monitor* JNICritical_lock             = NULL;
  53 Mutex*   JvmtiThreadState_lock        = NULL;
  54 Monitor* JvmtiPendingEvent_lock       = NULL;
  55 Monitor* Heap_lock                    = NULL;




  56 Mutex*   ExpandHeap_lock              = NULL;
  57 Mutex*   AdapterHandlerLibrary_lock   = NULL;
  58 Mutex*   SignatureHandlerLibrary_lock = NULL;
  59 Mutex*   VtableStubs_lock             = NULL;
  60 Mutex*   SymbolTable_lock             = NULL;
  61 Mutex*   StringTable_lock             = NULL;
  62 Monitor* StringDedupQueue_lock        = NULL;
  63 Mutex*   StringDedupTable_lock        = NULL;
  64 Monitor* CodeCache_lock               = NULL;
  65 Mutex*   MethodData_lock              = NULL;
  66 Mutex*   TouchedMethodLog_lock        = NULL;
  67 Mutex*   RetData_lock                 = NULL;
  68 Monitor* VMOperationQueue_lock        = NULL;
  69 Monitor* VMOperationRequest_lock      = NULL;
  70 Monitor* Safepoint_lock               = NULL;
  71 Monitor* SerializePage_lock           = NULL;
  72 Monitor* Threads_lock                 = NULL;
  73 Monitor* CGC_lock                     = NULL;
  74 Monitor* STS_lock                     = NULL;
  75 Monitor* SLT_lock                     = NULL;


 185   if (UseG1GC) {
 186 
 187     def(CMark_lock                 , Monitor, nonleaf,     true,  Monitor::_safepoint_check_never);      // coordinate concurrent mark thread
 188     def(CMRegionStack_lock         , Mutex,   leaf,        true,  Monitor::_safepoint_check_never);
 189     def(SATB_Q_FL_lock             , Mutex  , special,     true,  Monitor::_safepoint_check_never);
 190     def(SATB_Q_CBL_mon             , Monitor, nonleaf,     true,  Monitor::_safepoint_check_never);
 191     def(Shared_SATB_Q_lock         , Mutex,   nonleaf,     true,  Monitor::_safepoint_check_never);
 192 
 193     def(DirtyCardQ_FL_lock         , Mutex  , special,     true,  Monitor::_safepoint_check_never);
 194     def(DirtyCardQ_CBL_mon         , Monitor, nonleaf,     true,  Monitor::_safepoint_check_never);
 195     def(Shared_DirtyCardQ_lock     , Mutex,   nonleaf,     true,  Monitor::_safepoint_check_never);
 196 
 197     def(FreeList_lock              , Mutex,   leaf     ,   true,  Monitor::_safepoint_check_never);
 198     def(SecondaryFreeList_lock     , Monitor, leaf     ,   true,  Monitor::_safepoint_check_never);
 199     def(OldSets_lock               , Mutex  , leaf     ,   true,  Monitor::_safepoint_check_never);
 200     def(RootRegionScan_lock        , Monitor, leaf     ,   true,  Monitor::_safepoint_check_never);
 201     def(MMUTracker_lock            , Mutex  , leaf     ,   true,  Monitor::_safepoint_check_never);
 202 
 203     def(StringDedupQueue_lock      , Monitor, leaf,        true,  Monitor::_safepoint_check_never);
 204     def(StringDedupTable_lock      , Mutex  , leaf,        true,  Monitor::_safepoint_check_never);









 205   }
 206   def(ParGCRareEvent_lock          , Mutex  , leaf     ,   true,  Monitor::_safepoint_check_sometimes);
 207   def(DerivedPointerTableGC_lock   , Mutex,   leaf,        true,  Monitor::_safepoint_check_never);
 208   def(CodeCache_lock               , Mutex  , special,     true,  Monitor::_safepoint_check_never);
 209   def(Interrupt_lock               , Monitor, special,     true,  Monitor::_safepoint_check_never);      // used for interrupt processing
 210   def(RawMonitor_lock              , Mutex,   special,     true,  Monitor::_safepoint_check_never);
 211   def(OopMapCacheAlloc_lock        , Mutex,   leaf,        true,  Monitor::_safepoint_check_always);     // used for oop_map_cache allocation.
 212 
 213   def(Patching_lock                , Mutex  , special,     true,  Monitor::_safepoint_check_never);      // used for safepointing and code patching.
 214   def(ObjAllocPost_lock            , Monitor, special,     false, Monitor::_safepoint_check_never);
 215   def(Service_lock                 , Monitor, special,     true,  Monitor::_safepoint_check_never);      // used for service thread operations
 216   def(JmethodIdCreation_lock       , Mutex  , leaf,        true,  Monitor::_safepoint_check_always);     // used for creating jmethodIDs.
 217 
 218   def(SystemDictionary_lock        , Monitor, leaf,        true,  Monitor::_safepoint_check_always);     // lookups done by VM thread
 219   def(PackageTable_lock            , Mutex  , leaf,        false, Monitor::_safepoint_check_always);
 220   def(InlineCacheBuffer_lock       , Mutex  , leaf,        true,  Monitor::_safepoint_check_always);
 221   def(VMStatistic_lock             , Mutex  , leaf,        false, Monitor::_safepoint_check_always);
 222   def(ExpandHeap_lock              , Mutex  , leaf,        true,  Monitor::_safepoint_check_always);     // Used during compilation by VM thread
 223   def(JNIHandleBlockFreeList_lock  , Mutex  , leaf,        true,  Monitor::_safepoint_check_never);      // handles are used by VM thread
 224   def(SignatureHandlerLibrary_lock , Mutex  , leaf,        false, Monitor::_safepoint_check_always);




  36 // set at JVM startup-time, they should never be subsequently mutated.
  37 // Instead of using pointers to malloc()ed monitors and mutexes we should consider
  38 // eliminating the indirection and using instances instead.
  39 // Consider using GCC's __read_mostly.
  40 
  41 Mutex*   Patching_lock                = NULL;
  42 Monitor* SystemDictionary_lock        = NULL;
  43 Mutex*   PackageTable_lock            = NULL;
  44 Mutex*   CompiledIC_lock              = NULL;
  45 Mutex*   InlineCacheBuffer_lock       = NULL;
  46 Mutex*   VMStatistic_lock             = NULL;
  47 Mutex*   JNIGlobalHandle_lock         = NULL;
  48 Mutex*   JNIHandleBlockFreeList_lock  = NULL;
  49 Mutex*   MemberNameTable_lock         = NULL;
  50 Mutex*   JmethodIdCreation_lock       = NULL;
  51 Mutex*   JfieldIdCreation_lock        = NULL;
  52 Monitor* JNICritical_lock             = NULL;
  53 Mutex*   JvmtiThreadState_lock        = NULL;
  54 Monitor* JvmtiPendingEvent_lock       = NULL;
  55 Monitor* Heap_lock                    = NULL;
  56 Monitor* ShenandoahHeap_lock          = NULL;
  57 Monitor* ShenandoahFullGC_lock        = NULL;
  58 Monitor* ShenandoahJNICritical_lock   = NULL;
  59 Monitor* ShenandoahMemProtect_lock    = NULL;
  60 Mutex*   ExpandHeap_lock              = NULL;
  61 Mutex*   AdapterHandlerLibrary_lock   = NULL;
  62 Mutex*   SignatureHandlerLibrary_lock = NULL;
  63 Mutex*   VtableStubs_lock             = NULL;
  64 Mutex*   SymbolTable_lock             = NULL;
  65 Mutex*   StringTable_lock             = NULL;
  66 Monitor* StringDedupQueue_lock        = NULL;
  67 Mutex*   StringDedupTable_lock        = NULL;
  68 Monitor* CodeCache_lock               = NULL;
  69 Mutex*   MethodData_lock              = NULL;
  70 Mutex*   TouchedMethodLog_lock        = NULL;
  71 Mutex*   RetData_lock                 = NULL;
  72 Monitor* VMOperationQueue_lock        = NULL;
  73 Monitor* VMOperationRequest_lock      = NULL;
  74 Monitor* Safepoint_lock               = NULL;
  75 Monitor* SerializePage_lock           = NULL;
  76 Monitor* Threads_lock                 = NULL;
  77 Monitor* CGC_lock                     = NULL;
  78 Monitor* STS_lock                     = NULL;
  79 Monitor* SLT_lock                     = NULL;


 189   if (UseG1GC) {
 190 
 191     def(CMark_lock                 , Monitor, nonleaf,     true,  Monitor::_safepoint_check_never);      // coordinate concurrent mark thread
 192     def(CMRegionStack_lock         , Mutex,   leaf,        true,  Monitor::_safepoint_check_never);
 193     def(SATB_Q_FL_lock             , Mutex  , special,     true,  Monitor::_safepoint_check_never);
 194     def(SATB_Q_CBL_mon             , Monitor, nonleaf,     true,  Monitor::_safepoint_check_never);
 195     def(Shared_SATB_Q_lock         , Mutex,   nonleaf,     true,  Monitor::_safepoint_check_never);
 196 
 197     def(DirtyCardQ_FL_lock         , Mutex  , special,     true,  Monitor::_safepoint_check_never);
 198     def(DirtyCardQ_CBL_mon         , Monitor, nonleaf,     true,  Monitor::_safepoint_check_never);
 199     def(Shared_DirtyCardQ_lock     , Mutex,   nonleaf,     true,  Monitor::_safepoint_check_never);
 200 
 201     def(FreeList_lock              , Mutex,   leaf     ,   true,  Monitor::_safepoint_check_never);
 202     def(SecondaryFreeList_lock     , Monitor, leaf     ,   true,  Monitor::_safepoint_check_never);
 203     def(OldSets_lock               , Mutex  , leaf     ,   true,  Monitor::_safepoint_check_never);
 204     def(RootRegionScan_lock        , Monitor, leaf     ,   true,  Monitor::_safepoint_check_never);
 205     def(MMUTracker_lock            , Mutex  , leaf     ,   true,  Monitor::_safepoint_check_never);
 206 
 207     def(StringDedupQueue_lock      , Monitor, leaf,        true,  Monitor::_safepoint_check_never);
 208     def(StringDedupTable_lock      , Mutex  , leaf,        true,  Monitor::_safepoint_check_never);
 209   }
 210   if (UseShenandoahGC) {
 211     def(SATB_Q_FL_lock             , Mutex  , special,     true,  Monitor::_safepoint_check_never);
 212     def(SATB_Q_CBL_mon             , Monitor, nonleaf,     true,  Monitor::_safepoint_check_never);
 213     def(Shared_SATB_Q_lock         , Mutex,   nonleaf,     true,  Monitor::_safepoint_check_never);
 214     def(ShenandoahFullGC_lock      , Monitor, leaf,        true,  Monitor::_safepoint_check_always);
 215     def(ShenandoahJNICritical_lock , Monitor, nonleaf+1,   false, Monitor::_safepoint_check_never);
 216     def(ShenandoahMemProtect_lock  , Monitor, native,      false, Monitor::_safepoint_check_never);
 217     def(ShenandoahHeap_lock        , Monitor, special,     false, Monitor::_safepoint_check_never);
 218   }
 219   def(ParGCRareEvent_lock          , Mutex  , leaf     ,   true,  Monitor::_safepoint_check_sometimes);
 220   def(DerivedPointerTableGC_lock   , Mutex,   leaf,        true,  Monitor::_safepoint_check_never);
 221   def(CodeCache_lock               , Mutex  , special,     true,  Monitor::_safepoint_check_never);
 222   def(Interrupt_lock               , Monitor, special,     true,  Monitor::_safepoint_check_never);      // used for interrupt processing
 223   def(RawMonitor_lock              , Mutex,   special,     true,  Monitor::_safepoint_check_never);
 224   def(OopMapCacheAlloc_lock        , Mutex,   leaf,        true,  Monitor::_safepoint_check_always);     // used for oop_map_cache allocation.
 225 
 226   def(Patching_lock                , Mutex  , special,     true,  Monitor::_safepoint_check_never);      // used for safepointing and code patching.
 227   def(ObjAllocPost_lock            , Monitor, special,     false, Monitor::_safepoint_check_never);
 228   def(Service_lock                 , Monitor, special,     true,  Monitor::_safepoint_check_never);      // used for service thread operations
 229   def(JmethodIdCreation_lock       , Mutex  , leaf,        true,  Monitor::_safepoint_check_always);     // used for creating jmethodIDs.
 230 
 231   def(SystemDictionary_lock        , Monitor, leaf,        true,  Monitor::_safepoint_check_always);     // lookups done by VM thread
 232   def(PackageTable_lock            , Mutex  , leaf,        false, Monitor::_safepoint_check_always);
 233   def(InlineCacheBuffer_lock       , Mutex  , leaf,        true,  Monitor::_safepoint_check_always);
 234   def(VMStatistic_lock             , Mutex  , leaf,        false, Monitor::_safepoint_check_always);
 235   def(ExpandHeap_lock              , Mutex  , leaf,        true,  Monitor::_safepoint_check_always);     // Used during compilation by VM thread
 236   def(JNIHandleBlockFreeList_lock  , Mutex  , leaf,        true,  Monitor::_safepoint_check_never);      // handles are used by VM thread
 237   def(SignatureHandlerLibrary_lock , Mutex  , leaf,        false, Monitor::_safepoint_check_always);


< prev index next >