mirror of
https://github.com/openjdk/jdk.git
synced 2026-01-28 12:09:14 +00:00
8367507: Parallel: Remove PSPromotionManager::drain_stacks_depth
Reviewed-by: fandreuzzi, tschatzl
This commit is contained in:
parent
cf00f96fd4
commit
2c13c66cf9
@ -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;
|
||||
|
||||
|
||||
@ -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();
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user