| Index: content/browser/browser_main_runner.cc
|
| diff --git a/content/browser/browser_main_runner.cc b/content/browser/browser_main_runner.cc
|
| index c7c805866569719544cdb89c1e5b793aae2ec8ed..b19fc6950ba1162569f63bee28d6cbea40e36850 100644
|
| --- a/content/browser/browser_main_runner.cc
|
| +++ b/content/browser/browser_main_runner.cc
|
| @@ -9,9 +9,11 @@
|
| #include "base/debug/leak_annotations.h"
|
| #include "base/logging.h"
|
| #include "base/metrics/histogram.h"
|
| +#include "base/metrics/histogram_macros.h"
|
| #include "base/metrics/statistics_recorder.h"
|
| #include "base/profiler/scoped_profile.h"
|
| #include "base/profiler/scoped_tracker.h"
|
| +#include "base/time/time.h"
|
| #include "base/trace_event/trace_event.h"
|
| #include "base/tracked_objects.h"
|
| #include "components/tracing/trace_config_file.h"
|
| @@ -138,6 +140,9 @@ class BrowserMainRunnerImpl : public BrowserMainRunner {
|
| }
|
|
|
| int Initialize(const MainFunctionParams& parameters) override {
|
| + SCOPED_UMA_HISTOGRAM_LONG_TIMER(
|
| + "Startup.BrowserMainRunnerImplInitializeLongTime");
|
| +
|
| // TODO(vadimt, yiyaoliu): Remove all tracked_objects references below once
|
| // crbug.com/453640 is fixed.
|
| tracked_objects::ThreadData::InitializeThreadContext("CrBrowserMain");
|
| @@ -152,6 +157,8 @@ class BrowserMainRunnerImpl : public BrowserMainRunner {
|
| if (!initialization_started_) {
|
| initialization_started_ = true;
|
|
|
| + const base::TimeTicks start_time_step1 = base::TimeTicks::Now();
|
| +
|
| SkGraphics::Init();
|
|
|
| #if !defined(OS_IOS)
|
| @@ -206,12 +213,18 @@ class BrowserMainRunnerImpl : public BrowserMainRunner {
|
| // to browser_shutdown::Shutdown or BrowserProcess::EndSession.
|
|
|
| ui::InitializeInputMethod();
|
| + UMA_HISTOGRAM_TIMES("Startup.BrowserMainRunnerImplInitializeStep1Time",
|
| + base::TimeTicks::Now() - start_time_step1);
|
| }
|
| + const base::TimeTicks start_time_step2 = base::TimeTicks::Now();
|
| main_loop_->CreateStartupTasks();
|
| int result_code = main_loop_->GetResultCode();
|
| if (result_code > 0)
|
| return result_code;
|
|
|
| + UMA_HISTOGRAM_TIMES("Startup.BrowserMainRunnerImplInitializeStep2Time",
|
| + base::TimeTicks::Now() - start_time_step2);
|
| +
|
| // Return -1 to indicate no early termination.
|
| return -1;
|
| }
|
|
|