< prev index next >

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

Print this page
rev 57380 : 8234974: Shenandoah: Do concurrent roots even when no evacuation is necessary

*** 540,549 **** --- 540,550 ---- if (is_update_refs_in_progress()) st->print("updating refs, "); if (is_concurrent_traversal_in_progress()) st->print("traversal, "); if (is_degenerated_gc_in_progress()) st->print("degenerated gc, "); if (is_full_gc_in_progress()) st->print("full gc, "); if (is_full_gc_move_in_progress()) st->print("full gc move, "); + if (is_concurrent_root_in_progress()) st->print("concurrent roots, "); if (cancelled_gc()) { st->print("cancelled"); } else { st->print("not cancelled");
*** 1538,1547 **** --- 1539,1553 ---- heuristics()->choose_collection_set(_collection_set); _free_set->rebuild(); } + if (!is_degenerated_gc_in_progress()) { + prepare_concurrent_roots(); + prepare_concurrent_unloading(); + } + // If collection set has candidates, start evacuation. // Otherwise, bypass the rest of the cycle. if (!collection_set()->is_empty()) { ShenandoahGCPhase init_evac(ShenandoahPhaseTimings::init_evac);
*** 1552,1563 **** set_evacuation_in_progress(true); // From here on, we need to update references. set_has_forwarded_objects(true); if (!is_degenerated_gc_in_progress()) { ! prepare_concurrent_roots(); ! prepare_concurrent_unloading(); evacuate_and_update_roots(); } if (ShenandoahPacing) { pacer()->setup_for_evac(); --- 1558,1570 ---- set_evacuation_in_progress(true); // From here on, we need to update references. set_has_forwarded_objects(true); if (!is_degenerated_gc_in_progress()) { ! if (ShenandoahConcurrentRoots::should_do_concurrent_class_unloading()) { ! ShenandoahCodeRoots::arm_nmethods(); ! } evacuate_and_update_roots(); } if (ShenandoahPacing) { pacer()->setup_for_evac();
*** 1667,1677 **** } } }; void ShenandoahHeap::op_roots() { ! if (is_evacuation_in_progress()) { if (ShenandoahConcurrentRoots::should_do_concurrent_class_unloading()) { _unloader.unload(); } if (ShenandoahConcurrentRoots::should_do_concurrent_roots()) { --- 1674,1684 ---- } } }; void ShenandoahHeap::op_roots() { ! if (is_concurrent_root_in_progress()) { if (ShenandoahConcurrentRoots::should_do_concurrent_class_unloading()) { _unloader.unload(); } if (ShenandoahConcurrentRoots::should_do_concurrent_roots()) {
*** 2233,2243 **** } void ShenandoahHeap::prepare_concurrent_unloading() { assert(SafepointSynchronize::is_at_safepoint(), "Must be at a safepoint"); if (ShenandoahConcurrentRoots::should_do_concurrent_class_unloading()) { - ShenandoahCodeRoots::prepare_concurrent_unloading(); _unloader.prepare(); } } void ShenandoahHeap::finish_concurrent_unloading() { --- 2240,2249 ----
< prev index next >