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

changeset 2825
1f4413413144
parent 2708
1d1603768966
child 2958
1e3493ac2d11
     1.1 --- a/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp	Tue Apr 26 11:46:34 2011 -0700
     1.2 +++ b/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp	Tue Apr 26 21:17:24 2011 -0700
     1.3 @@ -1963,10 +1963,21 @@
     1.4  // Iteration support, mostly delegated from a CMS generation
     1.5  
     1.6  void CompactibleFreeListSpace::save_marks() {
     1.7 -  // mark the "end" of the used space at the time of this call;
     1.8 +  assert(Thread::current()->is_VM_thread(),
     1.9 +         "Global variable should only be set when single-threaded");
    1.10 +  // Mark the "end" of the used space at the time of this call;
    1.11    // note, however, that promoted objects from this point
    1.12    // on are tracked in the _promoInfo below.
    1.13    set_saved_mark_word(unallocated_block());
    1.14 +#ifdef ASSERT
    1.15 +  // Check the sanity of save_marks() etc.
    1.16 +  MemRegion ur    = used_region();
    1.17 +  MemRegion urasm = used_region_at_save_marks();
    1.18 +  assert(ur.contains(urasm),
    1.19 +         err_msg(" Error at save_marks(): [" PTR_FORMAT "," PTR_FORMAT ")"
    1.20 +                 " should contain [" PTR_FORMAT "," PTR_FORMAT ")",
    1.21 +                 ur.start(), ur.end(), urasm.start(), urasm.end()));
    1.22 +#endif
    1.23    // inform allocator that promotions should be tracked.
    1.24    assert(_promoInfo.noPromotions(), "_promoInfo inconsistency");
    1.25    _promoInfo.startTrackingPromotions();

mercurial