Chromium Code Reviews| Index: chrome/common/stack_sampling_configuration.cc |
| diff --git a/chrome/common/stack_sampling_configuration.cc b/chrome/common/stack_sampling_configuration.cc |
| index c2b0786442b1541f0c0f2ec144f5b300a16f3585..36ff7cc7458e7ba351874dd686da1d856373ce08 100644 |
| --- a/chrome/common/stack_sampling_configuration.cc |
| +++ b/chrome/common/stack_sampling_configuration.cc |
| @@ -7,6 +7,7 @@ |
| #include "base/command_line.h" |
| #include "base/lazy_instance.h" |
| #include "base/rand_util.h" |
| +#include "build/build_config.h" |
| #include "chrome/common/channel_info.h" |
| #include "chrome/common/chrome_switches.h" |
| #include "components/version_info/version_info.h" |
| @@ -17,16 +18,23 @@ namespace { |
| base::LazyInstance<StackSamplingConfiguration>::Leaky g_configuration = |
| LAZY_INSTANCE_INITIALIZER; |
| -// The profiler is currently only implemented for Windows x64, and only runs on |
| -// trunk, canary, and dev. |
| +// The profiler is currently only implemented for Windows x64 and Mac x64. |
| bool IsProfilerSupported() { |
| -#if !defined(_WIN64) |
| - return false; |
| -#else |
| +#if defined(OS_WIN) |
|
Mike Wittman
2017/03/27 19:48:46
#if defined(OS_WIN) && defined(ARCH_CPU_X86_64)
Avi (use Gerrit)
2017/03/29 17:52:09
Done.
|
| + // Only run on trunk, canary, and dev. |
| const version_info::Channel channel = chrome::GetChannel(); |
|
Mike Wittman
2017/03/27 19:48:46
Can we do this so we have the same approach wrt th
Avi (use Gerrit)
2017/03/29 17:52:09
Done.
|
| - return (channel == version_info::Channel::UNKNOWN || |
| - channel == version_info::Channel::CANARY || |
| - channel == version_info::Channel::DEV); |
| + return channel == version_info::Channel::UNKNOWN || |
| + channel == version_info::Channel::CANARY || |
| + channel == version_info::Channel::DEV; |
| +#elif defined(OS_MACOSX) |
| + // This is experimental, so only run on trunk. |
| + #if defined(GOOGLE_CHROME_BUILD) |
|
Mike Wittman
2017/03/20 19:21:30
Can you apply the same change to the OS_WIN sectio
Avi (use Gerrit)
2017/03/27 16:06:30
Done.
|
| + return false; |
| + #else |
| + return true; |
| + #endif |
| +#else |
| + return false; |
| #endif |
| } |