src/hotspot/share/gc/g1/g1RemSet.cpp
changeset 49071 663f20fc5109
parent 48890 f9884e190f2b
child 49075 1fd4d6068f54
equal deleted inserted replaced
48890:f9884e190f2b 49071:663f20fc5109
   584   // we see the up-to-date region type here.
   584   // we see the up-to-date region type here.
   585   if (!r->is_old_or_humongous()) {
   585   if (!r->is_old_or_humongous()) {
   586     return;
   586     return;
   587   }
   587   }
   588 
   588 
       
   589   // While we are processing RSet buffers during the collection, we
       
   590   // actually don't want to scan any cards on the collection set,
       
   591   // since we don't want to update remembered sets with entries that
       
   592   // point into the collection set, given that live objects from the
       
   593   // collection set are about to move and such entries will be stale
       
   594   // very soon. This change also deals with a reliability issue which
       
   595   // involves scanning a card in the collection set and coming across
       
   596   // an array that was being chunked and looking malformed. Note,
       
   597   // however, that if evacuation fails, we have to scan any objects
       
   598   // that were not moved and create any missing entries.
       
   599   if (r->in_collection_set()) {
       
   600     return;
       
   601   }
       
   602 
   589   // The result from the hot card cache insert call is either:
   603   // The result from the hot card cache insert call is either:
   590   //   * pointer to the current card
   604   //   * pointer to the current card
   591   //     (implying that the current card is not 'hot'),
   605   //     (implying that the current card is not 'hot'),
   592   //   * null
   606   //   * null
   593   //     (meaning we had inserted the card ptr into the "hot" card cache,
   607   //     (meaning we had inserted the card ptr into the "hot" card cache,
   608       start = _ct_bs->addr_for(card_ptr);
   622       start = _ct_bs->addr_for(card_ptr);
   609       r = _g1->heap_region_containing(start);
   623       r = _g1->heap_region_containing(start);
   610 
   624 
   611       // Check whether the region formerly in the cache should be
   625       // Check whether the region formerly in the cache should be
   612       // ignored, as discussed earlier for the original card.  The
   626       // ignored, as discussed earlier for the original card.  The
   613       // region could have been freed while in the cache.
   627       // region could have been freed while in the cache.  The cset is
       
   628       // not relevant here, since we're in concurrent phase.
   614       if (!r->is_old_or_humongous()) {
   629       if (!r->is_old_or_humongous()) {
   615         return;
   630         return;
   616       }
   631       }
   617     } // Else we still have the original card.
   632     } // Else we still have the original card.
   618   }
   633   }