Commit 8996e262 authored by Gabriel Charette's avatar Gabriel Charette Committed by Commit Bot

Fix 'num cores' in ConcurrentMarking as well.

This is a follow-up to https://chromium-review.googlesource.com/904662
as I forgot this callsite there. The perf tests still haven't recovered
from decreasing the worker count by 1 to account for main thread
(crbug.com/809961) and I assume this line is at fault.

If this is correct, it also indicates ConcurrentMarking as a great
area to focus since a single extra worker appears to be making a
significant difference.

R=mlippautz@chromium.org

Bug: chromium:809961, chromium:808028
Change-Id: I9df933a4193fb25ea4e857f589e2164c8a2859b4
Reviewed-on: https://chromium-review.googlesource.com/911670Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51249}
parent d3ca0d00
......@@ -520,8 +520,11 @@ void ConcurrentMarking::ScheduleTasks() {
if (task_count_ == 0) {
// TODO(ulan): Increase the number of tasks for platforms that benefit
// from it.
task_count_ = static_cast<int>(
V8::GetCurrentPlatform()->NumberOfAvailableBackgroundThreads() / 2);
task_count_ =
(static_cast<int>(
V8::GetCurrentPlatform()->NumberOfAvailableBackgroundThreads()) +
1) /
2;
task_count_ = Max(Min(task_count_, kMaxTasks), 1);
}
// Task id 0 is for the main thread.
......
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