hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp
changeset 28163 322d55d167be
parent 27888 a52ea0e7671e
child 28214 0b2894b5e67c
equal deleted inserted replaced
28023:a4075664328d 28163:322d55d167be
    81   // free list locks are in the range of values taken by _lockRank
    81   // free list locks are in the range of values taken by _lockRank
    82   // This range currently is [_leaf+2, _leaf+3]
    82   // This range currently is [_leaf+2, _leaf+3]
    83   // Note: this requires that CFLspace c'tors
    83   // Note: this requires that CFLspace c'tors
    84   // are called serially in the order in which the locks are
    84   // are called serially in the order in which the locks are
    85   // are acquired in the program text. This is true today.
    85   // are acquired in the program text. This is true today.
    86   _freelistLock(_lockRank--, "CompactibleFreeListSpace._lock", true),
    86   _freelistLock(_lockRank--, "CompactibleFreeListSpace._lock", true,
       
    87                 Monitor::_safepoint_check_sometimes),
    87   _parDictionaryAllocLock(Mutex::leaf - 1,  // == rank(ExpandHeap_lock) - 1
    88   _parDictionaryAllocLock(Mutex::leaf - 1,  // == rank(ExpandHeap_lock) - 1
    88                           "CompactibleFreeListSpace._dict_par_lock", true),
    89                           "CompactibleFreeListSpace._dict_par_lock", true,
       
    90                           Monitor::_safepoint_check_never),
    89   _rescan_task_size(CardTableModRefBS::card_size_in_words * BitsPerWord *
    91   _rescan_task_size(CardTableModRefBS::card_size_in_words * BitsPerWord *
    90                     CMSRescanMultiple),
    92                     CMSRescanMultiple),
    91   _marking_task_size(CardTableModRefBS::card_size_in_words * BitsPerWord *
    93   _marking_task_size(CardTableModRefBS::card_size_in_words * BitsPerWord *
    92                     CMSConcMarkMultiple),
    94                     CMSConcMarkMultiple),
    93   _collector(NULL),
    95   _collector(NULL),
   150   check_free_list_consistency();
   152   check_free_list_consistency();
   151 
   153 
   152   // Initialize locks for parallel case.
   154   // Initialize locks for parallel case.
   153   for (size_t i = IndexSetStart; i < IndexSetSize; i += IndexSetStride) {
   155   for (size_t i = IndexSetStart; i < IndexSetSize; i += IndexSetStride) {
   154     _indexedFreeListParLocks[i] = new Mutex(Mutex::leaf - 1, // == ExpandHeap_lock - 1
   156     _indexedFreeListParLocks[i] = new Mutex(Mutex::leaf - 1, // == ExpandHeap_lock - 1
   155                                             "a freelist par lock",
   157                                             "a freelist par lock", true, Mutex::_safepoint_check_sometimes);
   156                                             true);
       
   157     DEBUG_ONLY(
   158     DEBUG_ONLY(
   158       _indexedFreeList[i].set_protecting_lock(_indexedFreeListParLocks[i]);
   159       _indexedFreeList[i].set_protecting_lock(_indexedFreeListParLocks[i]);
   159     )
   160     )
   160   }
   161   }
   161   _dictionary->set_par_lock(&_parDictionaryAllocLock);
   162   _dictionary->set_par_lock(&_parDictionaryAllocLock);