< prev index next >

src/share/vm/runtime/mutexLocker.cpp

Print this page
rev 7209 : [mq]: inccms


  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 Mutex*   CodeCache_lock               = NULL;
  65 Mutex*   MethodData_lock              = NULL;
  66 Mutex*   RetData_lock                 = NULL;
  67 Monitor* VMOperationQueue_lock        = NULL;
  68 Monitor* VMOperationRequest_lock      = NULL;
  69 Monitor* Safepoint_lock               = NULL;
  70 Monitor* SerializePage_lock           = NULL;
  71 Monitor* Threads_lock                 = NULL;
  72 Monitor* CGC_lock                     = NULL;
  73 Monitor* STS_lock                     = NULL;
  74 Monitor* SLT_lock                     = NULL;
  75 Monitor* iCMS_lock                    = NULL;
  76 Monitor* FullGCCount_lock             = NULL;
  77 Monitor* CMark_lock                   = NULL;
  78 Mutex*   CMRegionStack_lock           = NULL;
  79 Mutex*   SATB_Q_FL_lock               = NULL;
  80 Monitor* SATB_Q_CBL_mon               = NULL;
  81 Mutex*   Shared_SATB_Q_lock           = NULL;
  82 Mutex*   DirtyCardQ_FL_lock           = NULL;
  83 Monitor* DirtyCardQ_CBL_mon           = NULL;
  84 Mutex*   Shared_DirtyCardQ_lock       = NULL;
  85 Mutex*   ParGCRareEvent_lock          = NULL;
  86 Mutex*   EvacFailureStack_lock        = NULL;
  87 Mutex*   DerivedPointerTableGC_lock   = NULL;
  88 Mutex*   Compile_lock                 = NULL;
  89 Monitor* MethodCompileQueue_lock      = NULL;
  90 Monitor* CompileThread_lock           = NULL;
  91 Mutex*   CompileTaskAlloc_lock        = NULL;
  92 Mutex*   CompileStatistics_lock       = NULL;
  93 Mutex*   MultiArray_lock              = NULL;
  94 Monitor* Terminator_lock              = NULL;
  95 Monitor* BeforeExit_lock              = NULL;


 158 void assert_lock_strong(const Monitor * lock) {
 159   if (IgnoreLockingAssertions) return;
 160   assert(lock != NULL, "Need non-NULL lock");
 161   if (lock->owned_by_self()) return;
 162   fatal(err_msg("must own lock %s", lock->name()));
 163 }
 164 #endif
 165 
 166 #define def(var, type, pri, vm_block) {                           \
 167   var = new type(Mutex::pri, #var, vm_block);                     \
 168   assert(_num_mutex < MAX_NUM_MUTEX,                              \
 169                     "increase MAX_NUM_MUTEX");                    \
 170   _mutex_array[_num_mutex++] = var;                               \
 171 }
 172 
 173 void mutex_init() {
 174   def(tty_lock                     , Mutex  , event,       true ); // allow to lock in VM
 175 
 176   def(CGC_lock                   , Monitor, special,     true ); // coordinate between fore- and background GC
 177   def(STS_lock                   , Monitor, leaf,        true );
 178   if (UseConcMarkSweepGC) {
 179     def(iCMS_lock                  , Monitor, special,     true ); // CMS incremental mode start/stop notification
 180   }
 181   if (UseConcMarkSweepGC || UseG1GC) {
 182     def(FullGCCount_lock           , Monitor, leaf,        true ); // in support of ExplicitGCInvokesConcurrent
 183   }
 184   if (UseG1GC) {
 185     def(CMark_lock                 , Monitor, nonleaf,     true ); // coordinate concurrent mark thread
 186     def(CMRegionStack_lock         , Mutex,   leaf,        true );
 187     def(SATB_Q_FL_lock             , Mutex  , special,     true );
 188     def(SATB_Q_CBL_mon             , Monitor, nonleaf,     true );
 189     def(Shared_SATB_Q_lock         , Mutex,   nonleaf,     true );
 190 
 191     def(DirtyCardQ_FL_lock         , Mutex  , special,     true );
 192     def(DirtyCardQ_CBL_mon         , Monitor, nonleaf,     true );
 193     def(Shared_DirtyCardQ_lock     , Mutex,   nonleaf,     true );
 194 
 195     def(FreeList_lock              , Mutex,   leaf     ,   true );
 196     def(SecondaryFreeList_lock     , Monitor, leaf     ,   true );
 197     def(OldSets_lock               , Mutex  , leaf     ,   true );
 198     def(RootRegionScan_lock        , Monitor, leaf     ,   true );
 199     def(MMUTracker_lock            , Mutex  , leaf     ,   true );
 200     def(HotCardCache_lock          , Mutex  , special  ,   true );




  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 Mutex*   CodeCache_lock               = NULL;
  65 Mutex*   MethodData_lock              = NULL;
  66 Mutex*   RetData_lock                 = NULL;
  67 Monitor* VMOperationQueue_lock        = NULL;
  68 Monitor* VMOperationRequest_lock      = NULL;
  69 Monitor* Safepoint_lock               = NULL;
  70 Monitor* SerializePage_lock           = NULL;
  71 Monitor* Threads_lock                 = NULL;
  72 Monitor* CGC_lock                     = NULL;
  73 Monitor* STS_lock                     = NULL;
  74 Monitor* SLT_lock                     = NULL;

  75 Monitor* FullGCCount_lock             = NULL;
  76 Monitor* CMark_lock                   = NULL;
  77 Mutex*   CMRegionStack_lock           = NULL;
  78 Mutex*   SATB_Q_FL_lock               = NULL;
  79 Monitor* SATB_Q_CBL_mon               = NULL;
  80 Mutex*   Shared_SATB_Q_lock           = NULL;
  81 Mutex*   DirtyCardQ_FL_lock           = NULL;
  82 Monitor* DirtyCardQ_CBL_mon           = NULL;
  83 Mutex*   Shared_DirtyCardQ_lock       = NULL;
  84 Mutex*   ParGCRareEvent_lock          = NULL;
  85 Mutex*   EvacFailureStack_lock        = NULL;
  86 Mutex*   DerivedPointerTableGC_lock   = NULL;
  87 Mutex*   Compile_lock                 = NULL;
  88 Monitor* MethodCompileQueue_lock      = NULL;
  89 Monitor* CompileThread_lock           = NULL;
  90 Mutex*   CompileTaskAlloc_lock        = NULL;
  91 Mutex*   CompileStatistics_lock       = NULL;
  92 Mutex*   MultiArray_lock              = NULL;
  93 Monitor* Terminator_lock              = NULL;
  94 Monitor* BeforeExit_lock              = NULL;


 157 void assert_lock_strong(const Monitor * lock) {
 158   if (IgnoreLockingAssertions) return;
 159   assert(lock != NULL, "Need non-NULL lock");
 160   if (lock->owned_by_self()) return;
 161   fatal(err_msg("must own lock %s", lock->name()));
 162 }
 163 #endif
 164 
 165 #define def(var, type, pri, vm_block) {                           \
 166   var = new type(Mutex::pri, #var, vm_block);                     \
 167   assert(_num_mutex < MAX_NUM_MUTEX,                              \
 168                     "increase MAX_NUM_MUTEX");                    \
 169   _mutex_array[_num_mutex++] = var;                               \
 170 }
 171 
 172 void mutex_init() {
 173   def(tty_lock                     , Mutex  , event,       true ); // allow to lock in VM
 174 
 175   def(CGC_lock                   , Monitor, special,     true ); // coordinate between fore- and background GC
 176   def(STS_lock                   , Monitor, leaf,        true );



 177   if (UseConcMarkSweepGC || UseG1GC) {
 178     def(FullGCCount_lock           , Monitor, leaf,        true ); // in support of ExplicitGCInvokesConcurrent
 179   }
 180   if (UseG1GC) {
 181     def(CMark_lock                 , Monitor, nonleaf,     true ); // coordinate concurrent mark thread
 182     def(CMRegionStack_lock         , Mutex,   leaf,        true );
 183     def(SATB_Q_FL_lock             , Mutex  , special,     true );
 184     def(SATB_Q_CBL_mon             , Monitor, nonleaf,     true );
 185     def(Shared_SATB_Q_lock         , Mutex,   nonleaf,     true );
 186 
 187     def(DirtyCardQ_FL_lock         , Mutex  , special,     true );
 188     def(DirtyCardQ_CBL_mon         , Monitor, nonleaf,     true );
 189     def(Shared_DirtyCardQ_lock     , Mutex,   nonleaf,     true );
 190 
 191     def(FreeList_lock              , Mutex,   leaf     ,   true );
 192     def(SecondaryFreeList_lock     , Monitor, leaf     ,   true );
 193     def(OldSets_lock               , Mutex  , leaf     ,   true );
 194     def(RootRegionScan_lock        , Monitor, leaf     ,   true );
 195     def(MMUTracker_lock            , Mutex  , leaf     ,   true );
 196     def(HotCardCache_lock          , Mutex  , special  ,   true );


< prev index next >