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;


 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(JNICachedItableIndex_lock    , Mutex  , nonleaf+1,   false); // Used to cache an itable index during JNI invoke
 256   def(MemberNameTable_lock         , Mutex  , nonleaf+1,   false); // Used to protect MemberNameTable
 257 
 258   def(CompiledIC_lock              , Mutex  , nonleaf+2,   false); // locks VtableStubs_lock, InlineCacheBuffer_lock
 259   def(CompileTaskAlloc_lock        , Mutex  , nonleaf+2,   true );
 260   def(CompileStatistics_lock       , Mutex  , nonleaf+2,   false);
 261   def(MultiArray_lock              , Mutex  , nonleaf+2,   false); // locks SymbolTable_lock
 262 
 263   def(JvmtiThreadState_lock        , Mutex  , nonleaf+2,   false); // Used by JvmtiThreadState/JvmtiEventController
 264   def(JvmtiPendingEvent_lock       , Monitor, nonleaf,     false); // Used by JvmtiCodeBlobEvents
 265   def(Management_lock              , Mutex  , nonleaf+2,   false); // used for JVM management
 266 
 267   def(Compile_lock                 , Mutex  , nonleaf+3,   true );
 268   def(MethodData_lock              , Mutex  , nonleaf+3,   false);
 269 
 270   def(MethodCompileQueue_lock      , Monitor, nonleaf+4,   true );
 271   def(Debug2_lock                  , Mutex  , nonleaf+4,   true );
 272   def(Debug3_lock                  , Mutex  , nonleaf+4,   true );
 273   def(ProfileVM_lock               , Monitor, special,   false); // used for profiling of the VMThread
 274   def(CompileThread_lock           , Monitor, nonleaf+5,   false );
 275 




  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;


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

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


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