hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp
changeset 2009 4adf43957a1b
parent 1676 d80e69372634
child 2257 d8e6e11e7f32
child 2105 347008ce7984
equal deleted inserted replaced
2008:898493b2e3f1 2009:4adf43957a1b
    63 
    63 
    64 protected:
    64 protected:
    65   // We need access in order to union things into the base table.
    65   // We need access in order to union things into the base table.
    66   BitMap* bm() { return &_bm; }
    66   BitMap* bm() { return &_bm; }
    67 
    67 
       
    68 #if PRT_COUNT_OCCUPIED
    68   void recount_occupied() {
    69   void recount_occupied() {
    69     _occupied = (jint) bm()->count_one_bits();
    70     _occupied = (jint) bm()->count_one_bits();
    70   }
    71   }
       
    72 #endif
    71 
    73 
    72   PerRegionTable(HeapRegion* hr) :
    74   PerRegionTable(HeapRegion* hr) :
    73     _hr(hr),
    75     _hr(hr),
    74 #if PRT_COUNT_OCCUPIED
    76 #if PRT_COUNT_OCCUPIED
    75     _occupied(0),
    77     _occupied(0),
  1142 void HeapRegionRemSet::clear_outgoing_entries() {
  1144 void HeapRegionRemSet::clear_outgoing_entries() {
  1143   G1CollectedHeap* g1h = G1CollectedHeap::heap();
  1145   G1CollectedHeap* g1h = G1CollectedHeap::heap();
  1144   size_t i = _outgoing_region_map.get_next_one_offset(0);
  1146   size_t i = _outgoing_region_map.get_next_one_offset(0);
  1145   while (i < _outgoing_region_map.size()) {
  1147   while (i < _outgoing_region_map.size()) {
  1146     HeapRegion* to_region = g1h->region_at(i);
  1148     HeapRegion* to_region = g1h->region_at(i);
  1147     to_region->rem_set()->clear_incoming_entry(hr());
  1149     if (!to_region->in_collection_set()) {
       
  1150       to_region->rem_set()->clear_incoming_entry(hr());
       
  1151     }
  1148     i = _outgoing_region_map.get_next_one_offset(i+1);
  1152     i = _outgoing_region_map.get_next_one_offset(i+1);
  1149   }
  1153   }
  1150 }
  1154 }
  1151 
  1155 
  1152 
  1156