Print this page


Split Split Close
Expand all
Collapse all
          --- old/src/share/vm/gc/cms/concurrentMarkSweepGeneration.cpp
          +++ new/src/share/vm/gc/cms/concurrentMarkSweepGeneration.cpp
↓ open down ↓ 2663 lines elided ↑ open up ↑
2664 2664  // its results should be monotonically increasing (i.e. going from 0 to 1,
2665 2665  // but not 1 to 0) between successive calls between which the heap was
2666 2666  // not collected. For the implementation below, it must thus rely on
2667 2667  // the property that concurrent_cycles_since_last_unload()
2668 2668  // will not decrease unless a collection cycle happened and that
2669 2669  // _cmsGen->is_too_full() are
2670 2670  // themselves also monotonic in that sense. See check_monotonicity()
2671 2671  // below.
2672 2672  void CMSCollector::update_should_unload_classes() {
2673 2673    _should_unload_classes = false;
     2674 +  if (!ClassUnloading) {
     2675 +    return;
     2676 +  }
     2677 +
2674 2678    // Condition 1 above
2675 2679    if (_full_gc_requested && ExplicitGCInvokesConcurrentAndUnloadsClasses) {
2676 2680      _should_unload_classes = true;
2677 2681    } else if (CMSClassUnloadingEnabled) { // Condition 2.a above
2678 2682      // Disjuncts 2.b.(i,ii,iii) above
2679 2683      _should_unload_classes = (concurrent_cycles_since_last_unload() >=
2680 2684                                CMSClassUnloadingMaxInterval)
2681 2685                             || _cmsGen->is_too_full();
2682 2686    }
2683 2687  }
↓ open down ↓ 5849 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX