32 #include "gc/g1/g1CollectorState.hpp"
33 #include "gc/g1/g1ConcurrentMark.hpp"
34 #include "gc/g1/g1EdenRegions.hpp"
35 #include "gc/g1/g1EvacFailure.hpp"
36 #include "gc/g1/g1EvacStats.hpp"
37 #include "gc/g1/g1HeapTransition.hpp"
38 #include "gc/g1/g1HeapVerifier.hpp"
39 #include "gc/g1/g1HRPrinter.hpp"
40 #include "gc/g1/g1InCSetState.hpp"
41 #include "gc/g1/g1MonitoringSupport.hpp"
42 #include "gc/g1/g1SATBCardTableModRefBS.hpp"
43 #include "gc/g1/g1SurvivorRegions.hpp"
44 #include "gc/g1/g1YCTypes.hpp"
45 #include "gc/g1/heapRegionManager.hpp"
46 #include "gc/g1/heapRegionSet.hpp"
47 #include "gc/shared/barrierSet.hpp"
48 #include "gc/shared/collectedHeap.hpp"
49 #include "gc/shared/gcHeapSummary.hpp"
50 #include "gc/shared/plab.hpp"
51 #include "gc/shared/preservedMarks.hpp"
52 #include "memory/memRegion.hpp"
53 #include "services/memoryManager.hpp"
54 #include "utilities/stack.hpp"
55
56 // A "G1CollectedHeap" is an implementation of a java heap for HotSpot.
57 // It uses the "Garbage First" heap organization and algorithm, which
58 // may combine concurrent marking with parallel, incremental compaction of
59 // heap subsets that will yield large amounts of garbage.
60
61 // Forward declarations
62 class HeapRegion;
63 class HRRSCleanupTask;
64 class GenerationSpec;
65 class G1ParScanThreadState;
66 class G1ParScanThreadStateSet;
67 class G1ParScanThreadState;
68 class MemoryPool;
69 class ObjectClosure;
70 class SpaceClosure;
71 class CompactibleSpaceClosure;
133
134 // Closures used in implementation.
135 friend class G1ParScanThreadState;
136 friend class G1ParScanThreadStateSet;
137 friend class G1ParTask;
138 friend class G1PLABAllocator;
139 friend class G1PrepareCompactClosure;
140
141 // Other related classes.
142 friend class HeapRegionClaimer;
143
144 // Testing classes.
145 friend class G1CheckCSetFastTableClosure;
146
147 private:
148 G1YoungRemSetSamplingThread* _young_gen_sampling_thread;
149
150 WorkGang* _workers;
151 G1CollectorPolicy* _collector_policy;
152
153 GCMemoryManager _memory_manager;
154 GCMemoryManager _full_gc_memory_manager;
155
156 MemoryPool* _eden_pool;
157 MemoryPool* _survivor_pool;
158 MemoryPool* _old_pool;
159
160 static size_t _humongous_object_threshold_in_words;
161
162 // The secondary free list which contains regions that have been
163 // freed up during the cleanup process. This will be appended to
164 // the master free list when appropriate.
165 FreeRegionList _secondary_free_list;
166
167 // It keeps track of the old regions.
168 HeapRegionSet _old_set;
169
170 // It keeps track of the humongous regions.
171 HeapRegionSet _humongous_set;
172
980 void ref_processing_init();
981
982 virtual Name kind() const {
983 return CollectedHeap::G1CollectedHeap;
984 }
985
986 virtual const char* name() const {
987 return "G1";
988 }
989
990 const G1CollectorState* collector_state() const { return &_collector_state; }
991 G1CollectorState* collector_state() { return &_collector_state; }
992
993 // The current policy object for the collector.
994 G1Policy* g1_policy() const { return _g1_policy; }
995
996 const G1CollectionSet* collection_set() const { return &_collection_set; }
997 G1CollectionSet* collection_set() { return &_collection_set; }
998
999 virtual CollectorPolicy* collector_policy() const;
1000
1001 // Adaptive size policy. No such thing for g1.
1002 virtual AdaptiveSizePolicy* size_policy() { return NULL; }
1003
1004 virtual GrowableArray<GCMemoryManager*> memory_managers();
1005 virtual GrowableArray<MemoryPool*> memory_pools();
1006
1007 // The rem set and barrier set.
1008 G1RemSet* g1_rem_set() const { return _g1_rem_set; }
1009
1010 // Try to minimize the remembered set.
1011 void scrub_rem_set();
1012
1013 uint get_gc_time_stamp() {
1014 return _gc_time_stamp;
1015 }
1016
1017 inline void reset_gc_time_stamp();
1018
1019 void check_gc_time_stamps() PRODUCT_RETURN;
|
32 #include "gc/g1/g1CollectorState.hpp"
33 #include "gc/g1/g1ConcurrentMark.hpp"
34 #include "gc/g1/g1EdenRegions.hpp"
35 #include "gc/g1/g1EvacFailure.hpp"
36 #include "gc/g1/g1EvacStats.hpp"
37 #include "gc/g1/g1HeapTransition.hpp"
38 #include "gc/g1/g1HeapVerifier.hpp"
39 #include "gc/g1/g1HRPrinter.hpp"
40 #include "gc/g1/g1InCSetState.hpp"
41 #include "gc/g1/g1MonitoringSupport.hpp"
42 #include "gc/g1/g1SATBCardTableModRefBS.hpp"
43 #include "gc/g1/g1SurvivorRegions.hpp"
44 #include "gc/g1/g1YCTypes.hpp"
45 #include "gc/g1/heapRegionManager.hpp"
46 #include "gc/g1/heapRegionSet.hpp"
47 #include "gc/shared/barrierSet.hpp"
48 #include "gc/shared/collectedHeap.hpp"
49 #include "gc/shared/gcHeapSummary.hpp"
50 #include "gc/shared/plab.hpp"
51 #include "gc/shared/preservedMarks.hpp"
52 #include "gc/shared/softRefPolicy.hpp"
53 #include "memory/memRegion.hpp"
54 #include "services/memoryManager.hpp"
55 #include "utilities/stack.hpp"
56
57 // A "G1CollectedHeap" is an implementation of a java heap for HotSpot.
58 // It uses the "Garbage First" heap organization and algorithm, which
59 // may combine concurrent marking with parallel, incremental compaction of
60 // heap subsets that will yield large amounts of garbage.
61
62 // Forward declarations
63 class HeapRegion;
64 class HRRSCleanupTask;
65 class GenerationSpec;
66 class G1ParScanThreadState;
67 class G1ParScanThreadStateSet;
68 class G1ParScanThreadState;
69 class MemoryPool;
70 class ObjectClosure;
71 class SpaceClosure;
72 class CompactibleSpaceClosure;
134
135 // Closures used in implementation.
136 friend class G1ParScanThreadState;
137 friend class G1ParScanThreadStateSet;
138 friend class G1ParTask;
139 friend class G1PLABAllocator;
140 friend class G1PrepareCompactClosure;
141
142 // Other related classes.
143 friend class HeapRegionClaimer;
144
145 // Testing classes.
146 friend class G1CheckCSetFastTableClosure;
147
148 private:
149 G1YoungRemSetSamplingThread* _young_gen_sampling_thread;
150
151 WorkGang* _workers;
152 G1CollectorPolicy* _collector_policy;
153
154 SoftRefPolicy _soft_ref_policy;
155
156 GCMemoryManager _memory_manager;
157 GCMemoryManager _full_gc_memory_manager;
158
159 MemoryPool* _eden_pool;
160 MemoryPool* _survivor_pool;
161 MemoryPool* _old_pool;
162
163 static size_t _humongous_object_threshold_in_words;
164
165 // The secondary free list which contains regions that have been
166 // freed up during the cleanup process. This will be appended to
167 // the master free list when appropriate.
168 FreeRegionList _secondary_free_list;
169
170 // It keeps track of the old regions.
171 HeapRegionSet _old_set;
172
173 // It keeps track of the humongous regions.
174 HeapRegionSet _humongous_set;
175
983 void ref_processing_init();
984
985 virtual Name kind() const {
986 return CollectedHeap::G1CollectedHeap;
987 }
988
989 virtual const char* name() const {
990 return "G1";
991 }
992
993 const G1CollectorState* collector_state() const { return &_collector_state; }
994 G1CollectorState* collector_state() { return &_collector_state; }
995
996 // The current policy object for the collector.
997 G1Policy* g1_policy() const { return _g1_policy; }
998
999 const G1CollectionSet* collection_set() const { return &_collection_set; }
1000 G1CollectionSet* collection_set() { return &_collection_set; }
1001
1002 virtual CollectorPolicy* collector_policy() const;
1003
1004 virtual SoftRefPolicy* soft_ref_policy();
1005
1006 // Adaptive size policy. No such thing for g1.
1007 virtual AdaptiveSizePolicy* size_policy() { return NULL; }
1008
1009 virtual GrowableArray<GCMemoryManager*> memory_managers();
1010 virtual GrowableArray<MemoryPool*> memory_pools();
1011
1012 // The rem set and barrier set.
1013 G1RemSet* g1_rem_set() const { return _g1_rem_set; }
1014
1015 // Try to minimize the remembered set.
1016 void scrub_rem_set();
1017
1018 uint get_gc_time_stamp() {
1019 return _gc_time_stamp;
1020 }
1021
1022 inline void reset_gc_time_stamp();
1023
1024 void check_gc_time_stamps() PRODUCT_RETURN;
|