< prev index next >

src/hotspot/share/gc/g1/heapRegionRemSet.inline.hpp

Print this page




  48   HeapRegion* loc_hr = hr();
  49   // If the test below fails, then this table was reused concurrently
  50   // with this operation.  This is OK, since the old table was coarsened,
  51   // and adding a bit to the new table is never incorrect.
  52   if (loc_hr->is_in_reserved(from)) {
  53     CardIdx_t from_card = OtherRegionsTable::card_within_region(from, loc_hr);
  54     add_card(from_card);
  55   }
  56 }
  57 
  58 inline void PerRegionTable::init(HeapRegion* hr, bool clear_links_to_all_list) {
  59   if (clear_links_to_all_list) {
  60     set_next(NULL);
  61     set_prev(NULL);
  62   }
  63   _collision_list_next = NULL;
  64   _occupied = 0;
  65   _bm.clear();
  66   // Make sure that the bitmap clearing above has been finished before publishing
  67   // this PRT to concurrent threads.
  68   OrderAccess::release_store(&_hr, hr);
  69 }
  70 
  71 template <class Closure>
  72 void OtherRegionsTable::iterate(Closure& cl) {
  73   if (_n_coarse_entries > 0) {
  74     BitMap::idx_t cur = _coarse_map.get_next_one_offset(0);
  75     while (cur != _coarse_map.size()) {
  76       cl.next_coarse_prt((uint)cur);
  77       cur = _coarse_map.get_next_one_offset(cur + 1);
  78     }
  79   }
  80   {
  81     PerRegionTable* cur = _first_all_fine_prts;
  82     while (cur != NULL) {
  83       cl.next_fine_prt(cur->hr()->hrm_index(), cur->bm());
  84       cur = cur->next();
  85     }
  86   }
  87   {
  88     SparsePRTBucketIter iter(&_sparse_table);


  48   HeapRegion* loc_hr = hr();
  49   // If the test below fails, then this table was reused concurrently
  50   // with this operation.  This is OK, since the old table was coarsened,
  51   // and adding a bit to the new table is never incorrect.
  52   if (loc_hr->is_in_reserved(from)) {
  53     CardIdx_t from_card = OtherRegionsTable::card_within_region(from, loc_hr);
  54     add_card(from_card);
  55   }
  56 }
  57 
  58 inline void PerRegionTable::init(HeapRegion* hr, bool clear_links_to_all_list) {
  59   if (clear_links_to_all_list) {
  60     set_next(NULL);
  61     set_prev(NULL);
  62   }
  63   _collision_list_next = NULL;
  64   _occupied = 0;
  65   _bm.clear();
  66   // Make sure that the bitmap clearing above has been finished before publishing
  67   // this PRT to concurrent threads.
  68   Atomic::release_store(&_hr, hr);
  69 }
  70 
  71 template <class Closure>
  72 void OtherRegionsTable::iterate(Closure& cl) {
  73   if (_n_coarse_entries > 0) {
  74     BitMap::idx_t cur = _coarse_map.get_next_one_offset(0);
  75     while (cur != _coarse_map.size()) {
  76       cl.next_coarse_prt((uint)cur);
  77       cur = _coarse_map.get_next_one_offset(cur + 1);
  78     }
  79   }
  80   {
  81     PerRegionTable* cur = _first_all_fine_prts;
  82     while (cur != NULL) {
  83       cl.next_fine_prt(cur->hr()->hrm_index(), cur->bm());
  84       cur = cur->next();
  85     }
  86   }
  87   {
  88     SparsePRTBucketIter iter(&_sparse_table);
< prev index next >