src/share/vm/gc/cms/concurrentMarkSweepGeneration.cpp
Print this page
*** 2669,2678 ****
--- 2669,2682 ----
// _cmsGen->is_too_full() are
// themselves also monotonic in that sense. See check_monotonicity()
// below.
void CMSCollector::update_should_unload_classes() {
_should_unload_classes = false;
+ if (!ClassUnloading) {
+ return;
+ }
+
// Condition 1 above
if (_full_gc_requested && ExplicitGCInvokesConcurrentAndUnloadsClasses) {
_should_unload_classes = true;
} else if (CMSClassUnloadingEnabled) { // Condition 2.a above
// Disjuncts 2.b.(i,ii,iii) above