70 #include "gc/g1/g1UncommitRegionTask.hpp"
71 #include "gc/g1/g1VMOperations.hpp"
72 #include "gc/g1/g1YoungCollector.hpp"
73 #include "gc/g1/g1YoungGCEvacFailureInjector.hpp"
74 #include "gc/g1/heapRegion.inline.hpp"
75 #include "gc/g1/heapRegionRemSet.inline.hpp"
76 #include "gc/g1/heapRegionSet.inline.hpp"
77 #include "gc/shared/concurrentGCBreakpoints.hpp"
78 #include "gc/shared/gcBehaviours.hpp"
79 #include "gc/shared/gcHeapSummary.hpp"
80 #include "gc/shared/gcId.hpp"
81 #include "gc/shared/gcLocker.inline.hpp"
82 #include "gc/shared/gcTimer.hpp"
83 #include "gc/shared/gcTraceTime.inline.hpp"
84 #include "gc/shared/generationSpec.hpp"
85 #include "gc/shared/isGCActiveMark.hpp"
86 #include "gc/shared/locationPrinter.inline.hpp"
87 #include "gc/shared/oopStorageParState.hpp"
88 #include "gc/shared/preservedMarks.inline.hpp"
89 #include "gc/shared/referenceProcessor.inline.hpp"
90 #include "gc/shared/suspendibleThreadSet.hpp"
91 #include "gc/shared/taskqueue.inline.hpp"
92 #include "gc/shared/taskTerminator.hpp"
93 #include "gc/shared/tlab_globals.hpp"
94 #include "gc/shared/workerPolicy.hpp"
95 #include "gc/shared/weakProcessor.inline.hpp"
96 #include "logging/log.hpp"
97 #include "memory/allocation.hpp"
98 #include "memory/heapInspection.hpp"
99 #include "memory/iterator.hpp"
100 #include "memory/metaspaceUtils.hpp"
101 #include "memory/resourceArea.hpp"
102 #include "memory/universe.hpp"
103 #include "oops/access.inline.hpp"
104 #include "oops/compressedOops.inline.hpp"
105 #include "oops/oop.inline.hpp"
106 #include "runtime/atomic.hpp"
107 #include "runtime/handles.inline.hpp"
108 #include "runtime/init.hpp"
109 #include "runtime/java.hpp"
1507 // require BOT updates or not and, if it doesn't, then a non-young
1508 // region will complain that it cannot support allocations without
1509 // BOT updates. So we'll tag the dummy region as eden to avoid that.
1510 dummy_region->set_eden();
1511 // Make sure it's full.
1512 dummy_region->set_top(dummy_region->end());
1513 G1AllocRegion::setup(this, dummy_region);
1514
1515 _allocator->init_mutator_alloc_regions();
1516
1517 // Do create of the monitoring and management support so that
1518 // values in the heap have been properly initialized.
1519 _monitoring_support = new G1MonitoringSupport(this);
1520
1521 _collection_set.initialize(max_reserved_regions());
1522
1523 evac_failure_injector()->reset();
1524
1525 G1InitLogger::print();
1526
1527 return JNI_OK;
1528 }
1529
1530 bool G1CollectedHeap::concurrent_mark_is_terminating() const {
1531 return _cm_thread->should_terminate();
1532 }
1533
1534 void G1CollectedHeap::stop() {
1535 // Stop all concurrent threads. We do this to make sure these threads
1536 // do not continue to execute and access resources (e.g. logging)
1537 // that are destroyed during shutdown.
1538 _cr->stop();
1539 _service_thread->stop();
1540 _cm_thread->stop();
1541 }
1542
1543 void G1CollectedHeap::safepoint_synchronize_begin() {
1544 SuspendibleThreadSet::synchronize();
1545 }
1546
|
70 #include "gc/g1/g1UncommitRegionTask.hpp"
71 #include "gc/g1/g1VMOperations.hpp"
72 #include "gc/g1/g1YoungCollector.hpp"
73 #include "gc/g1/g1YoungGCEvacFailureInjector.hpp"
74 #include "gc/g1/heapRegion.inline.hpp"
75 #include "gc/g1/heapRegionRemSet.inline.hpp"
76 #include "gc/g1/heapRegionSet.inline.hpp"
77 #include "gc/shared/concurrentGCBreakpoints.hpp"
78 #include "gc/shared/gcBehaviours.hpp"
79 #include "gc/shared/gcHeapSummary.hpp"
80 #include "gc/shared/gcId.hpp"
81 #include "gc/shared/gcLocker.inline.hpp"
82 #include "gc/shared/gcTimer.hpp"
83 #include "gc/shared/gcTraceTime.inline.hpp"
84 #include "gc/shared/generationSpec.hpp"
85 #include "gc/shared/isGCActiveMark.hpp"
86 #include "gc/shared/locationPrinter.inline.hpp"
87 #include "gc/shared/oopStorageParState.hpp"
88 #include "gc/shared/preservedMarks.inline.hpp"
89 #include "gc/shared/referenceProcessor.inline.hpp"
90 #include "gc/shared/slidingForwarding.hpp"
91 #include "gc/shared/suspendibleThreadSet.hpp"
92 #include "gc/shared/taskqueue.inline.hpp"
93 #include "gc/shared/taskTerminator.hpp"
94 #include "gc/shared/tlab_globals.hpp"
95 #include "gc/shared/workerPolicy.hpp"
96 #include "gc/shared/weakProcessor.inline.hpp"
97 #include "logging/log.hpp"
98 #include "memory/allocation.hpp"
99 #include "memory/heapInspection.hpp"
100 #include "memory/iterator.hpp"
101 #include "memory/metaspaceUtils.hpp"
102 #include "memory/resourceArea.hpp"
103 #include "memory/universe.hpp"
104 #include "oops/access.inline.hpp"
105 #include "oops/compressedOops.inline.hpp"
106 #include "oops/oop.inline.hpp"
107 #include "runtime/atomic.hpp"
108 #include "runtime/handles.inline.hpp"
109 #include "runtime/init.hpp"
110 #include "runtime/java.hpp"
1508 // require BOT updates or not and, if it doesn't, then a non-young
1509 // region will complain that it cannot support allocations without
1510 // BOT updates. So we'll tag the dummy region as eden to avoid that.
1511 dummy_region->set_eden();
1512 // Make sure it's full.
1513 dummy_region->set_top(dummy_region->end());
1514 G1AllocRegion::setup(this, dummy_region);
1515
1516 _allocator->init_mutator_alloc_regions();
1517
1518 // Do create of the monitoring and management support so that
1519 // values in the heap have been properly initialized.
1520 _monitoring_support = new G1MonitoringSupport(this);
1521
1522 _collection_set.initialize(max_reserved_regions());
1523
1524 evac_failure_injector()->reset();
1525
1526 G1InitLogger::print();
1527
1528 SlidingForwarding::initialize(heap_rs.region(), HeapRegion::GrainWords);
1529
1530 return JNI_OK;
1531 }
1532
1533 bool G1CollectedHeap::concurrent_mark_is_terminating() const {
1534 return _cm_thread->should_terminate();
1535 }
1536
1537 void G1CollectedHeap::stop() {
1538 // Stop all concurrent threads. We do this to make sure these threads
1539 // do not continue to execute and access resources (e.g. logging)
1540 // that are destroyed during shutdown.
1541 _cr->stop();
1542 _service_thread->stop();
1543 _cm_thread->stop();
1544 }
1545
1546 void G1CollectedHeap::safepoint_synchronize_begin() {
1547 SuspendibleThreadSet::synchronize();
1548 }
1549
|