8336661: Parallel: Remove stacks_empty assert in PSScavenge::invoke

Reviewed-by: sangheki
This commit is contained in:
Albert Mingkun Yang 2024-07-18 10:08:13 +00:00
parent 72297d22d1
commit 1b83bd9225

View File

@ -401,8 +401,6 @@ bool PSScavenge::invoke(bool clear_soft_refs) {
PSPromotionManager::pre_scavenge();
// We'll use the promotion manager again later.
PSPromotionManager* promotion_manager = PSPromotionManager::vm_thread_promotion_manager();
{
GCTraceTime(Debug, gc, phases) tm("Scavenge", &_gc_timer);
@ -425,17 +423,12 @@ bool PSScavenge::invoke(bool clear_soft_refs) {
pt.print_all_references();
}
assert(promotion_manager->stacks_empty(),"stacks should be empty at this point");
{
GCTraceTime(Debug, gc, phases) tm("Weak Processing", &_gc_timer);
PSAdjustWeakRootsClosure root_closure;
WeakProcessor::weak_oops_do(&ParallelScavengeHeap::heap()->workers(), &_is_alive_closure, &root_closure, 1);
}
// Verify that usage of root_closure didn't copy any objects.
assert(promotion_manager->stacks_empty(),"stacks should be empty at this point");
// Finally, flush the promotion_manager's labs, and deallocate its stacks.
promotion_failure_occurred = PSPromotionManager::post_scavenge(_gc_tracer);
if (promotion_failure_occurred) {