diff options
-rw-r--r-- | base/trace_event/trace_log.cc | 2 | ||||
-rw-r--r-- | components/omnibox/browser/autocomplete_controller.cc | 5 | ||||
-rw-r--r-- | components/omnibox/browser/bookmark_provider.cc | 2 | ||||
-rw-r--r-- | components/omnibox/browser/history_quick_provider.cc | 2 | ||||
-rw-r--r-- | components/omnibox/browser/history_url_provider.cc | 3 | ||||
-rw-r--r-- | components/omnibox/browser/keyword_provider.cc | 2 | ||||
-rw-r--r-- | components/omnibox/browser/search_provider.cc | 3 | ||||
-rw-r--r-- | components/omnibox/browser/shortcuts_provider.cc | 2 | ||||
-rw-r--r-- | components/omnibox/browser/zero_suggest_provider.cc | 2 |
9 files changed, 22 insertions, 1 deletions
diff --git a/base/trace_event/trace_log.cc b/base/trace_event/trace_log.cc index 3b1d2c9..1da4a63 100644 --- a/base/trace_event/trace_log.cc +++ b/base/trace_event/trace_log.cc @@ -85,7 +85,7 @@ const size_t kEchoToConsoleTraceEventBufferChunks = 256; const size_t kTraceEventBufferSizeInBytes = 100 * 1024; const int kThreadFlushTimeoutMs = 3000; -#define MAX_CATEGORY_GROUPS 100 +#define MAX_CATEGORY_GROUPS 105 // Parallel arrays g_category_groups and g_category_group_enabled are separate // so that a pointer to a member of g_category_group_enabled can be easily diff --git a/components/omnibox/browser/autocomplete_controller.cc b/components/omnibox/browser/autocomplete_controller.cc index df7990d..19be64e 100644 --- a/components/omnibox/browser/autocomplete_controller.cc +++ b/components/omnibox/browser/autocomplete_controller.cc @@ -14,7 +14,9 @@ #include "base/metrics/histogram.h" #include "base/strings/string_number_conversions.h" #include "base/strings/stringprintf.h" +#include "base/strings/utf_string_conversions.h" #include "base/time/time.h" +#include "base/trace_event/trace_event.h" #include "build/build_config.h" #include "components/omnibox/browser/autocomplete_controller_delegate.h" #include "components/omnibox/browser/bookmark_provider.h" @@ -231,6 +233,8 @@ AutocompleteController::~AutocompleteController() { } void AutocompleteController::Start(const AutocompleteInput& input) { + TRACE_EVENT1("omnibox", "AutocompleteController::Start", + "text", base::UTF16ToUTF8(input.text())); const base::string16 old_input_text(input_.text()); const bool old_want_asynchronous_matches = input_.want_asynchronous_matches(); const bool old_from_omnibox_focus = input_.from_omnibox_focus(); @@ -395,6 +399,7 @@ void AutocompleteController::UpdateMatchDestinationURL( void AutocompleteController::UpdateResult( bool regenerate_result, bool force_notify_default_match_changed) { + TRACE_EVENT0("omnibox", "AutocompleteController::UpdateResult"); const bool last_default_was_valid = result_.default_match() != result_.end(); // The following three variables are only set and used if // |last_default_was_valid|. diff --git a/components/omnibox/browser/bookmark_provider.cc b/components/omnibox/browser/bookmark_provider.cc index 40d8401..f9d3bde 100644 --- a/components/omnibox/browser/bookmark_provider.cc +++ b/components/omnibox/browser/bookmark_provider.cc @@ -11,6 +11,7 @@ #include "base/macros.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" +#include "base/trace_event/trace_event.h" #include "components/bookmarks/browser/bookmark_match.h" #include "components/bookmarks/browser/bookmark_model.h" #include "components/metrics/proto/omnibox_input_type.pb.h" @@ -65,6 +66,7 @@ BookmarkProvider::BookmarkProvider(AutocompleteProviderClient* client) void BookmarkProvider::Start(const AutocompleteInput& input, bool minimal_changes) { + TRACE_EVENT0("omnibox", "BookmarkProvider::Start"); if (minimal_changes) return; matches_.clear(); diff --git a/components/omnibox/browser/history_quick_provider.cc b/components/omnibox/browser/history_quick_provider.cc index ef22326..bf7db5c 100644 --- a/components/omnibox/browser/history_quick_provider.cc +++ b/components/omnibox/browser/history_quick_provider.cc @@ -14,6 +14,7 @@ #include "base/strings/string_number_conversions.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" +#include "base/trace_event/trace_event.h" #include "components/bookmarks/browser/bookmark_model.h" #include "components/history/core/browser/history_database.h" #include "components/history/core/browser/history_service.h" @@ -43,6 +44,7 @@ HistoryQuickProvider::HistoryQuickProvider(AutocompleteProviderClient* client) void HistoryQuickProvider::Start(const AutocompleteInput& input, bool minimal_changes) { + TRACE_EVENT0("omnibox", "HistoryQuickProvider::Start"); matches_.clear(); if (disabled_ || input.from_omnibox_focus()) return; diff --git a/components/omnibox/browser/history_url_provider.cc b/components/omnibox/browser/history_url_provider.cc index 9361023..763522b 100644 --- a/components/omnibox/browser/history_url_provider.cc +++ b/components/omnibox/browser/history_url_provider.cc @@ -16,6 +16,7 @@ #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" #include "base/time/time.h" +#include "base/trace_event/trace_event.h" #include "components/bookmarks/browser/bookmark_utils.h" #include "components/history/core/browser/history_backend.h" #include "components/history/core/browser/history_database.h" @@ -456,6 +457,7 @@ HistoryURLProvider::HistoryURLProvider(AutocompleteProviderClient* client, void HistoryURLProvider::Start(const AutocompleteInput& input, bool minimal_changes) { + TRACE_EVENT0("omnibox", "HistoryURLProvider::Start"); // NOTE: We could try hard to do less work in the |minimal_changes| case // here; some clever caching would let us reuse the raw matches from the // history DB without re-querying. However, we'd still have to go back to @@ -841,6 +843,7 @@ void HistoryURLProvider::PromoteMatchesIfNecessary( void HistoryURLProvider::QueryComplete( HistoryURLProviderParams* params_gets_deleted) { + TRACE_EVENT0("omnibox", "HistoryURLProvider::QueryComplete"); // Ensure |params_gets_deleted| gets deleted on exit. scoped_ptr<HistoryURLProviderParams> params(params_gets_deleted); diff --git a/components/omnibox/browser/keyword_provider.cc b/components/omnibox/browser/keyword_provider.cc index e4e21b3..5e060ee 100644 --- a/components/omnibox/browser/keyword_provider.cc +++ b/components/omnibox/browser/keyword_provider.cc @@ -11,6 +11,7 @@ #include "base/strings/string16.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" +#include "base/trace_event/trace_event.h" #include "components/metrics/proto/omnibox_input_type.pb.h" #include "components/omnibox/browser/autocomplete_match.h" #include "components/omnibox/browser/autocomplete_provider_client.h" @@ -208,6 +209,7 @@ AutocompleteMatch KeywordProvider::CreateVerbatimMatch( void KeywordProvider::Start(const AutocompleteInput& input, bool minimal_changes) { + TRACE_EVENT0("omnibox", "KeywordProvider::Start"); // This object ensures we end keyword mode if we exit the function without // toggling keyword mode to on. ScopedEndExtensionKeywordMode keyword_mode_toggle(extensions_delegate_.get()); diff --git a/components/omnibox/browser/search_provider.cc b/components/omnibox/browser/search_provider.cc index 465cd65..ab12904 100644 --- a/components/omnibox/browser/search_provider.cc +++ b/components/omnibox/browser/search_provider.cc @@ -20,6 +20,7 @@ #include "base/rand_util.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" +#include "base/trace_event/trace_event.h" #include "components/data_use_measurement/core/data_use_user_data.h" #include "components/history/core/browser/in_memory_database.h" #include "components/history/core/browser/keyword_search_term.h" @@ -220,6 +221,7 @@ ACMatches::iterator SearchProvider::FindTopMatch(ACMatches* matches) { void SearchProvider::Start(const AutocompleteInput& input, bool minimal_changes) { + TRACE_EVENT0("omnibox", "SearchProvider::Start"); // Do our best to load the model as early as possible. This will reduce // odds of having the model not ready when really needed (a non-empty input). TemplateURLService* model = client()->GetTemplateURLService(); @@ -388,6 +390,7 @@ void SearchProvider::OnTemplateURLServiceChanged() { } void SearchProvider::OnURLFetchComplete(const net::URLFetcher* source) { + TRACE_EVENT0("omnibox", "SearchProvider::OnURLFetchComplete"); DCHECK(!done_); const bool is_keyword = source == keyword_fetcher_.get(); diff --git a/components/omnibox/browser/shortcuts_provider.cc b/components/omnibox/browser/shortcuts_provider.cc index 55cab0e..22ee0c7 100644 --- a/components/omnibox/browser/shortcuts_provider.cc +++ b/components/omnibox/browser/shortcuts_provider.cc @@ -19,6 +19,7 @@ #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" #include "base/time/time.h" +#include "base/trace_event/trace_event.h" #include "components/history/core/browser/history_service.h" #include "components/metrics/proto/omnibox_input_type.pb.h" #include "components/omnibox/browser/autocomplete_i18n.h" @@ -65,6 +66,7 @@ ShortcutsProvider::ShortcutsProvider(AutocompleteProviderClient* client) void ShortcutsProvider::Start(const AutocompleteInput& input, bool minimal_changes) { + TRACE_EVENT0("omnibox", "ShortcutsProvider::Start"); matches_.clear(); if (input.from_omnibox_focus() || diff --git a/components/omnibox/browser/zero_suggest_provider.cc b/components/omnibox/browser/zero_suggest_provider.cc index 956c245..4a2043a 100644 --- a/components/omnibox/browser/zero_suggest_provider.cc +++ b/components/omnibox/browser/zero_suggest_provider.cc @@ -15,6 +15,7 @@ #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" #include "base/time/time.h" +#include "base/trace_event/trace_event.h" #include "components/data_use_measurement/core/data_use_user_data.h" #include "components/history/core/browser/history_types.h" #include "components/history/core/browser/top_sites.h" @@ -85,6 +86,7 @@ void ZeroSuggestProvider::RegisterProfilePrefs( void ZeroSuggestProvider::Start(const AutocompleteInput& input, bool minimal_changes) { + TRACE_EVENT0("omnibox", "ZeroSuggestProvider::Start"); matches_.clear(); if (!input.from_omnibox_focus() || input.type() == metrics::OmniboxInputType::INVALID) |