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