< prev index next >

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

Print this page
rev 48000 : [mq]: open.patch


  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 "utilities/stack.hpp"
  54 
  55 // A "G1CollectedHeap" is an implementation of a java heap for HotSpot.
  56 // It uses the "Garbage First" heap organization and algorithm, which
  57 // may combine concurrent marking with parallel, incremental compaction of
  58 // heap subsets that will yield large amounts of garbage.
  59 
  60 // Forward declarations
  61 class HeapRegion;
  62 class HRRSCleanupTask;
  63 class GenerationSpec;
  64 class G1ParScanThreadState;
  65 class G1ParScanThreadStateSet;
  66 class G1ParScanThreadState;

  67 class ObjectClosure;
  68 class SpaceClosure;
  69 class CompactibleSpaceClosure;
  70 class Space;
  71 class G1CollectionSet;
  72 class G1CollectorPolicy;
  73 class G1Policy;
  74 class G1HotCardCache;
  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;


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







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


 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.




  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;
  72 class Space;
  73 class G1CollectionSet;
  74 class G1CollectorPolicy;
  75 class G1Policy;
  76 class G1HotCardCache;
  77 class G1RemSet;
  78 class G1YoungRemSetSamplingThread;
  79 class HeapRegionRemSetIterator;
  80 class G1ConcurrentMark;
  81 class ConcurrentMarkThread;
  82 class G1ConcurrentRefine;
  83 class GenerationCounters;
  84 class STWGCTimer;
  85 class G1NewTracer;
  86 class EvacuationFailedInfo;
  87 class nmethod;
  88 class Ticks;


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


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


< prev index next >