summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authorcaseq <caseq@chromium.org>2015-10-28 16:21:01 -0700
committerCommit bot <commit-bot@chromium.org>2015-10-28 23:22:31 +0000
commite462c9f08139616829494943e071f102c938f2dd (patch)
treef40f171e48f9639a447962c7643fa6f8ff80a814 /base
parentf8adcdaa0b2190b6c208d608b62caed1861e9952 (diff)
downloadchromium_src-e462c9f08139616829494943e071f102c938f2dd.zip
chromium_src-e462c9f08139616829494943e071f102c938f2dd.tar.gz
chromium_src-e462c9f08139616829494943e071f102c938f2dd.tar.bz2
Revert "reland 1: "mac: Run A/B experiment on SharedMemory mechanism for resource buffers.""
This reverts commit 8797516daa4b465022ee42ce57a8bb40ed53316d. Reason: speculative revert to see if it's the cause of massive layout test failures on MacOS 10.6 that started here: http://build.chromium.org/p/chromium.webkit/builders/WebKit%20Mac10.6/builds/46021 BUG=547261, 466437 TBR=mark@chromium.org, isherman@chromium.org, asvitkine@chromium.org, avi@chromium.org, erikchen@chromium.org NOTRY=true Review URL: https://codereview.chromium.org/1411573008 Cr-Commit-Position: refs/heads/master@{#356688}
Diffstat (limited to 'base')
-rw-r--r--base/memory/shared_memory.h4
-rw-r--r--base/memory/shared_memory_handle.h3
-rw-r--r--base/memory/shared_memory_mac.cc47
3 files changed, 0 insertions, 54 deletions
diff --git a/base/memory/shared_memory.h b/base/memory/shared_memory.h
index 5cdcb0d..18416c0 100644
--- a/base/memory/shared_memory.h
+++ b/base/memory/shared_memory.h
@@ -140,10 +140,6 @@ class BASE_EXPORT SharedMemory {
// http://crbug.com/466437.
bool CreateAndMapAnonymousPosix(size_t size);
bool CreateAnonymousPosix(size_t size);
-
- // This method is an analog of CreateAndMapAnonymous that forces the
- // underlying OS primitive to be a Mach memory object.
- bool CreateAndMapAnonymousMach(size_t size);
#endif // defined(OS_MACOSX) && !defined(OS_IOS)
// Creates an anonymous shared memory segment of size size.
diff --git a/base/memory/shared_memory_handle.h b/base/memory/shared_memory_handle.h
index 49398a4..b3dfc8f 100644
--- a/base/memory/shared_memory_handle.h
+++ b/base/memory/shared_memory_handle.h
@@ -75,15 +75,12 @@ class BASE_EXPORT SharedMemoryHandle {
#else
class BASE_EXPORT SharedMemoryHandle {
public:
- // The values of these enums must not change, as they are used by the
- // histogram OSX.SharedMemory.Mechanism.
enum Type {
// The SharedMemoryHandle is backed by a POSIX fd.
POSIX,
// The SharedMemoryHandle is backed by the Mach primitive "memory object".
MACH,
};
- static const int TypeMax = 2;
// The format that should be used to transmit |Type| over the wire.
typedef int TypeWireFormat;
diff --git a/base/memory/shared_memory_mac.cc b/base/memory/shared_memory_mac.cc
index 47b8a89..799b8e3 100644
--- a/base/memory/shared_memory_mac.cc
+++ b/base/memory/shared_memory_mac.cc
@@ -14,8 +14,6 @@
#include "base/files/scoped_file.h"
#include "base/logging.h"
#include "base/mac/scoped_mach_vm.h"
-#include "base/metrics/field_trial.h"
-#include "base/metrics/histogram_macros.h"
#include "base/posix/eintr_wrapper.h"
#include "base/posix/safe_strerror.h"
#include "base/process/process_metrics.h"
@@ -31,38 +29,6 @@ namespace base {
namespace {
-const char kTrialName[] = "MacMemoryMechanism";
-const char kTrialMach[] = "Mach";
-const char kTrialPosix[] = "Posix";
-
-SharedMemoryHandle::Type GetABTestMechanism() {
- static bool found_group = false;
- static SharedMemoryHandle::Type group = SharedMemoryHandle::MACH;
-
- if (found_group)
- return group;
-
- const std::string group_name =
- base::FieldTrialList::FindFullName(kTrialName);
- if (group_name == kTrialMach) {
- group = SharedMemoryHandle::MACH;
- found_group = true;
- } else if (group_name == kTrialPosix) {
- group = SharedMemoryHandle::POSIX;
- found_group = true;
- } else {
- group = SharedMemoryHandle::MACH;
- }
-
- return group;
-}
-
-// Emits a histogram entry indicating which type of SharedMemory was created.
-void EmitMechanism(SharedMemoryHandle::Type type) {
- UMA_HISTOGRAM_ENUMERATION("OSX.SharedMemory.Mechanism", type,
- SharedMemoryHandle::TypeMax);
-}
-
// Returns whether the operation succeeded.
// |new_handle| is an output variable, populated on success. The caller takes
// ownership of the underlying memory object.
@@ -261,17 +227,6 @@ bool SharedMemory::CreateAnonymousPosix(size_t size) {
return Create(options);
}
-bool SharedMemory::CreateAndMapAnonymousMach(size_t size) {
- SharedMemoryCreateOptions options;
-
- // A/B test the mechanism. Once the experiment is over, this will always be
- // set to SharedMemoryHandle::MACH.
- // http://crbug.com/547261
- options.type = GetABTestMechanism();
- options.size = size;
- return Create(options) && Map(size);
-}
-
// static
bool SharedMemory::GetSizeFromSharedMemoryHandle(
const SharedMemoryHandle& handle,
@@ -293,8 +248,6 @@ bool SharedMemory::Create(const SharedMemoryCreateOptions& options) {
if (options.size > static_cast<size_t>(std::numeric_limits<int>::max()))
return false;
- EmitMechanism(options.type);
-
if (options.type == SharedMemoryHandle::MACH) {
shm_ = SharedMemoryHandle(options.size);
requested_size_ = options.size;