void ShenandoahMark::start_mark() { if (!CodeCache::is_gc_marking_cycle_active()) {
CodeCache::on_gc_marking_cycle_start();
}
}
void ShenandoahMark::end_mark() { // Unlike other GCs, we do not arm the nmethods // when marking terminates.
CodeCache::on_gc_marking_cycle_finish();
}
// TODO: We can clean up this if we figure out how to do templated oop closures that // play nice with specialized_oop_iterators. if (heap->has_forwarded_objects()) { using Closure = ShenandoahMarkUpdateRefsClosure;
Closure cl(q, rp);
mark_loop_work<Closure, CANCELLABLE, STRING_DEDUP>(&cl, ld, w, t, req);
} else { using Closure = ShenandoahMarkRefsClosure;
Closure cl(q, rp);
mark_loop_work<Closure, CANCELLABLE, STRING_DEDUP>(&cl, ld, w, t, req);
}
/* *Normalmarkingloop:
*/ while (true) { if (CANCELLABLE && heap->check_cancelled_gc_and_yield()) { return;
}
while (satb_mq_set.completed_buffers_num() > 0) {
satb_mq_set.apply_closure_to_completed_buffer(&drain_satb);
}
uint work = 0; for (uint i = 0; i < stride; i++) { if (q->pop(t) ||
queues->steal(worker_id, t)) {
do_task<T, STRING_DEDUP>(q, cl, live_data, req, &t);
work++;
} else { break;
}
}
if (work == 0) { // No work encountered in current stride, try to terminate. // Need to leave the STS here otherwise it might block safepoints.
ShenandoahSuspendibleThreadSetLeaver stsl(CANCELLABLE && ShenandoahSuspendibleWorkers);
ShenandoahTerminatorTerminator tt(heap); if (terminator->offer_termination(&tt)) return;
}
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.