equal
deleted
inserted
replaced
43 #include "gc/g1/g1HeapTransition.hpp" |
43 #include "gc/g1/g1HeapTransition.hpp" |
44 #include "gc/g1/g1HeapVerifier.hpp" |
44 #include "gc/g1/g1HeapVerifier.hpp" |
45 #include "gc/g1/g1MarkSweep.hpp" |
45 #include "gc/g1/g1MarkSweep.hpp" |
46 #include "gc/g1/g1OopClosures.inline.hpp" |
46 #include "gc/g1/g1OopClosures.inline.hpp" |
47 #include "gc/g1/g1ParScanThreadState.inline.hpp" |
47 #include "gc/g1/g1ParScanThreadState.inline.hpp" |
|
48 #include "gc/g1/g1Policy.hpp" |
48 #include "gc/g1/g1RegionToSpaceMapper.hpp" |
49 #include "gc/g1/g1RegionToSpaceMapper.hpp" |
49 #include "gc/g1/g1RemSet.inline.hpp" |
50 #include "gc/g1/g1RemSet.inline.hpp" |
50 #include "gc/g1/g1RootClosures.hpp" |
51 #include "gc/g1/g1RootClosures.hpp" |
51 #include "gc/g1/g1RootProcessor.hpp" |
52 #include "gc/g1/g1RootProcessor.hpp" |
52 #include "gc/g1/g1StringDedup.hpp" |
53 #include "gc/g1/g1StringDedup.hpp" |
1742 _verifier->verify_region_sets_optional(); |
1743 _verifier->verify_region_sets_optional(); |
1743 } |
1744 } |
1744 |
1745 |
1745 // Public methods. |
1746 // Public methods. |
1746 |
1747 |
1747 G1CollectedHeap::G1CollectedHeap(G1CollectorPolicy* policy_) : |
1748 G1CollectedHeap::G1CollectedHeap(G1CollectorPolicy* collector_policy) : |
1748 CollectedHeap(), |
1749 CollectedHeap(), |
1749 _g1_policy(policy_), |
1750 _collector_policy(collector_policy), |
1750 _collection_set(this), |
1751 _g1_policy(create_g1_policy()), |
|
1752 _collection_set(this, _g1_policy), |
1751 _dirty_card_queue_set(false), |
1753 _dirty_card_queue_set(false), |
1752 _is_alive_closure_cm(this), |
1754 _is_alive_closure_cm(this), |
1753 _is_alive_closure_stw(this), |
1755 _is_alive_closure_stw(this), |
1754 _ref_processor_cm(NULL), |
1756 _ref_processor_cm(NULL), |
1755 _ref_processor_stw(NULL), |
1757 _ref_processor_stw(NULL), |
2132 // is alive closure |
2134 // is alive closure |
2133 // (for efficiency/performance) |
2135 // (for efficiency/performance) |
2134 } |
2136 } |
2135 |
2137 |
2136 CollectorPolicy* G1CollectedHeap::collector_policy() const { |
2138 CollectorPolicy* G1CollectedHeap::collector_policy() const { |
2137 return g1_policy(); |
2139 return _collector_policy; |
2138 } |
2140 } |
2139 |
2141 |
2140 size_t G1CollectedHeap::capacity() const { |
2142 size_t G1CollectedHeap::capacity() const { |
2141 return _hrm.length() * HeapRegion::GrainBytes; |
2143 return _hrm.length() * HeapRegion::GrainBytes; |
2142 } |
2144 } |
4857 // Since the collection set is a superset of the the young list, |
4859 // Since the collection set is a superset of the the young list, |
4858 // all we need to do to clear the young list is clear its |
4860 // all we need to do to clear the young list is clear its |
4859 // head and length, and unlink any young regions in the code below |
4861 // head and length, and unlink any young regions in the code below |
4860 _young_list->clear(); |
4862 _young_list->clear(); |
4861 |
4863 |
4862 G1CollectorPolicy* policy = g1_policy(); |
4864 G1Policy* policy = g1_policy(); |
4863 |
4865 |
4864 double start_sec = os::elapsedTime(); |
4866 double start_sec = os::elapsedTime(); |
4865 bool non_young = true; |
4867 bool non_young = true; |
4866 |
4868 |
4867 HeapRegion* cur = cs_head; |
4869 HeapRegion* cur = cs_head; |