< prev index next >

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

Print this page
rev 12191 : Improve handling of cancelled-gc flag.

*** 374,384 **** st->print("marking "); } if (_evacuation_in_progress) { st->print("evacuating "); } ! if (_cancelled_concgc) { st->print("cancelled "); } st->print("\n"); if (Verbose) { --- 374,384 ---- st->print("marking "); } if (_evacuation_in_progress) { st->print("evacuating "); } ! if (cancelled_concgc()) { st->print("cancelled "); } st->print("\n"); if (Verbose) {
*** 2048,2068 **** return _free_regions->used(); } void ShenandoahHeap::cancel_concgc() { // only report it once ! if (!_cancelled_concgc) { log_info(gc)("Cancelling GC"); ! _cancelled_concgc = true; ! OrderAccess::fence(); _shenandoah_policy->report_concgc_cancelled(); } } void ShenandoahHeap::clear_cancelled_concgc() { ! _cancelled_concgc = false; } uint ShenandoahHeap::max_workers() { return _max_workers; } --- 2048,2067 ---- return _free_regions->used(); } void ShenandoahHeap::cancel_concgc() { // only report it once ! if (! cancelled_concgc()) { log_info(gc)("Cancelling GC"); ! set_cancelled_concgc(true); _shenandoah_policy->report_concgc_cancelled(); } } void ShenandoahHeap::clear_cancelled_concgc() { ! set_cancelled_concgc(false); } uint ShenandoahHeap::max_workers() { return _max_workers; }
*** 2075,2085 **** } void ShenandoahHeap::stop() { // We set this early here, to let GC threads terminate before we ask the concurrent thread // to terminate, which would otherwise block until all GC threads come to finish normally. ! _cancelled_concgc = true; _concurrent_gc_thread->stop(); cancel_concgc(); } void ShenandoahHeap::unlink_string_and_symbol_table(BoolObjectClosure* is_alive, bool process_strings, bool process_symbols) { --- 2074,2084 ---- } void ShenandoahHeap::stop() { // We set this early here, to let GC threads terminate before we ask the concurrent thread // to terminate, which would otherwise block until all GC threads come to finish normally. ! set_cancelled_concgc(true); _concurrent_gc_thread->stop(); cancel_concgc(); } void ShenandoahHeap::unlink_string_and_symbol_table(BoolObjectClosure* is_alive, bool process_strings, bool process_symbols) {
< prev index next >