equal
deleted
inserted
replaced
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 |