changeset 9633:ea048c4db035

8144052: mark_card_deferred does not need to check g1_young_gen Reviewed-by: tschatzl, mgerdin
author ehelin
date Fri, 27 Nov 2015 13:39:45 +0100
parents 223b7d23c41c
children 2e2b5ba89432
files src/share/vm/gc/g1/g1ParScanThreadState.hpp src/share/vm/gc/g1/g1SATBCardTableModRefBS.cpp
diffstat 2 files changed, 1 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/gc/g1/g1ParScanThreadState.hpp	Sun Nov 29 15:08:40 2015 +0100
+++ b/src/share/vm/gc/g1/g1ParScanThreadState.hpp	Fri Nov 27 13:39:45 2015 +0100
@@ -101,7 +101,7 @@
   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)) {
--- a/src/share/vm/gc/g1/g1SATBCardTableModRefBS.cpp	Sun Nov 29 15:08:40 2015 +0100
+++ b/src/share/vm/gc/g1/g1SATBCardTableModRefBS.cpp	Fri Nov 27 13:39:45 2015 +0100
@@ -85,11 +85,6 @@
     return false;
   }
 
-  if  (val == g1_young_gen) {
-    // the card is for a young gen region. We don't need to keep track of all pointers into young
-    return false;
-  }
-
   // Cached bit can be installed either on a clean card or on a claimed card.
   jbyte new_val = val;
   if (val == clean_card_val()) {