8367507: Parallel: Remove PSPromotionManager::drain_stacks_depth

Reviewed-by: fandreuzzi, tschatzl
This commit is contained in:
Albert Mingkun Yang 2025-09-15 07:48:15 +00:00
parent cf00f96fd4
commit 2c13c66cf9
3 changed files with 4 additions and 8 deletions

View File

@ -203,7 +203,7 @@ void PSPromotionManager::restore_preserved_marks() {
_preserved_marks_set->restore(&ParallelScavengeHeap::heap()->workers());
}
void PSPromotionManager::drain_stacks_depth(bool totally_drain) {
void PSPromotionManager::drain_stacks(bool totally_drain) {
const uint threshold = totally_drain ? 0
: _target_stack_size;

View File

@ -150,16 +150,12 @@ class PSPromotionManager {
void flush_labs();
void flush_string_dedup_requests() { _string_dedup_requests.flush(); }
void drain_stacks(bool totally_drain) {
drain_stacks_depth(totally_drain);
}
public:
void drain_stacks_cond_depth() {
if (claimed_stack_depth()->size() > _target_stack_size) {
drain_stacks_depth(false);
drain_stacks(false);
}
}
void drain_stacks_depth(bool totally_drain);
void drain_stacks(bool totally_drain);
bool stacks_empty() {
return claimed_stack_depth()->is_empty();

View File

@ -127,7 +127,7 @@ static void steal_work(TaskTerminator& terminator, uint worker_id) {
ScannerTask task;
if (PSPromotionManager::steal_depth(worker_id, task)) {
pm->process_popped_location_depth(task, true);
pm->drain_stacks_depth(true);
pm->drain_stacks(true);
} else {
if (terminator.offer_termination()) {
break;