hotspot/src/share/vm/gc_implementation/shared/vmGCOperations.cpp
changeset 25908 8adb2fb6fc3c
parent 25622 058307bdb07c
child 29079 832d35c45d0b
--- a/hotspot/src/share/vm/gc_implementation/shared/vmGCOperations.cpp	Mon Aug 04 15:04:45 2014 +0200
+++ b/hotspot/src/share/vm/gc_implementation/shared/vmGCOperations.cpp	Wed Aug 06 09:55:16 2014 +0200
@@ -195,6 +195,7 @@
   gch->do_full_collection(gch->must_clear_all_soft_refs(), _max_level);
 }
 
+// Returns true iff concurrent GCs unloads metadata.
 bool VM_CollectForMetadataAllocation::initiate_concurrent_GC() {
 #if INCLUDE_ALL_GCS
   if (UseConcMarkSweepGC && CMSClassUnloadingEnabled) {
@@ -202,7 +203,7 @@
     return true;
   }
 
-  if (UseG1GC) {
+  if (UseG1GC && ClassUnloadingWithConcurrentMark) {
     G1CollectedHeap* g1h = G1CollectedHeap::heap();
     g1h->g1_policy()->set_initiate_conc_mark_if_possible();