src/hotspot/share/gc/g1/g1ParScanThreadState.cpp
changeset 52271 1587306fe23f
parent 52136 b52336cdb42d
child 52309 3b6680f7542f
--- a/src/hotspot/share/gc/g1/g1ParScanThreadState.cpp	Wed Oct 24 14:59:21 2018 +0200
+++ b/src/hotspot/share/gc/g1/g1ParScanThreadState.cpp	Wed Oct 24 16:22:34 2018 +0200
@@ -265,7 +265,7 @@
   Prefetch::write(obj_ptr, PrefetchCopyIntervalInBytes);
 
   const oop obj = oop(obj_ptr);
-  const oop forward_ptr = old->forward_to_atomic(obj, memory_order_relaxed);
+  const oop forward_ptr = old->forward_to_atomic(obj, old_mark, memory_order_relaxed);
   if (forward_ptr == NULL) {
     Copy::aligned_disjoint_words((HeapWord*) old, obj_ptr, word_sz);
 
@@ -355,7 +355,7 @@
 oop G1ParScanThreadState::handle_evacuation_failure_par(oop old, markOop m) {
   assert(_g1h->is_in_cset(old), "Object " PTR_FORMAT " should be in the CSet", p2i(old));
 
-  oop forward_ptr = old->forward_to_atomic(old, memory_order_relaxed);
+  oop forward_ptr = old->forward_to_atomic(old, m, memory_order_relaxed);
   if (forward_ptr == NULL) {
     // Forward-to-self succeeded. We are the "owner" of the object.
     HeapRegion* r = _g1h->heap_region_containing(old);