Commit 065dde95 authored by Avi Drissman's avatar Avi Drissman Committed by Commit Bot

Fix OS_MACOSX usages

Two of them were in comments; updated them to V8_OS_MACOSX.

Two of them were incorrectly in #if statements. Updated them to
V8_OS_MACOSX.

Bug: chromium:823915, chromium:1105907
Change-Id: Ibfc0f8936dbc8cbf3b05a674e882bbc480d0b4c4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2331736Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69178}
parent 50d5c2bb
......@@ -419,7 +419,7 @@ bool OS::SetPermissions(void* address, size_t size, MemoryPermission access) {
// The cost is a syscall that effectively no-ops.
// TODO(erikchen): Fix this to only call MADV_FREE_REUSE when necessary.
// https://crbug.com/823915
#if defined(OS_MACOSX)
#if defined(V8_OS_MACOSX)
if (access != OS::MemoryPermission::kNoAccess)
madvise(address, size, MADV_FREE_REUSE);
#endif
......@@ -430,7 +430,7 @@ bool OS::SetPermissions(void* address, size_t size, MemoryPermission access) {
bool OS::DiscardSystemPages(void* address, size_t size) {
DCHECK_EQ(0, reinterpret_cast<uintptr_t>(address) % CommitPageSize());
DCHECK_EQ(0, size % CommitPageSize());
#if defined(OS_MACOSX)
#if defined(V8_OS_MACOSX)
// On OSX, MADV_FREE_REUSABLE has comparable behavior to MADV_FREE, but also
// marks the pages with the reusable bit, which allows both Activity Monitor
// and memory-infra to correctly track the pages.
......
......@@ -519,11 +519,11 @@ void ConcurrentMarking::ScheduleTasks() {
// 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)
#else // defined(V8_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));
#endif // defined(OS_MACOSX)
#endif // defined(V8_OS_MACOSX)
if (FLAG_gc_experiment_reduce_concurrent_marking_tasks) {
// Use at most half of the cores in the experiment.
total_task_count_ = Max(1, Min(kMaxTasks, (num_cores / 2) - 1));
......
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