8144052: mark_card_deferred does not need to check g1_young_gen
authorehelin
Fri, 27 Nov 2015 13:39:45 +0100
changeset 34615 8635e4864846
parent 34614 5f1e98f98bb7
child 34616 421a6405ca30
8144052: mark_card_deferred does not need to check g1_young_gen Reviewed-by: tschatzl, mgerdin
hotspot/src/share/vm/gc/g1/g1ParScanThreadState.hpp
hotspot/src/share/vm/gc/g1/g1SATBCardTableModRefBS.cpp
--- a/hotspot/src/share/vm/gc/g1/g1ParScanThreadState.hpp	Sun Nov 29 15:08:40 2015 +0100
+++ b/hotspot/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/hotspot/src/share/vm/gc/g1/g1SATBCardTableModRefBS.cpp	Sun Nov 29 15:08:40 2015 +0100
+++ b/hotspot/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()) {