8249877: Shenandoah: Report number of dead weak oops during STW weak roots

Reviewed-by: zgu
This commit is contained in:
Roman Kennke 2020-07-22 15:16:57 +02:00
parent 18cf3d8080
commit 45e17d8dd2
3 changed files with 8 additions and 0 deletions

View File

@ -2247,6 +2247,7 @@ void ShenandoahHeap::stw_process_weak_roots(bool full_gc) {
ShenandoahParallelWeakRootsCleaningTask<ShenandoahForwardedIsAliveClosure, ShenandoahUpdateRefsClosure>
cleaning_task(timing_phase, &is_alive, &keep_alive, num_workers, !ShenandoahConcurrentRoots::should_do_concurrent_class_unloading());
_workers->run_task(&cleaning_task);
cleaning_task.report_num_dead();
} else {
ShenandoahIsAliveClosure is_alive;
#ifdef ASSERT
@ -2258,6 +2259,7 @@ void ShenandoahHeap::stw_process_weak_roots(bool full_gc) {
cleaning_task(timing_phase, &is_alive, &do_nothing_cl, num_workers, !ShenandoahConcurrentRoots::should_do_concurrent_class_unloading());
#endif
_workers->run_task(&cleaning_task);
cleaning_task.report_num_dead();
}
}

View File

@ -52,6 +52,7 @@ public:
~ShenandoahParallelWeakRootsCleaningTask();
void work(uint worker_id);
void report_num_dead();
};
// Perform class unloading at a pause

View File

@ -68,4 +68,9 @@ void ShenandoahParallelWeakRootsCleaningTask<IsAlive, KeepAlive>::work(uint work
}
}
template<typename IsAlive, typename KeepAlive>
void ShenandoahParallelWeakRootsCleaningTask<IsAlive, KeepAlive>::report_num_dead() {
_weak_processing_task.report_num_dead();
}
#endif // SHARE_GC_SHENANDOAH_SHENANDOAHPARALLELCLEANING_INLINE_HPP