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

Unified Diff: chrome/browser/chrome_browser_main.cc

Issue 28283002: Track execution phase of browser process when we log if the broswer has (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed jar's comments Created 7 years, 2 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
« no previous file with comments | « no previous file | chrome/browser/metrics/metrics_service.h » ('j') | 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 63a2ff7b2a9e676c6c348f5d5edc23c6b7ce6368..948d36bf5d0f9cad57176992aa541a031fa3ec52 100644
--- a/chrome/browser/chrome_browser_main.cc
+++ b/chrome/browser/chrome_browser_main.cc
@@ -1096,6 +1096,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
// application is in the foreground or not. Do not start here.
#if !defined(OS_ANDROID)
// Now that the file thread has been started, start recording.
+ MetricsService::SetExecutionPhase(MetricsService::START_METRICS_RECORDING);
StartMetricsRecording();
#endif
@@ -1242,6 +1243,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
// calls to GetDefaultProfile().
ProfileManager::AllowGetDefaultProfile();
+ MetricsService::SetExecutionPhase(MetricsService::CREATE_PROFILE);
profile_ = CreateProfile(parameters(), user_data_dir_, parsed_command_line());
if (!profile_)
return content::RESULT_CODE_NORMAL_EXIT;
@@ -1426,6 +1428,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
// Start watching for hangs during startup. We disarm this hang detector when
// ThreadWatcher takes over or when browser is shutdown or when
// startup_watcher_ is deleted.
+ MetricsService::SetExecutionPhase(MetricsService::STARTUP_TIMEBOMB_ARM);
startup_watcher_->Arm(base::TimeDelta::FromSeconds(300));
// On mobile, need for clean shutdown arises only when the application comes
@@ -1447,6 +1450,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
#endif
// Start watching all browser threads for responsiveness.
+ MetricsService::SetExecutionPhase(MetricsService::THREAD_WATCHER_START);
ThreadWatcherList::StartWatchingAll(parsed_command_line());
#if !defined(DISABLE_NACL)
@@ -1618,6 +1622,7 @@ bool ChromeBrowserMainParts::MainMessageLoopRun(int* result_code) {
performance_monitor::PerformanceMonitor::GetInstance()->StartGatherCycle();
+ MetricsService::SetExecutionPhase(MetricsService::MAIN_MESSAGE_LOOP_RUN);
run_loop.Run();
return true;
@@ -1634,6 +1639,7 @@ void ChromeBrowserMainParts::PostMainMessageLoopRun() {
// Start watching for jank during shutdown. It gets disarmed when
// |shutdown_watcher_| object is destructed.
+ MetricsService::SetExecutionPhase(MetricsService::SHUTDOWN_TIMEBOMB_ARM);
shutdown_watcher_->Arm(base::TimeDelta::FromSeconds(300));
// Disarm the startup hang detector time bomb if it is still Arm'ed.
« no previous file with comments | « no previous file | chrome/browser/metrics/metrics_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698