src/share/vm/gc_implementation/shared/vmGCOperations.cpp

Print this page

        

@@ -201,11 +201,11 @@
   if (UseConcMarkSweepGC && CMSClassUnloadingEnabled) {
     MetaspaceGC::set_should_concurrent_collect(true);
     return true;
   }
 
-  if (UseG1GC && G1ClassUnloadingEnabled) {
+  if (UseG1GC && ClassUnloadingWithConcurrentMark) {
     G1CollectedHeap* g1h = G1CollectedHeap::heap();
     g1h->g1_policy()->set_initiate_conc_mark_if_possible();
 
     GCCauseSetter x(g1h, _gc_cause);