| Index: chrome/browser/chrome_browser_main.cc
|
| diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc
|
| index 998c36218d2d464397af86505576ba5a441f542a..bc07053bf10a4fa31ca65facf07b03baa2bd7548 100644
|
| --- a/chrome/browser/chrome_browser_main.cc
|
| +++ b/chrome/browser/chrome_browser_main.cc
|
| @@ -24,6 +24,7 @@
|
| #include "base/prefs/pref_value_store.h"
|
| #include "base/prefs/scoped_user_pref_update.h"
|
| #include "base/process/process_info.h"
|
| +#include "base/profiler/cpu_profiler.h"
|
| #include "base/profiler/scoped_tracker.h"
|
| #include "base/run_loop.h"
|
| #include "base/strings/string_number_conversions.h"
|
| @@ -996,6 +997,9 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() {
|
| // IOThread's initialization which happens in BrowserProcess:PreCreateThreads.
|
| SetupMetricsAndFieldTrials();
|
|
|
| + std::map<std::string, std::string> params;
|
| + base::CpuProfiler::Initialize(params);
|
| +
|
| // ChromeOS needs ResourceBundle::InitSharedInstance to be called before this.
|
| browser_process_->PreCreateThreads();
|
|
|
| @@ -1650,6 +1654,8 @@ void ChromeBrowserMainParts::PostMainMessageLoopRun() {
|
| NOTREACHED();
|
| #else
|
|
|
| + base::CpuProfiler::Stop();
|
| +
|
| // Start watching for jank during shutdown. It gets disarmed when
|
| // |shutdown_watcher_| object is destructed.
|
| metrics::MetricsService::SetExecutionPhase(
|
|
|