8144052: mark_card_deferred does not need to check g1_young_gen

Reviewed-by: tschatzl, mgerdin
This commit is contained in:
Erik Helin 2015-11-27 13:39:45 +01:00
parent 34d5bd8db1
commit 86d5c93087
2 changed files with 1 additions and 6 deletions

View file

@ -101,7 +101,7 @@ class G1ParScanThreadState : public CHeapObj<mtGC> {
template <class T> void update_rs(HeapRegion* from, T* p) {
// If the new value of the field points to the same region or
// is the to-space, we don't need to include it in the Rset updates.
if (!from->is_in_reserved(oopDesc::load_decode_heap_oop(p)) && !from->is_survivor()) {
if (!from->is_in_reserved(oopDesc::load_decode_heap_oop(p)) && !from->is_young()) {
size_t card_index = ctbs()->index_for(p);
// If the card hasn't been added to the buffer, do it.
if (ctbs()->mark_card_deferred(card_index)) {