Commit a6519e88 authored by Chris Palmer's avatar Chris Palmer Committed by Commit Bot

Temporarily turn off the memory-zeroing optimization on macOS.

It is breaking macOS GPU tests.

Bug: 890752
TBR: ajwong
Change-Id: I3f686473483cab053fc43e3d4b719a2900bdd71b
Cq-Include-Trybots: luci.chromium.try:mac_optional_gpu_tests_rel
Reviewed-on: https://chromium-review.googlesource.com/1255592Reviewed-by: default avatarChris Palmer <palmer@chromium.org>
Commit-Queue: Chris Palmer <palmer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#595654}
parent 07911797
...@@ -478,7 +478,11 @@ void* PartitionBucket::SlowPathAlloc(PartitionRootBase* root, ...@@ -478,7 +478,11 @@ void* PartitionBucket::SlowPathAlloc(PartitionRootBase* root,
PartitionExcessiveAllocationSize(); PartitionExcessiveAllocationSize();
} }
new_page = PartitionDirectMap(root, flags, size); new_page = PartitionDirectMap(root, flags, size);
#if !defined(OS_MACOSX)
// TODO(https://crbug.com/890752): Remove this when we figure out and fix
// whatever is breaking on macOS.
*is_already_zeroed = true; *is_already_zeroed = true;
#endif
} else if (LIKELY(this->SetNewActivePage())) { } else if (LIKELY(this->SetNewActivePage())) {
// First, did we find an active page in the active pages list? // First, did we find an active page in the active pages list?
new_page = this->active_pages_head; new_page = this->active_pages_head;
...@@ -510,7 +514,11 @@ void* PartitionBucket::SlowPathAlloc(PartitionRootBase* root, ...@@ -510,7 +514,11 @@ void* PartitionBucket::SlowPathAlloc(PartitionRootBase* root,
void* addr = PartitionPage::ToPointer(new_page); void* addr = PartitionPage::ToPointer(new_page);
root->RecommitSystemPages(addr, new_page->bucket->get_bytes_per_span()); root->RecommitSystemPages(addr, new_page->bucket->get_bytes_per_span());
new_page->Reset(); new_page->Reset();
#if !defined(OS_MACOSX)
// TODO(https://crbug.com/890752): Remove this when we figure out and fix
// whatever is breaking on macOS.
*is_already_zeroed = true; *is_already_zeroed = true;
#endif
} }
DCHECK(new_page); DCHECK(new_page);
} else { } else {
...@@ -520,7 +528,11 @@ void* PartitionBucket::SlowPathAlloc(PartitionRootBase* root, ...@@ -520,7 +528,11 @@ void* PartitionBucket::SlowPathAlloc(PartitionRootBase* root,
if (LIKELY(raw_pages != nullptr)) { if (LIKELY(raw_pages != nullptr)) {
new_page = PartitionPage::FromPointerNoAlignmentCheck(raw_pages); new_page = PartitionPage::FromPointerNoAlignmentCheck(raw_pages);
InitializeSlotSpan(new_page); InitializeSlotSpan(new_page);
#if !defined(OS_MACOSX)
// TODO(https://crbug.com/890752): Remove this when we figure out and fix
// whatever is breaking on macOS.
*is_already_zeroed = true; *is_already_zeroed = true;
#endif
} }
} }
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include "base/allocator/partition_allocator/partition_bucket.h" #include "base/allocator/partition_allocator/partition_bucket.h"
#include "base/allocator/partition_allocator/partition_direct_map_extent.h" #include "base/allocator/partition_allocator/partition_direct_map_extent.h"
#include "base/allocator/partition_allocator/partition_page.h" #include "base/allocator/partition_allocator/partition_page.h"
#include "build/build_config.h"
namespace base { namespace base {
namespace internal { namespace internal {
...@@ -141,6 +142,11 @@ ALWAYS_INLINE void* PartitionRootBase::AllocFromBucket(PartitionBucket* bucket, ...@@ -141,6 +142,11 @@ ALWAYS_INLINE void* PartitionRootBase::AllocFromBucket(PartitionBucket* bucket,
} }
PartitionCookieWriteValue(char_ret + kCookieSize + no_cookie_size); PartitionCookieWriteValue(char_ret + kCookieSize + no_cookie_size);
#else #else
#if defined(OS_MACOSX)
// TODO(https://crbug.com/890752): Remove this when we figure out and fix
// whatever is breaking on macOS.
is_already_zeroed = false;
#endif
if (ret && zero_fill && !is_already_zeroed) { if (ret && zero_fill && !is_already_zeroed) {
memset(ret, 0, size); memset(ret, 0, size);
} }
......
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