Commit ad65e584 authored by Michael Lippautz's avatar Michael Lippautz Committed by Commit Bot

heap: Remove OSX restriction for maximum parallelism

Change-Id: I582af41a8b10957b8fc7acb388871b1d51783a8c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2062395Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66317}
parent 5c612398
...@@ -515,17 +515,8 @@ void ConcurrentMarking::ScheduleTasks() { ...@@ -515,17 +515,8 @@ void ConcurrentMarking::ScheduleTasks() {
if (total_task_count_ == 0) { if (total_task_count_ == 0) {
static const int num_cores = static const int num_cores =
V8::GetCurrentPlatform()->NumberOfWorkerThreads() + 1; V8::GetCurrentPlatform()->NumberOfWorkerThreads() + 1;
#if defined(V8_OS_MACOSX) // Leave one core for the main thread and other components, respectively.
// Mac OSX 10.11 and prior seems to have trouble when doing concurrent
// marking on competing hyper-threads (regresses Octane/Splay). As such,
// only use num_cores/2, leaving one of those for the main thread.
// TODO(ulan): Use all cores on Mac 10.12+.
total_task_count_ = Max(1, Min(kMaxTasks, (num_cores / 2) - 1));
#else // defined(OS_MACOSX)
// On other platforms use all logical cores, leaving one for the main
// thread.
total_task_count_ = Max(1, Min(kMaxTasks, num_cores - 2)); total_task_count_ = Max(1, Min(kMaxTasks, num_cores - 2));
#endif // defined(OS_MACOSX)
DCHECK_LE(total_task_count_, kMaxTasks); DCHECK_LE(total_task_count_, kMaxTasks);
// One task is for the main thread. // One task is for the main thread.
STATIC_ASSERT(kMaxTasks + 1 <= MarkingWorklist::kMaxNumTasks); STATIC_ASSERT(kMaxTasks + 1 <= MarkingWorklist::kMaxNumTasks);
......
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