< prev index next >

src/hotspot/share/gc/g1/g1FullGCCompactTask.cpp

Print this page
@@ -29,10 +29,11 @@
  #include "gc/g1/g1FullCollector.inline.hpp"
  #include "gc/g1/g1FullGCCompactionPoint.hpp"
  #include "gc/g1/g1FullGCCompactTask.hpp"
  #include "gc/g1/heapRegion.inline.hpp"
  #include "gc/shared/gcTraceTime.inline.hpp"
+ #include "gc/shared/slidingForwarding.inline.hpp"
  #include "logging/log.hpp"
  #include "oops/oop.inline.hpp"
  #include "utilities/ticks.hpp"
  
  // Do work for all skip-compacting regions.

@@ -58,15 +59,15 @@
    }
  };
  
  size_t G1FullGCCompactTask::G1CompactRegionClosure::apply(oop obj) {
    size_t size = obj->size();
-   HeapWord* destination = cast_from_oop<HeapWord*>(obj->forwardee());
-   if (destination == NULL) {
+   if (!obj->is_forwarded()) {
      // Object not moving
      return size;
    }
+   HeapWord* destination = cast_from_oop<HeapWord*>(_forwarding->forwardee(obj));
  
    // copy object and reinit its mark
    HeapWord* obj_addr = cast_from_oop<HeapWord*>(obj);
    assert(obj_addr != destination, "everything in this pass should be moving");
    Copy::aligned_conjoint_words(obj_addr, destination, size);
< prev index next >