hotspot/src/share/vm/gc/g1/g1CollectedHeap.hpp
changeset 39698 4016de4e596b
parent 38186 ccaa890f8617
child 39979 b17e445924da
equal deleted inserted replaced
39697:1f34864a0347 39698:4016de4e596b
   776   DirtyCardQueueSet _dirty_card_queue_set;
   776   DirtyCardQueueSet _dirty_card_queue_set;
   777 
   777 
   778   // The closure used to refine a single card.
   778   // The closure used to refine a single card.
   779   RefineCardTableEntryClosure* _refine_cte_cl;
   779   RefineCardTableEntryClosure* _refine_cte_cl;
   780 
   780 
   781   // After a collection pause, make the regions in the CS into free
   781   // After a collection pause, convert the regions in the collection set into free
   782   // regions.
   782   // regions.
   783   void free_collection_set(HeapRegion* cs_head, EvacuationInfo& evacuation_info, const size_t* surviving_young_words);
   783   void free_collection_set(G1CollectionSet* collection_set, EvacuationInfo& evacuation_info, const size_t* surviving_young_words);
   784 
   784 
   785   // Abandon the current collection set without recording policy
   785   // Abandon the current collection set without recording policy
   786   // statistics or updating free lists.
   786   // statistics or updating free lists.
   787   void abandon_collection_set(HeapRegion* cs_head);
   787   void abandon_collection_set(G1CollectionSet* collection_set);
   788 
   788 
   789   // The concurrent marker (and the thread it runs in.)
   789   // The concurrent marker (and the thread it runs in.)
   790   G1ConcurrentMark* _cm;
   790   G1ConcurrentMark* _cm;
   791   ConcurrentMarkThread* _cmThread;
   791   ConcurrentMarkThread* _cmThread;
   792 
   792 
   927   // _is_alive_non_header field. Supplying a value for the
   927   // _is_alive_non_header field. Supplying a value for the
   928   // _is_alive_non_header field is optional but doing so prevents
   928   // _is_alive_non_header field is optional but doing so prevents
   929   // unnecessary additions to the discovered lists during reference
   929   // unnecessary additions to the discovered lists during reference
   930   // discovery.
   930   // discovery.
   931   G1CMIsAliveClosure _is_alive_closure_cm;
   931   G1CMIsAliveClosure _is_alive_closure_cm;
   932 
       
   933   // Cache used by G1CollectedHeap::start_cset_region_for_worker().
       
   934   HeapRegion** _worker_cset_start_region;
       
   935 
       
   936   // Time stamp to validate the regions recorded in the cache
       
   937   // used by G1CollectedHeap::start_cset_region_for_worker().
       
   938   // The heap region entry for a given worker is valid iff
       
   939   // the associated time stamp value matches the current value
       
   940   // of G1CollectedHeap::_gc_time_stamp.
       
   941   uint* _worker_cset_start_region_time_stamp;
       
   942 
   932 
   943   volatile bool _free_regions_coming;
   933   volatile bool _free_regions_coming;
   944 
   934 
   945 public:
   935 public:
   946 
   936 
  1209   void heap_region_par_iterate(HeapRegionClosure* cl,
  1199   void heap_region_par_iterate(HeapRegionClosure* cl,
  1210                                uint worker_id,
  1200                                uint worker_id,
  1211                                HeapRegionClaimer* hrclaimer,
  1201                                HeapRegionClaimer* hrclaimer,
  1212                                bool concurrent = false) const;
  1202                                bool concurrent = false) const;
  1213 
  1203 
  1214   // Clear the cached cset start regions and (more importantly)
       
  1215   // the time stamps. Called when we reset the GC time stamp.
       
  1216   void clear_cset_start_regions();
       
  1217 
       
  1218   // Given the id of a worker, obtain or calculate a suitable
       
  1219   // starting region for iterating over the current collection set.
       
  1220   HeapRegion* start_cset_region_for_worker(uint worker_i);
       
  1221 
       
  1222   // Iterate over the regions (if any) in the current collection set.
  1204   // Iterate over the regions (if any) in the current collection set.
  1223   void collection_set_iterate(HeapRegionClosure* blk);
  1205   void collection_set_iterate(HeapRegionClosure* blk);
  1224 
  1206 
  1225   // As above but starting from region r
  1207   // Iterate over the regions (if any) in the current collection set. Starts the
  1226   void collection_set_iterate_from(HeapRegion* r, HeapRegionClosure *blk);
  1208   // iteration over the entire collection set so that the start regions of a given
       
  1209   // worker id over the set active_workers are evenly spread across the set of
       
  1210   // collection set regions.
       
  1211   void collection_set_iterate_from(HeapRegionClosure *blk, uint worker_id);
  1227 
  1212 
  1228   HeapRegion* next_compaction_region(const HeapRegion* from) const;
  1213   HeapRegion* next_compaction_region(const HeapRegion* from) const;
  1229 
  1214 
  1230   // Returns the HeapRegion that contains addr. addr must not be NULL.
  1215   // Returns the HeapRegion that contains addr. addr must not be NULL.
  1231   template <class T>
  1216   template <class T>