hotspot/src/share/vm/gc_implementation/shared/vmGCOperations.cpp
changeset 25908 8adb2fb6fc3c
parent 25622 058307bdb07c
child 29079 832d35c45d0b
equal deleted inserted replaced
25907:d2dea83d77eb 25908:8adb2fb6fc3c
   193   GenCollectedHeap* gch = GenCollectedHeap::heap();
   193   GenCollectedHeap* gch = GenCollectedHeap::heap();
   194   GCCauseSetter gccs(gch, _gc_cause);
   194   GCCauseSetter gccs(gch, _gc_cause);
   195   gch->do_full_collection(gch->must_clear_all_soft_refs(), _max_level);
   195   gch->do_full_collection(gch->must_clear_all_soft_refs(), _max_level);
   196 }
   196 }
   197 
   197 
       
   198 // Returns true iff concurrent GCs unloads metadata.
   198 bool VM_CollectForMetadataAllocation::initiate_concurrent_GC() {
   199 bool VM_CollectForMetadataAllocation::initiate_concurrent_GC() {
   199 #if INCLUDE_ALL_GCS
   200 #if INCLUDE_ALL_GCS
   200   if (UseConcMarkSweepGC && CMSClassUnloadingEnabled) {
   201   if (UseConcMarkSweepGC && CMSClassUnloadingEnabled) {
   201     MetaspaceGC::set_should_concurrent_collect(true);
   202     MetaspaceGC::set_should_concurrent_collect(true);
   202     return true;
   203     return true;
   203   }
   204   }
   204 
   205 
   205   if (UseG1GC) {
   206   if (UseG1GC && ClassUnloadingWithConcurrentMark) {
   206     G1CollectedHeap* g1h = G1CollectedHeap::heap();
   207     G1CollectedHeap* g1h = G1CollectedHeap::heap();
   207     g1h->g1_policy()->set_initiate_conc_mark_if_possible();
   208     g1h->g1_policy()->set_initiate_conc_mark_if_possible();
   208 
   209 
   209     GCCauseSetter x(g1h, _gc_cause);
   210     GCCauseSetter x(g1h, _gc_cause);
   210 
   211