8247593: Shenandoah: should not block pacing reporters

Reviewed-by: rkennke
This commit is contained in:
Aleksey Shipilev 2020-06-17 09:43:16 +02:00
parent 6d2959b393
commit aeeaffa888
5 changed files with 41 additions and 15 deletions

View file

@ -53,6 +53,9 @@ ShenandoahControlThread::ShenandoahControlThread() :
create_and_start(ShenandoahCriticalControlThreadPriority ? CriticalPriority : NearMaxPriority);
_periodic_task.enroll();
_periodic_satb_flush_task.enroll();
if (ShenandoahPacing) {
_periodic_pacer_notify_task.enroll();
}
}
ShenandoahControlThread::~ShenandoahControlThread() {
@ -68,6 +71,11 @@ void ShenandoahPeriodicSATBFlushTask::task() {
ShenandoahHeap::heap()->force_satb_flush_all_threads();
}
void ShenandoahPeriodicPacerNotify::task() {
assert(ShenandoahPacing, "Should not be here otherwise");
ShenandoahHeap::heap()->pacer()->notify_waiters();
}
void ShenandoahControlThread::run_service() {
ShenandoahHeap* heap = ShenandoahHeap::heap();