< prev index next >

src/hotspot/share/gc/g1/g1CollectedHeap.hpp

Print this page
rev 47957 : 8191564: Refactor GC related servicability code into GC specific subclasses


  75 class G1RemSet;
  76 class G1YoungRemSetSamplingThread;
  77 class HeapRegionRemSetIterator;
  78 class G1ConcurrentMark;
  79 class ConcurrentMarkThread;
  80 class G1ConcurrentRefine;
  81 class GenerationCounters;
  82 class STWGCTimer;
  83 class G1NewTracer;
  84 class EvacuationFailedInfo;
  85 class nmethod;
  86 class Ticks;
  87 class WorkGang;
  88 class G1Allocator;
  89 class G1ArchiveAllocator;
  90 class G1FullGCScope;
  91 class G1HeapVerifier;
  92 class G1HeapSizingPolicy;
  93 class G1HeapSummary;
  94 class G1EvacSummary;


  95 
  96 typedef OverflowTaskQueue<StarTask, mtGC>         RefToScanQueue;
  97 typedef GenericTaskQueueSet<RefToScanQueue, mtGC> RefToScanQueueSet;
  98 
  99 typedef int RegionIdx_t;   // needs to hold [ 0..max_regions() )
 100 typedef int CardIdx_t;     // needs to hold [ 0..CardsPerRegion )
 101 
 102 // The G1 STW is alive closure.
 103 // An instance is embedded into the G1CH and used as the
 104 // (optional) _is_alive_non_header closure in the STW
 105 // reference processor. It is also extensively used during
 106 // reference processing during STW evacuation pauses.
 107 class G1STWIsAliveClosure: public BoolObjectClosure {
 108   G1CollectedHeap* _g1;
 109 public:
 110   G1STWIsAliveClosure(G1CollectedHeap* g1) : _g1(g1) {}
 111   bool do_object_b(oop p);
 112 };
 113 
 114 class G1RegionMappingChangedListener : public G1MappingChangedListener {


 131 
 132   // Closures used in implementation.
 133   friend class G1ParScanThreadState;
 134   friend class G1ParScanThreadStateSet;
 135   friend class G1ParTask;
 136   friend class G1PLABAllocator;
 137   friend class G1PrepareCompactClosure;
 138 
 139   // Other related classes.
 140   friend class HeapRegionClaimer;
 141 
 142   // Testing classes.
 143   friend class G1CheckCSetFastTableClosure;
 144 
 145 private:
 146   G1YoungRemSetSamplingThread* _young_gen_sampling_thread;
 147 
 148   WorkGang* _workers;
 149   G1CollectorPolicy* _collector_policy;
 150 



 151   static size_t _humongous_object_threshold_in_words;
 152 
 153   // The secondary free list which contains regions that have been
 154   // freed up during the cleanup process. This will be appended to
 155   // the master free list when appropriate.
 156   FreeRegionList _secondary_free_list;
 157 
 158   // It keeps track of the old regions.
 159   HeapRegionSet _old_set;
 160 
 161   // It keeps track of the humongous regions.
 162   HeapRegionSet _humongous_set;
 163 
 164   void eagerly_reclaim_humongous_regions();
 165   // Start a new incremental collection set for the next pause.
 166   void start_new_collection_set();
 167 
 168   // The number of regions we could create by expansion.
 169   uint _expansion_regions;
 170 


 988     return CollectedHeap::G1CollectedHeap;
 989   }
 990 
 991   virtual const char* name() const {
 992     return "G1";
 993   }
 994 
 995   const G1CollectorState* collector_state() const { return &_collector_state; }
 996   G1CollectorState* collector_state() { return &_collector_state; }
 997 
 998   // The current policy object for the collector.
 999   G1Policy* g1_policy() const { return _g1_policy; }
1000 
1001   const G1CollectionSet* collection_set() const { return &_collection_set; }
1002   G1CollectionSet* collection_set() { return &_collection_set; }
1003 
1004   virtual CollectorPolicy* collector_policy() const;
1005 
1006   // Adaptive size policy.  No such thing for g1.
1007   virtual AdaptiveSizePolicy* size_policy() { return NULL; }






