< prev index next >

src/share/vm/gc/g1/g1RemSet.hpp

Print this page
rev 13166 : imported patch 8183394-remove-unused-n_workers-method
rev 13167 : imported patch 8179677-rename-conc-refined-cards


  59 
  60   G1RemSetSummary _prev_period_summary;
  61 
  62   // A DirtyCardQueueSet that is used to hold cards that contain
  63   // references into the current collection set. This is used to
  64   // update the remembered sets of the regions in the collection
  65   // set in the event of an evacuation failure.
  66   DirtyCardQueueSet _into_cset_dirty_card_queue_set;
  67 
  68   // Scan all remembered sets of the collection set for references into the collection
  69   // set.
  70   void scan_rem_set(G1ParScanThreadState* pss,
  71                     CodeBlobClosure* heap_region_codeblobs,
  72                     uint worker_i);
  73 
  74   // Flush remaining refinement buffers for cross-region references to either evacuate references
  75   // into the collection set or update the remembered set.
  76   void update_rem_set(DirtyCardQueue* into_cset_dcq, G1ParScanThreadState* pss, uint worker_i);
  77 
  78   G1CollectedHeap* _g1;
  79   size_t _conc_refine_cards;
  80 
  81   CardTableModRefBS*     _ct_bs;
  82   G1Policy*              _g1p;
  83   G1HotCardCache*        _hot_card_cache;
  84 
  85 public:
  86   // Gives an approximation on how many threads can be expected to add records to
  87   // a remembered set in parallel. This can be used for sizing data structures to
  88   // decrease performance losses due to data structure sharing.
  89   // Examples for quantities that influence this value are the maximum number of
  90   // mutator threads, maximum number of concurrent refinement or GC threads.
  91   static uint num_par_rem_sets();
  92 
  93   // Initialize data that depends on the heap size being known.
  94   void initialize(size_t capacity, uint max_regions);
  95 
  96   // This is called to reset dual hash tables after the gc pause
  97   // is finished and the initial hash table is no longer being
  98   // scanned.
  99   void cleanupHRRS();


 131   // to the mutator.
 132   void refine_card_concurrently(jbyte* card_ptr,
 133                                 uint worker_i);
 134 
 135   // Refine the card corresponding to "card_ptr", applying the given closure to
 136   // all references found. Returns "true" if the given card contains
 137   // oops that have references into the current collection set. Must only be
 138   // called during gc.
 139   bool refine_card_during_gc(jbyte* card_ptr,
 140                              G1ScanObjsDuringUpdateRSClosure* update_rs_cl);
 141 
 142   // Print accumulated summary info from the start of the VM.
 143   void print_summary_info();
 144 
 145   // Print accumulated summary info from the last time called.
 146   void print_periodic_summary_info(const char* header, uint period_count);
 147 
 148   // Prepare remembered set for verification.
 149   void prepare_for_verify();
 150 
 151   size_t conc_refine_cards() const { return _conc_refine_cards; }
 152 
 153   void create_card_live_data(WorkGang* workers, G1CMBitMap* mark_bitmap);
 154   void finalize_card_live_data(WorkGang* workers, G1CMBitMap* mark_bitmap);
 155 
 156   // Verify that the liveness count data created concurrently matches one created
 157   // during this safepoint.
 158   void verify_card_live_data(WorkGang* workers, G1CMBitMap* actual_bitmap);
 159 
 160   void clear_card_live_data(WorkGang* workers);
 161 
 162 #ifdef ASSERT
 163   void verify_card_live_data_is_clear();
 164 #endif
 165 };
 166 
 167 class G1ScanRSForRegionClosure : public HeapRegionClosure {
 168   G1RemSetScanState* _scan_state;
 169 
 170   size_t _cards_scanned;
 171   size_t _cards_claimed;




  59 
  60   G1RemSetSummary _prev_period_summary;
  61 
  62   // A DirtyCardQueueSet that is used to hold cards that contain
  63   // references into the current collection set. This is used to
  64   // update the remembered sets of the regions in the collection
  65   // set in the event of an evacuation failure.
  66   DirtyCardQueueSet _into_cset_dirty_card_queue_set;
  67 
  68   // Scan all remembered sets of the collection set for references into the collection
  69   // set.
  70   void scan_rem_set(G1ParScanThreadState* pss,
  71                     CodeBlobClosure* heap_region_codeblobs,
  72                     uint worker_i);
  73 
  74   // Flush remaining refinement buffers for cross-region references to either evacuate references
  75   // into the collection set or update the remembered set.
  76   void update_rem_set(DirtyCardQueue* into_cset_dcq, G1ParScanThreadState* pss, uint worker_i);
  77 
  78   G1CollectedHeap* _g1;
  79   size_t _num_conc_refined_cards;
  80 
  81   CardTableModRefBS*     _ct_bs;
  82   G1Policy*              _g1p;
  83   G1HotCardCache*        _hot_card_cache;
  84 
  85 public:
  86   // Gives an approximation on how many threads can be expected to add records to
  87   // a remembered set in parallel. This can be used for sizing data structures to
  88   // decrease performance losses due to data structure sharing.
  89   // Examples for quantities that influence this value are the maximum number of
  90   // mutator threads, maximum number of concurrent refinement or GC threads.
  91   static uint num_par_rem_sets();
  92 
  93   // Initialize data that depends on the heap size being known.
  94   void initialize(size_t capacity, uint max_regions);
  95 
  96   // This is called to reset dual hash tables after the gc pause
  97   // is finished and the initial hash table is no longer being
  98   // scanned.
  99   void cleanupHRRS();


 131   // to the mutator.
 132   void refine_card_concurrently(jbyte* card_ptr,
 133                                 uint worker_i);
 134 
 135   // Refine the card corresponding to "card_ptr", applying the given closure to
 136   // all references found. Returns "true" if the given card contains
 137   // oops that have references into the current collection set. Must only be
 138   // called during gc.
 139   bool refine_card_during_gc(jbyte* card_ptr,
 140                              G1ScanObjsDuringUpdateRSClosure* update_rs_cl);
 141 
 142   // Print accumulated summary info from the start of the VM.
 143   void print_summary_info();
 144 
 145   // Print accumulated summary info from the last time called.
 146   void print_periodic_summary_info(const char* header, uint period_count);
 147 
 148   // Prepare remembered set for verification.
 149   void prepare_for_verify();
 150 
 151   size_t num_conc_refined_cards() const { return _num_conc_refined_cards; }
 152 
 153   void create_card_live_data(WorkGang* workers, G1CMBitMap* mark_bitmap);
 154   void finalize_card_live_data(WorkGang* workers, G1CMBitMap* mark_bitmap);
 155 
 156   // Verify that the liveness count data created concurrently matches one created
 157   // during this safepoint.
 158   void verify_card_live_data(WorkGang* workers, G1CMBitMap* actual_bitmap);
 159 
 160   void clear_card_live_data(WorkGang* workers);
 161 
 162 #ifdef ASSERT
 163   void verify_card_live_data_is_clear();
 164 #endif
 165 };
 166 
 167 class G1ScanRSForRegionClosure : public HeapRegionClosure {
 168   G1RemSetScanState* _scan_state;
 169 
 170   size_t _cards_scanned;
 171   size_t _cards_claimed;


< prev index next >