Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(399)

Unified Diff: chrome/browser/chrome_browser_main.cc

Issue 888923004: Temporary commit to evaluate perf impact of prototype CPU profiler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkcr
Patch Set: address comments Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« base/profiler/cpu_profiler_win.cc ('K') | « base/profiler/cpu_profiler_win.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
cpu_(ooo_6.6-7.5) 2015/02/05 01:03:27 you need a better name for this map, this is a tho
Mike Wittman 2015/02/05 02:08:48 Changed to a pointer parameter.
+ 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(
« base/profiler/cpu_profiler_win.cc ('K') | « base/profiler/cpu_profiler_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698