equal
deleted
inserted
replaced
36 #include "runtime/handles.inline.hpp" |
36 #include "runtime/handles.inline.hpp" |
37 #include "runtime/init.hpp" |
37 #include "runtime/init.hpp" |
38 #include "utilities/dtrace.hpp" |
38 #include "utilities/dtrace.hpp" |
39 #include "utilities/macros.hpp" |
39 #include "utilities/macros.hpp" |
40 #include "utilities/preserveException.hpp" |
40 #include "utilities/preserveException.hpp" |
41 #if INCLUDE_ALL_GCS |
41 #if INCLUDE_G1GC |
42 #include "gc/g1/g1CollectedHeap.inline.hpp" |
42 #include "gc/g1/g1CollectedHeap.inline.hpp" |
43 #include "gc/g1/g1Policy.hpp" |
43 #include "gc/g1/g1Policy.hpp" |
44 #endif // INCLUDE_ALL_GCS |
44 #endif // INCLUDE_G1GC |
45 |
45 |
46 VM_GC_Operation::~VM_GC_Operation() { |
46 VM_GC_Operation::~VM_GC_Operation() { |
47 CollectedHeap* ch = Universe::heap(); |
47 CollectedHeap* ch = Universe::heap(); |
48 ch->soft_ref_policy()->set_all_soft_refs_clear(false); |
48 ch->soft_ref_policy()->set_all_soft_refs_clear(false); |
49 } |
49 } |
191 AllocTracer::send_allocation_requiring_gc_event(_size * HeapWordSize, GCId::peek()); |
191 AllocTracer::send_allocation_requiring_gc_event(_size * HeapWordSize, GCId::peek()); |
192 } |
192 } |
193 |
193 |
194 // Returns true iff concurrent GCs unloads metadata. |
194 // Returns true iff concurrent GCs unloads metadata. |
195 bool VM_CollectForMetadataAllocation::initiate_concurrent_GC() { |
195 bool VM_CollectForMetadataAllocation::initiate_concurrent_GC() { |
196 #if INCLUDE_ALL_GCS |
196 #if INCLUDE_CMSGC |
197 if (UseConcMarkSweepGC && CMSClassUnloadingEnabled) { |
197 if (UseConcMarkSweepGC && CMSClassUnloadingEnabled) { |
198 MetaspaceGC::set_should_concurrent_collect(true); |
198 MetaspaceGC::set_should_concurrent_collect(true); |
199 return true; |
199 return true; |
200 } |
200 } |
201 |
201 #endif |
|
202 |
|
203 #if INCLUDE_G1GC |
202 if (UseG1GC && ClassUnloadingWithConcurrentMark) { |
204 if (UseG1GC && ClassUnloadingWithConcurrentMark) { |
203 G1CollectedHeap* g1h = G1CollectedHeap::heap(); |
205 G1CollectedHeap* g1h = G1CollectedHeap::heap(); |
204 g1h->g1_policy()->collector_state()->set_initiate_conc_mark_if_possible(true); |
206 g1h->g1_policy()->collector_state()->set_initiate_conc_mark_if_possible(true); |
205 |
207 |
206 GCCauseSetter x(g1h, _gc_cause); |
208 GCCauseSetter x(g1h, _gc_cause); |