[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/508783
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45425}
This commit is contained in:
Michael Lippautz 2017-05-18 19:27:44 +02:00 committed by Commit Bot
parent f7ac95c24f
commit 34c1c76d8a

View File

@ -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() {