Commit 34c1c76d authored by Michael Lippautz's avatar Michael Lippautz Committed by Commit Bot

[heap] Limit the number of pointer updating tasks (again)

Task creation often dominates the actual work that is being done.

Bug: chromium:722989
Change-Id: Ibdd6ffa6f3154f17dc6ccbd30475710b97e802e7
Reviewed-on: https://chromium-review.googlesource.com/508783Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45425}
parent f7ac95c2
......@@ -348,8 +348,12 @@ int MarkCompactCollectorBase::NumberOfParallelCompactionTasks(int pages) {
}
int MarkCompactCollectorBase::NumberOfPointerUpdateTasks(int pages) {
return FLAG_parallel_pointer_update ? Min(NumberOfAvailableCores(), pages)
: 1;
// Limit the number of update tasks as task creation often dominates the
// actual work that is being done.
static const int kMaxPointerUpdateTasks = 8;
return FLAG_parallel_pointer_update
? Min(kMaxPointerUpdateTasks, Min(NumberOfAvailableCores(), pages))
: 1;
}
int MinorMarkCompactCollector::NumberOfMarkingTasks() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment