27 #include "classfile/stringTable.hpp" |
27 #include "classfile/stringTable.hpp" |
28 #include "classfile/symbolTable.hpp" |
28 #include "classfile/symbolTable.hpp" |
29 #include "code/codeCache.hpp" |
29 #include "code/codeCache.hpp" |
30 #include "code/icBuffer.hpp" |
30 #include "code/icBuffer.hpp" |
31 #include "gc/g1/bufferingOopClosure.hpp" |
31 #include "gc/g1/bufferingOopClosure.hpp" |
32 #include "gc/g1/concurrentG1Refine.hpp" |
|
33 #include "gc/g1/concurrentG1RefineThread.hpp" |
|
34 #include "gc/g1/concurrentMarkThread.inline.hpp" |
32 #include "gc/g1/concurrentMarkThread.inline.hpp" |
35 #include "gc/g1/g1Allocator.inline.hpp" |
33 #include "gc/g1/g1Allocator.inline.hpp" |
36 #include "gc/g1/g1CollectedHeap.inline.hpp" |
34 #include "gc/g1/g1CollectedHeap.inline.hpp" |
37 #include "gc/g1/g1CollectionSet.hpp" |
35 #include "gc/g1/g1CollectionSet.hpp" |
38 #include "gc/g1/g1CollectorPolicy.hpp" |
36 #include "gc/g1/g1CollectorPolicy.hpp" |
39 #include "gc/g1/g1CollectorState.hpp" |
37 #include "gc/g1/g1CollectorState.hpp" |
|
38 #include "gc/g1/g1ConcurrentRefine.hpp" |
|
39 #include "gc/g1/g1ConcurrentRefineThread.hpp" |
40 #include "gc/g1/g1EvacStats.inline.hpp" |
40 #include "gc/g1/g1EvacStats.inline.hpp" |
41 #include "gc/g1/g1FullGCScope.hpp" |
41 #include "gc/g1/g1FullGCScope.hpp" |
42 #include "gc/g1/g1GCPhaseTimes.hpp" |
42 #include "gc/g1/g1GCPhaseTimes.hpp" |
43 #include "gc/g1/g1HeapSizingPolicy.hpp" |
43 #include "gc/g1/g1HeapSizingPolicy.hpp" |
44 #include "gc/g1/g1HeapTransition.hpp" |
44 #include "gc/g1/g1HeapTransition.hpp" |
1552 _ref_processor_cm(NULL), |
1552 _ref_processor_cm(NULL), |
1553 _ref_processor_stw(NULL), |
1553 _ref_processor_stw(NULL), |
1554 _bot(NULL), |
1554 _bot(NULL), |
1555 _hot_card_cache(NULL), |
1555 _hot_card_cache(NULL), |
1556 _g1_rem_set(NULL), |
1556 _g1_rem_set(NULL), |
1557 _cg1r(NULL), |
1557 _cr(NULL), |
1558 _g1mm(NULL), |
1558 _g1mm(NULL), |
1559 _preserved_marks_set(true /* in_c_heap */), |
1559 _preserved_marks_set(true /* in_c_heap */), |
1560 _secondary_free_list("Secondary Free List", new SecondaryFreeRegionListMtSafeChecker()), |
1560 _secondary_free_list("Secondary Free List", new SecondaryFreeRegionListMtSafeChecker()), |
1561 _old_set("Old Set", false /* humongous */, new OldRegionSetMtSafeChecker()), |
1561 _old_set("Old Set", false /* humongous */, new OldRegionSetMtSafeChecker()), |
1562 _humongous_set("Master Humongous Set", true /* humongous */, new HumongousRegionSetMtSafeChecker()), |
1562 _humongous_set("Master Humongous Set", true /* humongous */, new HumongousRegionSetMtSafeChecker()), |
1631 return result; |
1631 return result; |
1632 } |
1632 } |
1633 |
1633 |
1634 jint G1CollectedHeap::initialize_concurrent_refinement() { |
1634 jint G1CollectedHeap::initialize_concurrent_refinement() { |
1635 jint ecode = JNI_OK; |
1635 jint ecode = JNI_OK; |
1636 _cg1r = ConcurrentG1Refine::create(&ecode); |
1636 _cr = G1ConcurrentRefine::create(&ecode); |
1637 return ecode; |
1637 return ecode; |
1638 } |
1638 } |
1639 |
1639 |
1640 jint G1CollectedHeap::initialize() { |
1640 jint G1CollectedHeap::initialize() { |
1641 CollectedHeap::pre_initialize(); |
1641 CollectedHeap::pre_initialize(); |
1789 return ecode; |
1789 return ecode; |
1790 } |
1790 } |
1791 |
1791 |
1792 JavaThread::dirty_card_queue_set().initialize(DirtyCardQ_CBL_mon, |
1792 JavaThread::dirty_card_queue_set().initialize(DirtyCardQ_CBL_mon, |
1793 DirtyCardQ_FL_lock, |
1793 DirtyCardQ_FL_lock, |
1794 (int)concurrent_g1_refine()->yellow_zone(), |
1794 (int)concurrent_refine()->yellow_zone(), |
1795 (int)concurrent_g1_refine()->red_zone(), |
1795 (int)concurrent_refine()->red_zone(), |
1796 Shared_DirtyCardQ_lock, |
1796 Shared_DirtyCardQ_lock, |
1797 NULL, // fl_owner |
1797 NULL, // fl_owner |
1798 true); // init_free_ids |
1798 true); // init_free_ids |
1799 |
1799 |
1800 dirty_card_queue_set().initialize(DirtyCardQ_CBL_mon, |
1800 dirty_card_queue_set().initialize(DirtyCardQ_CBL_mon, |
1834 |
1834 |
1835 void G1CollectedHeap::stop() { |
1835 void G1CollectedHeap::stop() { |
1836 // Stop all concurrent threads. We do this to make sure these threads |
1836 // Stop all concurrent threads. We do this to make sure these threads |
1837 // do not continue to execute and access resources (e.g. logging) |
1837 // do not continue to execute and access resources (e.g. logging) |
1838 // that are destroyed during shutdown. |
1838 // that are destroyed during shutdown. |
1839 _cg1r->stop(); |
1839 _cr->stop(); |
1840 _cmThread->stop(); |
1840 _cmThread->stop(); |
1841 if (G1StringDedup::is_enabled()) { |
1841 if (G1StringDedup::is_enabled()) { |
1842 G1StringDedup::stop(); |
1842 G1StringDedup::stop(); |
1843 } |
1843 } |
1844 } |
1844 } |
2434 void G1CollectedHeap::print_gc_threads_on(outputStream* st) const { |
2434 void G1CollectedHeap::print_gc_threads_on(outputStream* st) const { |
2435 workers()->print_worker_threads_on(st); |
2435 workers()->print_worker_threads_on(st); |
2436 _cmThread->print_on(st); |
2436 _cmThread->print_on(st); |
2437 st->cr(); |
2437 st->cr(); |
2438 _cm->print_worker_threads_on(st); |
2438 _cm->print_worker_threads_on(st); |
2439 _cg1r->print_worker_threads_on(st); // also prints the sample thread |
2439 _cr->print_worker_threads_on(st); // also prints the sample thread |
2440 if (G1StringDedup::is_enabled()) { |
2440 if (G1StringDedup::is_enabled()) { |
2441 G1StringDedup::print_worker_threads_on(st); |
2441 G1StringDedup::print_worker_threads_on(st); |
2442 } |
2442 } |
2443 } |
2443 } |
2444 |
2444 |
2445 void G1CollectedHeap::gc_threads_do(ThreadClosure* tc) const { |
2445 void G1CollectedHeap::gc_threads_do(ThreadClosure* tc) const { |
2446 workers()->threads_do(tc); |
2446 workers()->threads_do(tc); |
2447 tc->do_thread(_cmThread); |
2447 tc->do_thread(_cmThread); |
2448 _cm->threads_do(tc); |
2448 _cm->threads_do(tc); |
2449 _cg1r->threads_do(tc); // also iterates over the sample thread |
2449 _cr->threads_do(tc); // also iterates over the sample thread |
2450 if (G1StringDedup::is_enabled()) { |
2450 if (G1StringDedup::is_enabled()) { |
2451 G1StringDedup::threads_do(tc); |
2451 G1StringDedup::threads_do(tc); |
2452 } |
2452 } |
2453 } |
2453 } |
2454 |
2454 |