1008 
1009   // The rem set and barrier set.
1010   G1RemSet* g1_rem_set() const { return _g1_rem_set; }
1011 
1012   // Try to minimize the remembered set.
1013   void scrub_rem_set();
1014 
1015   uint get_gc_time_stamp() {
1016     return _gc_time_stamp;
1017   }
1018 
1019   inline void reset_gc_time_stamp();
1020 
1021   void check_gc_time_stamps() PRODUCT_RETURN;
1022 
1023   inline void increment_gc_time_stamp();
1024 
1025   // Reset the given region's GC timestamp. If it's starts humongous,
1026   // also reset the GC timestamp of its corresponding
1027   // continues humongous regions too.




  75 class G1RemSet;
  76 class G1YoungRemSetSamplingThread;
  77 class HeapRegionRemSetIterator;
  78 class G1ConcurrentMark;
  79 class ConcurrentMarkThread;
  80 class G1ConcurrentRefine;
  81 class GenerationCounters;
  82 class STWGCTimer;
  83 class G1NewTracer;
  84 class EvacuationFailedInfo;
  85 class nmethod;
  86 class Ticks;
  87 class WorkGang;
  88 class G1Allocator;
  89 class G1ArchiveAllocator;
  90 class G1FullGCScope;
  91 class G1HeapVerifier;
  92 class G1HeapSizingPolicy;
  93 class G1HeapSummary;
  94 class G1EvacSummary;
  95 class MemoryManager;
  96 class MemoryPool;
  97 
  98 typedef OverflowTaskQueue<StarTask, mtGC>         RefToScanQueue;
  99 typedef GenericTaskQueueSet<RefToScanQueue, mtGC> RefToScanQueueSet;
 100 
 101 typedef int RegionIdx_t;   // needs to hold [ 0..max_regions() )
 102 typedef int CardIdx_t;     // needs to hold [ 0..CardsPerRegion )
 103 
 104 // The G1 STW is alive closure.
 105 // An instance is embedded into the G1CH and used as the
 106 // (optional) _is_alive_non_header closure in the STW
 107 // reference processor. It is also extensively used during
 108 // reference processing during STW evacuation pauses.
 109 class G1STWIsAliveClosure: public BoolObjectClosure {
 110   G1CollectedHeap* _g1;
 111 public:
 112   G1STWIsAliveClosure(G1CollectedHeap* g1) : _g1(g1) {}
 113   bool do_object_b(oop p);
 114 };
 115 
 116 class G1RegionMappingChangedListener : public G1MappingChangedListener {


 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* _minor_mgr;
 154   GCMemoryManager* _major_mgr;
 155 
 156   static size_t _humongous_object_threshold_in_words;
 157 
 158   // The secondary free list which contains regions that have been
 159   // freed up during the cleanup process. This will be appended to
 160   // the master free list when appropriate.
 161   FreeRegionList _secondary_free_list;
 162 
 163   // It keeps track of the old regions.
 164   HeapRegionSet _old_set;
 165 
 166   // It keeps track of the humongous regions.
 167   HeapRegionSet _humongous_set;
 168 
 169   void eagerly_reclaim_humongous_regions();
 170   // Start a new incremental collection set for the next pause.
 171   void start_new_collection_set();
 172 
 173   // The number of regions we could create by expansion.
 174   uint _expansion_regions;
 175 


 993     return CollectedHeap::G1CollectedHeap;
 994   }
 995 
 996   virtual const char* name() const {
 997     return "G1";
 998   }
 999 
1000   const G1CollectorState* collector_state() const { return &_collector_state; }
1001   G1CollectorState* collector_state() { return &_collector_state; }
1002 
1003   // The current policy object for the collector.
1004   G1Policy* g1_policy() const { return _g1_policy; }
1005 
1006   const G1CollectionSet* collection_set() const { return &_collection_set; }
1007   G1CollectionSet* collection_set() { return &_collection_set; }
1008 
1009   virtual CollectorPolicy* collector_policy() const;
1010 
1011   // Adaptive size policy.  No such thing for g1.
1012   virtual AdaptiveSizePolicy* size_policy() { return NULL; }
1013 
1014   virtual GrowableArray<MemoryManager*> memory_managers();
1015   virtual GrowableArray<MemoryPool*> memory_pools();
1016 
1017   GCMemoryManager* minor_mgr();
1018   GCMemoryManager* major_mgr();
1019 
1020   // The rem set and barrier set.
1021   G1RemSet* g1_rem_set() const { return _g1_rem_set; }
1022 
1023   // Try to minimize the remembered set.
1024   void scrub_rem_set();
1025 
1026   uint get_gc_time_stamp() {
1027     return _gc_time_stamp;
1028   }
1029 
1030   inline void reset_gc_time_stamp();
1031 
1032   void check_gc_time_stamps() PRODUCT_RETURN;
1033 
1034   inline void increment_gc_time_stamp();
1035 
1036   // Reset the given region's GC timestamp. If it's starts humongous,
1037   // also reset the GC timestamp of its corresponding
1038   // continues humongous regions too.


< prev index next >