src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp

changeset 442
2faf283ce688
parent 435
a61af66fc99e
child 444
173195ff483a
     1.1 --- a/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp	Fri Feb 15 07:01:10 2008 -0800
     1.2 +++ b/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp	Sat Feb 16 22:41:20 2008 -0800
     1.3 @@ -5732,13 +5732,19 @@
     1.4    // in the perm_gen_verify_bit_map. In order to do that we traverse
     1.5    // all blocks in perm gen and mark all dead objects.
     1.6    if (verifying() && !cms_should_unload_classes()) {
     1.7 -    CMSTokenSyncWithLocks ts(true, _permGen->freelistLock(),
     1.8 -                             bitMapLock());
     1.9      assert(perm_gen_verify_bit_map()->sizeInBits() != 0,
    1.10             "Should have already been allocated");
    1.11      MarkDeadObjectsClosure mdo(this, _permGen->cmsSpace(),
    1.12                                 markBitMap(), perm_gen_verify_bit_map());
    1.13 -    _permGen->cmsSpace()->blk_iterate(&mdo);
    1.14 +    if (asynch) {
    1.15 +      CMSTokenSyncWithLocks ts(true, _permGen->freelistLock(),
    1.16 +                               bitMapLock());
    1.17 +      _permGen->cmsSpace()->blk_iterate(&mdo);
    1.18 +    } else {
    1.19 +      // In the case of synchronous sweep, we already have
    1.20 +      // the requisite locks/tokens.
    1.21 +      _permGen->cmsSpace()->blk_iterate(&mdo);
    1.22 +    }
    1.23    }
    1.24  
    1.25    if (asynch) {

mercurial