< prev index next >

src/share/vm/gc/shenandoah/shenandoahHeap.cpp

Print this page
rev 13130 : Interleave partial GCs with concurrent GCs.


2620           _heap->complete_mark_bit_map()->clear_range_large(MemRegion(bottom, top));
2621         }
2622       }
2623       r = _regions->claim_next();
2624     }
2625   }
2626 };
2627 
2628 void ShenandoahHeap::concurrent_update_heap_references() {
2629   _shenandoah_policy->record_phase_start(ShenandoahCollectorPolicy::conc_update_refs);
2630   ShenandoahUpdateHeapRefsTask task;
2631   workers()->run_task(&task);
2632   _shenandoah_policy->record_phase_end(ShenandoahCollectorPolicy::conc_update_refs);
2633 }
2634 
2635 void ShenandoahHeap::prepare_update_refs() {
2636   assert(SafepointSynchronize::is_at_safepoint(), "must be at safepoint");
2637   set_evacuation_in_progress_at_safepoint(false);
2638   set_update_refs_in_progress(true);
2639   ensure_parsability(true);

2640   for (uint i = 0; i < _num_regions; i++) {
2641     ShenandoahHeapRegion* r = _ordered_regions->get(i);
2642     r->set_concurrent_iteration_safe_limit(r->top());
2643   }
2644 }
2645 
2646 void ShenandoahHeap::finish_update_refs() {
2647   assert(SafepointSynchronize::is_at_safepoint(), "must be at safepoint");
2648 
2649   if (! cancelled_concgc()) {
2650     concurrentMark()->update_roots();
2651     recycle_dirty_regions();
2652     set_need_update_refs(false);
2653 
2654     if (ShenandoahVerify) {
2655       verify_update_refs();
2656     }
2657 
2658   }
2659   set_update_refs_in_progress(false);




2620           _heap->complete_mark_bit_map()->clear_range_large(MemRegion(bottom, top));
2621         }
2622       }
2623       r = _regions->claim_next();
2624     }
2625   }
2626 };
2627 
2628 void ShenandoahHeap::concurrent_update_heap_references() {
2629   _shenandoah_policy->record_phase_start(ShenandoahCollectorPolicy::conc_update_refs);
2630   ShenandoahUpdateHeapRefsTask task;
2631   workers()->run_task(&task);
2632   _shenandoah_policy->record_phase_end(ShenandoahCollectorPolicy::conc_update_refs);
2633 }
2634 
2635 void ShenandoahHeap::prepare_update_refs() {
2636   assert(SafepointSynchronize::is_at_safepoint(), "must be at safepoint");
2637   set_evacuation_in_progress_at_safepoint(false);
2638   set_update_refs_in_progress(true);
2639   ensure_parsability(true);
2640   connection_matrix()->clear_all();
2641   for (uint i = 0; i < _num_regions; i++) {
2642     ShenandoahHeapRegion* r = _ordered_regions->get(i);
2643     r->set_concurrent_iteration_safe_limit(r->top());
2644   }
2645 }
2646 
2647 void ShenandoahHeap::finish_update_refs() {
2648   assert(SafepointSynchronize::is_at_safepoint(), "must be at safepoint");
2649 
2650   if (! cancelled_concgc()) {
2651     concurrentMark()->update_roots();
2652     recycle_dirty_regions();
2653     set_need_update_refs(false);
2654 
2655     if (ShenandoahVerify) {
2656       verify_update_refs();
2657     }
2658 
2659   }
2660   set_update_refs_in_progress(false);


< prev index next >