Print this page


Split Close
Expand all
Collapse all
          --- old/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp
          +++ new/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp
↓ open down ↓ 1681 lines elided ↑ open up ↑
1682 1682  
1683 1683  }
1684 1684  
1685 1685  void CMSCollector::request_full_gc(unsigned int full_gc_count) {
1686 1686    GenCollectedHeap* gch = GenCollectedHeap::heap();
1687 1687    unsigned int gc_count = gch->total_full_collections();
1688 1688    if (gc_count == full_gc_count) {
1689 1689      MutexLockerEx y(CGC_lock, Mutex::_no_safepoint_check_flag);
1690 1690      _full_gc_requested = true;
1691 1691      CGC_lock->notify();   // nudge CMS thread
     1692 +  } else {
     1693 +    assert(gc_count > full_gc_count, "Error: causal loop");
1692 1694    }
1693 1695  }
1694 1696  
1695 1697  
1696 1698  // The foreground and background collectors need to coordinate in order
1697 1699  // to make sure that they do not mutually interfere with CMS collections.
1698 1700  // When a background collection is active,
1699 1701  // the foreground collector may need to take over (preempt) and
1700 1702  // synchronously complete an ongoing collection. Depending on the
1701 1703  // frequency of the background collections and the heap usage
↓ open down ↓ 7575 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX