src/share/vm/runtime/mutexLocker.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File 8014013 Sdiff src/share/vm/runtime

src/share/vm/runtime/mutexLocker.cpp

Print this page




  28 #include "runtime/thread.inline.hpp"
  29 #include "runtime/threadLocalStorage.hpp"
  30 #include "runtime/vmThread.hpp"
  31 
  32 // Mutexes used in the VM (see comment in mutexLocker.hpp):
  33 //
  34 // Note that the following pointers are effectively final -- after having been
  35 // set at JVM startup-time, they should never be subsequently mutated.
  36 // Instead of using pointers to malloc()ed monitors and mutexes we should consider
  37 // eliminating the indirection and using instances instead.
  38 // Consider using GCC's __read_mostly.
  39 
  40 Mutex*   Patching_lock                = NULL;
  41 Monitor* SystemDictionary_lock        = NULL;
  42 Mutex*   PackageTable_lock            = NULL;
  43 Mutex*   CompiledIC_lock              = NULL;
  44 Mutex*   InlineCacheBuffer_lock       = NULL;
  45 Mutex*   VMStatistic_lock             = NULL;
  46 Mutex*   JNIGlobalHandle_lock         = NULL;
  47 Mutex*   JNIHandleBlockFreeList_lock  = NULL;
  48 Mutex*   JNICachedItableIndex_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 Mutex*   CodeCache_lock               = NULL;
  63 Mutex*   MethodData_lock              = NULL;
  64 Mutex*   RetData_lock                 = NULL;
  65 Monitor* VMOperationQueue_lock        = NULL;
  66 Monitor* VMOperationRequest_lock      = NULL;
  67 Monitor* Safepoint_lock               = NULL;
  68 Monitor* SerializePage_lock           = NULL;


 236 
 237   def(Safepoint_lock               , Monitor, safepoint,   true ); // locks SnippetCache_lock/Threads_lock
 238 
 239   def(Threads_lock                 , Monitor, barrier,     true );
 240 
 241   def(VMOperationQueue_lock        , Monitor, nonleaf,     true ); // VM_thread allowed to block on these
 242   def(VMOperationRequest_lock      , Monitor, nonleaf,     true );
 243   def(RetData_lock                 , Mutex  , nonleaf,     false);
 244   def(Terminator_lock              , Monitor, nonleaf,     true );
 245   def(VtableStubs_lock             , Mutex  , nonleaf,     true );
 246   def(Notify_lock                  , Monitor, nonleaf,     true );
 247   def(JNIGlobalHandle_lock         , Mutex  , nonleaf,     true ); // locks JNIHandleBlockFreeList_lock
 248   def(JNICritical_lock             , Monitor, nonleaf,     true ); // used for JNI critical regions
 249   def(AdapterHandlerLibrary_lock   , Mutex  , nonleaf,     true);
 250   if (UseConcMarkSweepGC) {
 251     def(SLT_lock                   , Monitor, nonleaf,     false );
 252                     // used in CMS GC for locking PLL lock
 253   }
 254   def(Heap_lock                    , Monitor, nonleaf+1,   false);
 255   def(JfieldIdCreation_lock        , Mutex  , nonleaf+1,   true ); // jfieldID, Used in VM_Operation
 256   def(JNICachedItableIndex_lock    , Mutex  , nonleaf+1,   false); // Used to cache an itable index during JNI invoke
 257   def(MemberNameTable_lock         , Mutex  , nonleaf+1,   false); // Used to protect MemberNameTable
 258 
 259   def(CompiledIC_lock              , Mutex  , nonleaf+2,   false); // locks VtableStubs_lock, InlineCacheBuffer_lock
 260   def(CompileTaskAlloc_lock        , Mutex  , nonleaf+2,   true );
 261   def(CompileStatistics_lock       , Mutex  , nonleaf+2,   false);
 262   def(MultiArray_lock              , Mutex  , nonleaf+2,   false); // locks SymbolTable_lock
 263 
 264   def(JvmtiThreadState_lock        , Mutex  , nonleaf+2,   false); // Used by JvmtiThreadState/JvmtiEventController
 265   def(JvmtiPendingEvent_lock       , Monitor, nonleaf,     false); // Used by JvmtiCodeBlobEvents
 266   def(Management_lock              , Mutex  , nonleaf+2,   false); // used for JVM management
 267 
 268   def(Compile_lock                 , Mutex  , nonleaf+3,   true );
 269   def(MethodData_lock              , Mutex  , nonleaf+3,   false);
 270 
 271   def(MethodCompileQueue_lock      , Monitor, nonleaf+4,   true );
 272   def(Debug2_lock                  , Mutex  , nonleaf+4,   true );
 273   def(Debug3_lock                  , Mutex  , nonleaf+4,   true );
 274   def(ProfileVM_lock               , Monitor, special,   false); // used for profiling of the VMThread
 275   def(CompileThread_lock           , Monitor, nonleaf+5,   false );
 276   def(PeriodicTask_lock            , Monitor, nonleaf+5,   true);




  28 #include "runtime/thread.inline.hpp"
  29 #include "runtime/threadLocalStorage.hpp"
  30 #include "runtime/vmThread.hpp"
  31 
  32 // Mutexes used in the VM (see comment in mutexLocker.hpp):
  33 //
  34 // Note that the following pointers are effectively final -- after having been
  35 // set at JVM startup-time, they should never be subsequently mutated.
  36 // Instead of using pointers to malloc()ed monitors and mutexes we should consider
  37 // eliminating the indirection and using instances instead.
  38 // Consider using GCC's __read_mostly.
  39 
  40 Mutex*   Patching_lock                = NULL;
  41 Monitor* SystemDictionary_lock        = NULL;
  42 Mutex*   PackageTable_lock            = NULL;
  43 Mutex*   CompiledIC_lock              = NULL;
  44 Mutex*   InlineCacheBuffer_lock       = NULL;
  45 Mutex*   VMStatistic_lock             = NULL;
  46 Mutex*   JNIGlobalHandle_lock         = NULL;
  47 Mutex*   JNIHandleBlockFreeList_lock  = NULL;

  48 Mutex*   MemberNameTable_lock         = NULL;
  49 Mutex*   JmethodIdCreation_lock       = NULL;
  50 Mutex*   JfieldIdCreation_lock        = NULL;
  51 Monitor* JNICritical_lock             = NULL;
  52 Mutex*   JvmtiThreadState_lock        = NULL;
  53 Monitor* JvmtiPendingEvent_lock       = NULL;
  54 Monitor* Heap_lock                    = NULL;
  55 Mutex*   ExpandHeap_lock              = NULL;
  56 Mutex*   AdapterHandlerLibrary_lock   = NULL;
  57 Mutex*   SignatureHandlerLibrary_lock = NULL;
  58 Mutex*   VtableStubs_lock             = NULL;
  59 Mutex*   SymbolTable_lock             = NULL;
  60 Mutex*   StringTable_lock             = NULL;
  61 Mutex*   CodeCache_lock               = NULL;
  62 Mutex*   MethodData_lock              = NULL;
  63 Mutex*   RetData_lock                 = NULL;
  64 Monitor* VMOperationQueue_lock        = NULL;
  65 Monitor* VMOperationRequest_lock      = NULL;
  66 Monitor* Safepoint_lock               = NULL;
  67 Monitor* SerializePage_lock           = NULL;


 235 
 236   def(Safepoint_lock               , Monitor, safepoint,   true ); // locks SnippetCache_lock/Threads_lock
 237 
 238   def(Threads_lock                 , Monitor, barrier,     true );
 239 
 240   def(VMOperationQueue_lock        , Monitor, nonleaf,     true ); // VM_thread allowed to block on these
 241   def(VMOperationRequest_lock      , Monitor, nonleaf,     true );
 242   def(RetData_lock                 , Mutex  , nonleaf,     false);
 243   def(Terminator_lock              , Monitor, nonleaf,     true );
 244   def(VtableStubs_lock             , Mutex  , nonleaf,     true );
 245   def(Notify_lock                  , Monitor, nonleaf,     true );
 246   def(JNIGlobalHandle_lock         , Mutex  , nonleaf,     true ); // locks JNIHandleBlockFreeList_lock
 247   def(JNICritical_lock             , Monitor, nonleaf,     true ); // used for JNI critical regions
 248   def(AdapterHandlerLibrary_lock   , Mutex  , nonleaf,     true);
 249   if (UseConcMarkSweepGC) {
 250     def(SLT_lock                   , Monitor, nonleaf,     false );
 251                     // used in CMS GC for locking PLL lock
 252   }
 253   def(Heap_lock                    , Monitor, nonleaf+1,   false);
 254   def(JfieldIdCreation_lock        , Mutex  , nonleaf+1,   true ); // jfieldID, Used in VM_Operation

 255   def(MemberNameTable_lock         , Mutex  , nonleaf+1,   false); // Used to protect MemberNameTable
 256 
 257   def(CompiledIC_lock              , Mutex  , nonleaf+2,   false); // locks VtableStubs_lock, InlineCacheBuffer_lock
 258   def(CompileTaskAlloc_lock        , Mutex  , nonleaf+2,   true );
 259   def(CompileStatistics_lock       , Mutex  , nonleaf+2,   false);
 260   def(MultiArray_lock              , Mutex  , nonleaf+2,   false); // locks SymbolTable_lock
 261 
 262   def(JvmtiThreadState_lock        , Mutex  , nonleaf+2,   false); // Used by JvmtiThreadState/JvmtiEventController
 263   def(JvmtiPendingEvent_lock       , Monitor, nonleaf,     false); // Used by JvmtiCodeBlobEvents
 264   def(Management_lock              , Mutex  , nonleaf+2,   false); // used for JVM management
 265 
 266   def(Compile_lock                 , Mutex  , nonleaf+3,   true );
 267   def(MethodData_lock              , Mutex  , nonleaf+3,   false);
 268 
 269   def(MethodCompileQueue_lock      , Monitor, nonleaf+4,   true );
 270   def(Debug2_lock                  , Mutex  , nonleaf+4,   true );
 271   def(Debug3_lock                  , Mutex  , nonleaf+4,   true );
 272   def(ProfileVM_lock               , Monitor, special,   false); // used for profiling of the VMThread
 273   def(CompileThread_lock           , Monitor, nonleaf+5,   false );
 274   def(PeriodicTask_lock            , Monitor, nonleaf+5,   true);


src/share/vm/runtime/mutexLocker.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File