Commit bef9f3c5 authored by Jesse McKenna's avatar Jesse McKenna Committed by Commit Bot

Reland "Disable stack sampling profiler under App Verifier"

This reverts commit 5ea745a6.

Reason for revert: The CL this one was dependent on, whose revert caused
this CL to be reverted, was relanded (crrev.com/c/1829544).

Original change's description:
> Revert "Disable stack sampling profiler under App Verifier"
>
> This reverts commit 17178955.
>
> Reason for revert: The CL this one was dependent on caused crashes and had to
> be reverted: crrev.com/c/1828234
>
> Original change's description:
> > Disable stack sampling profiler under App Verifier
> >
> > The StackSamplingProfiler has been observed to cause crashes when
> > running under Application Verifier, a Windows utility used to detect
> > subtle programming errors. Samples collected by the
> > StackSamplingProfiler while Application Verifier is running are unlikely
> > to hold any value, as Application Verifier slows down execution
> > significantly.
> >
> > Because StackSamplingProfiler and Application Verifier are not
> > compatible, this change detects whether Application Verifier is running,
> > and does not start up StackSamplingProfiler if so.
> >
> > This is not expected to impact data collection, as Application Verifier
> > is used only by a few developers.
> >
> > Bug: 1004989
> > Change-Id: I014b3cee440e99d832ae8d84a03fe70777676a2b
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1783735
> > Commit-Queue: Jesse McKenna <jessemckenna@google.com>
> > Reviewed-by: Lei Zhang <thestig@chromium.org>
> > Reviewed-by: Mike Wittman <wittman@chromium.org>
> > Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#700356}
>
> TBR=thestig@chromium.org,wittman@chromium.org,brucedawson@chromium.org,jessemckenna@google.com
>
> Change-Id: I1c55ab21a28ceef6c3d49f83cdb5c7689ec2402f
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: 1004989
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1827187
> Reviewed-by: David Bienvenu <davidbienvenu@chromium.org>
> Commit-Queue: Jesse McKenna <jessemckenna@google.com>
> Cr-Commit-Position: refs/heads/master@{#700491}

Change-Id: I7fbb6a7503b754bfc952e718b9bebd30e69742c0
Bug: 1004989
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1829243Reviewed-by: default avatarLei Zhang <thestig@chromium.org>
Reviewed-by: default avatarDavid Bienvenu <davidbienvenu@chromium.org>
Commit-Queue: Jesse McKenna <jessemckenna@google.com>
Cr-Commit-Position: refs/heads/master@{#704333}
parent 3a1b728b
...@@ -15,6 +15,10 @@ ...@@ -15,6 +15,10 @@
#include "content/public/common/content_switches.h" #include "content/public/common/content_switches.h"
#include "extensions/buildflags/buildflags.h" #include "extensions/buildflags/buildflags.h"
#if defined(OS_WIN)
#include "base/win/static_constants.h"
#endif
#if defined(OS_MACOSX) #if defined(OS_MACOSX)
#include "base/mac/mac_util.h" #include "base/mac/mac_util.h"
#endif #endif
...@@ -189,6 +193,13 @@ StackSamplingConfiguration::GenerateConfiguration() { ...@@ -189,6 +193,13 @@ StackSamplingConfiguration::GenerateConfiguration() {
if (!IsProfilerSupported()) if (!IsProfilerSupported())
return PROFILE_DISABLED; return PROFILE_DISABLED;
#if defined(OS_WIN)
// Do not start the profiler when Application Verifier is in use; running them
// simultaneously can cause crashes and has no known use case.
if (GetModuleHandleA(base::win::kApplicationVerifierDllName))
return PROFILE_DISABLED;
#endif
switch (chrome::GetChannel()) { switch (chrome::GetChannel()) {
// Enable the profiler unconditionally for development/waterfall builds. // Enable the profiler unconditionally for development/waterfall builds.
case version_info::Channel::UNKNOWN: case version_info::Channel::UNKNOWN:
......
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