From dd66a1342eeffa5d2cca8e1b3b35c86001094dfe Mon Sep 17 00:00:00 2001 From: rkaplow Date: Wed, 4 Mar 2015 16:31:49 -0800 Subject: Additional tracing and histogram in Extensions startup. Followed a local Linux machine which was slower than expected to where the time was going. Stopped at the ExtensionManagement::Refresh level, and will measure if this is general slow. BUG=454789 Review URL: https://codereview.chromium.org/977673002 Cr-Commit-Position: refs/heads/master@{#319173} --- components/keyed_service/core/keyed_service_base_factory.cc | 3 +++ components/keyed_service/core/keyed_service_factory.cc | 2 ++ 2 files changed, 5 insertions(+) (limited to 'components/keyed_service') diff --git a/components/keyed_service/core/keyed_service_base_factory.cc b/components/keyed_service/core/keyed_service_base_factory.cc index ddaf497..7157c0e 100644 --- a/components/keyed_service/core/keyed_service_base_factory.cc +++ b/components/keyed_service/core/keyed_service_base_factory.cc @@ -6,10 +6,13 @@ #include "base/prefs/pref_service.h" #include "base/supports_user_data.h" +#include "base/trace_event/trace_event.h" #include "components/keyed_service/core/dependency_manager.h" void KeyedServiceBaseFactory::RegisterUserPrefsOnContextForTest( base::SupportsUserData* context) { + TRACE_EVENT0("browser,startup", + "KeyedServiceBaseFactory::RegisterUserPrefsOnContextForTest"); // Safe timing for pref registration is hard. Previously, we made // context responsible for all pref registration on every service // that used contexts. Now we don't and there are timing issues. diff --git a/components/keyed_service/core/keyed_service_factory.cc b/components/keyed_service/core/keyed_service_factory.cc index 261ff29d..1417bab 100644 --- a/components/keyed_service/core/keyed_service_factory.cc +++ b/components/keyed_service/core/keyed_service_factory.cc @@ -6,6 +6,7 @@ #include "base/logging.h" #include "base/stl_util.h" +#include "base/trace_event/trace_event.h" #include "components/keyed_service/core/dependency_manager.h" #include "components/keyed_service/core/keyed_service.h" @@ -58,6 +59,7 @@ KeyedService* KeyedServiceFactory::SetTestingFactoryAndUse( KeyedService* KeyedServiceFactory::GetServiceForContext( base::SupportsUserData* context, bool create) { + TRACE_EVENT0("browser,startup", "KeyedServiceFactory::GetServiceForContext"); context = GetContextToUse(context); if (!context) return nullptr; -- cgit v1.1