< prev index next >

src/hotspot/share/gc/shenandoah/shenandoahConcurrentGC.cpp

Print this page
*** 736,10 ***
--- 736,13 ---
    _mark.mark_concurrent_roots();
  }
  
  void ShenandoahConcurrentGC::op_mark() {
    _mark.concurrent_mark();
+   if (ShenandoahDelayGC > 0) {
+     os::naked_sleep(ShenandoahDelayGC);
+   }
  }
  
  void ShenandoahConcurrentGC::op_final_mark() {
    ShenandoahHeap* const heap = ShenandoahHeap::heap();
    assert(ShenandoahSafepoint::is_at_shenandoah_safepoint(), "Should be at safepoint");

*** 1090,10 ***
--- 1093,13 ---
    ShenandoahHeap::heap()->recycle_trash();
  }
  
  void ShenandoahConcurrentGC::op_evacuate() {
    ShenandoahHeap::heap()->evacuate_collection_set(_generation, true /*concurrent*/);
+   if (ShenandoahDelayGC > 0) {
+     os::naked_sleep(ShenandoahDelayGC);
+   }
  }
  
  void ShenandoahConcurrentGC::op_init_update_refs() {
    if (ShenandoahVerify) {
      ShenandoahHeap* const heap = ShenandoahHeap::heap();

*** 1102,10 ***
--- 1108,13 ---
    }
  }
  
  void ShenandoahConcurrentGC::op_update_refs() {
    ShenandoahHeap::heap()->update_heap_references(_generation, true /*concurrent*/);
+   if (ShenandoahDelayGC > 0) {
+     os::naked_sleep(ShenandoahDelayGC);
+   }
  }
  
  class ShenandoahUpdateThreadHandshakeClosure : public HandshakeClosure {
  private:
    // This closure runs when thread is stopped for handshake, which means
< prev index next >