changeset 9634:2e2b5ba89432

8144067: Pass obj directly to G1ParScanThreadState::update_rs Reviewed-by: tschatzl, mgerdin
author ehelin
date Fri, 27 Nov 2015 13:39:50 +0100
parents ea048c4db035
children 5f8c665ec2eb
files src/share/vm/gc/g1/g1OopClosures.inline.hpp src/share/vm/gc/g1/g1ParScanThreadState.hpp src/share/vm/gc/g1/g1ParScanThreadState.inline.hpp
diffstat 3 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/gc/g1/g1OopClosures.inline.hpp	Fri Nov 27 13:39:45 2015 +0100
+++ b/src/share/vm/gc/g1/g1OopClosures.inline.hpp	Fri Nov 27 13:39:50 2015 +0100
@@ -91,7 +91,7 @@
       if (state.is_humongous()) {
         _g1->set_humongous_is_live(obj);
       }
-      _par_scan_state->update_rs(_from, p);
+      _par_scan_state->update_rs(_from, p, obj);
     }
   }
 }
--- a/src/share/vm/gc/g1/g1ParScanThreadState.hpp	Fri Nov 27 13:39:45 2015 +0100
+++ b/src/share/vm/gc/g1/g1ParScanThreadState.hpp	Fri Nov 27 13:39:50 2015 +0100
@@ -98,10 +98,10 @@
 
   template <class T> void push_on_queue(T* ref);
 
-  template <class T> void update_rs(HeapRegion* from, T* p) {
+  template <class T> void update_rs(HeapRegion* from, T* p, oop o) {
     // 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_young()) {
+    if (!from->is_in_reserved(o) && !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/g1ParScanThreadState.inline.hpp	Fri Nov 27 13:39:45 2015 +0100
+++ b/src/share/vm/gc/g1/g1ParScanThreadState.inline.hpp	Fri Nov 27 13:39:50 2015 +0100
@@ -56,7 +56,7 @@
   }
 
   assert(obj != NULL, "Must be");
-  update_rs(from, p);
+  update_rs(from, p, obj);
 }
 
 template <class T> inline void G1ParScanThreadState::push_on_queue(T* ref) {