< prev index next >

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

Print this page
*** 38,10 ***
--- 38,11 ---
  #include "gc/g1/g1Policy.hpp"
  #include "gc/g1/g1RegionMarkStatsCache.inline.hpp"
  #include "gc/shared/gcTraceTime.inline.hpp"
  #include "gc/shared/preservedMarks.hpp"
  #include "gc/shared/referenceProcessor.hpp"
+ #include "gc/shared/slidingForwarding.hpp"
  #include "gc/shared/verifyOption.hpp"
  #include "gc/shared/weakProcessor.inline.hpp"
  #include "gc/shared/workerPolicy.hpp"
  #include "logging/log.hpp"
  #include "runtime/biasedLocking.hpp"

*** 199,15 ***
--- 200,19 ---
    verify_after_marking();
  
    // Don't add any more derived pointers during later phases
    deactivate_derived_pointers();
  
+   SlidingForwarding::begin();
+ 
    phase2_prepare_compaction();
  
    phase3_adjust_pointers();
  
    phase4_do_compaction();
+ 
+   SlidingForwarding::end();
  }
  
  void G1FullCollector::complete_collection() {
    // Restore all marks.
    restore_marks();

*** 310,10 ***
--- 315,11 ---
    }
  }
  
  void G1FullCollector::phase2_prepare_compaction() {
    GCTraceTime(Info, gc, phases) info("Phase 2: Prepare for compaction", scope()->timer());
+ 
    G1FullGCPrepareTask task(this);
    run_task(&task);
  
    // To avoid OOM when there is memory left.
    if (!task.has_freed_regions()) {
< prev index next >