summaryrefslogtreecommitdiffstats
path: root/components
diff options
context:
space:
mode:
authorerikchen <erikchen@chromium.org>2015-03-11 18:10:46 -0700
committerCommit bot <commit-bot@chromium.org>2015-03-12 01:11:21 +0000
commit22f04ffa54f12fdb75e90202def5199759054eab (patch)
tree30fada2ff6d7e580c20e9f8dc07c77060217d3bc /components
parent51e4d20a8699a245daa4a6548834751aa1339aff (diff)
downloadchromium_src-22f04ffa54f12fdb75e90202def5199759054eab.zip
chromium_src-22f04ffa54f12fdb75e90202def5199759054eab.tar.gz
chromium_src-22f04ffa54f12fdb75e90202def5199759054eab.tar.bz2
Add profiling to investigate jank in WebDataRequestManager::RequestCompletedOnThread.
BUG=466312 TBR=atwilson@chromium.org Review URL: https://codereview.chromium.org/1002543003 Cr-Commit-Position: refs/heads/master@{#320197}
Diffstat (limited to 'components')
-rw-r--r--components/autofill/core/browser/autocomplete_history_manager.cc6
-rw-r--r--components/autofill/core/browser/personal_data_manager.cc6
-rw-r--r--components/search_engines/template_url_service.cc6
-rw-r--r--components/signin/core/browser/mutable_profile_oauth2_token_service.cc7
-rw-r--r--components/webdata/common/web_data_request_manager.cc12
5 files changed, 37 insertions, 0 deletions
diff --git a/components/autofill/core/browser/autocomplete_history_manager.cc b/components/autofill/core/browser/autocomplete_history_manager.cc
index 1f8fa94..a7cdd6a 100644
--- a/components/autofill/core/browser/autocomplete_history_manager.cc
+++ b/components/autofill/core/browser/autocomplete_history_manager.cc
@@ -7,6 +7,7 @@
#include <vector>
#include "base/prefs/pref_service.h"
+#include "base/profiler/scoped_tracker.h"
#include "base/strings/string16.h"
#include "base/strings/utf_string_conversions.h"
#include "components/autofill/core/browser/autofill_client.h"
@@ -53,6 +54,11 @@ AutocompleteHistoryManager::~AutocompleteHistoryManager() {
void AutocompleteHistoryManager::OnWebDataServiceRequestDone(
WebDataServiceBase::Handle h,
const WDTypedResult* result) {
+ // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466312
+ // is fixed.
+ tracked_objects::ScopedTracker tracking_profile(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "466312 AutocompleteHistoryManager::OnWebDataServiceRequestDone"));
DCHECK(pending_query_handle_);
pending_query_handle_ = 0;
diff --git a/components/autofill/core/browser/personal_data_manager.cc b/components/autofill/core/browser/personal_data_manager.cc
index ae6bbed..87f377c 100644
--- a/components/autofill/core/browser/personal_data_manager.cc
+++ b/components/autofill/core/browser/personal_data_manager.cc
@@ -13,6 +13,7 @@
#include "base/logging.h"
#include "base/memory/ref_counted.h"
#include "base/prefs/pref_service.h"
+#include "base/profiler/scoped_tracker.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
@@ -275,6 +276,11 @@ PersonalDataManager::~PersonalDataManager() {
void PersonalDataManager::OnWebDataServiceRequestDone(
WebDataServiceBase::Handle h,
const WDTypedResult* result) {
+ // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466312
+ // is fixed.
+ tracked_objects::ScopedTracker tracking_profile(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "466312 PersonalDataManager::OnWebDataServiceRequestDone"));
DCHECK(pending_profiles_query_ || pending_server_profiles_query_ ||
pending_creditcards_query_ || pending_server_creditcards_query_);
diff --git a/components/search_engines/template_url_service.cc b/components/search_engines/template_url_service.cc
index 46c53fe..24d5844 100644
--- a/components/search_engines/template_url_service.cc
+++ b/components/search_engines/template_url_service.cc
@@ -15,6 +15,7 @@
#include "base/memory/scoped_vector.h"
#include "base/metrics/histogram.h"
#include "base/prefs/pref_service.h"
+#include "base/profiler/scoped_tracker.h"
#include "base/stl_util.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_split.h"
@@ -826,6 +827,11 @@ scoped_ptr<TemplateURLService::Subscription>
void TemplateURLService::OnWebDataServiceRequestDone(
KeywordWebDataService::Handle h,
const WDTypedResult* result) {
+ // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466312
+ // is fixed.
+ tracked_objects::ScopedTracker tracking_profile(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "466312 TemplateURLService::OnWebDataServiceRequestDone"));
// Reset the load_handle so that we don't try and cancel the load in
// the destructor.
load_handle_ = 0;
diff --git a/components/signin/core/browser/mutable_profile_oauth2_token_service.cc b/components/signin/core/browser/mutable_profile_oauth2_token_service.cc
index de4142c..35fc21b 100644
--- a/components/signin/core/browser/mutable_profile_oauth2_token_service.cc
+++ b/components/signin/core/browser/mutable_profile_oauth2_token_service.cc
@@ -4,6 +4,7 @@
#include "components/signin/core/browser/mutable_profile_oauth2_token_service.h"
+#include "base/profiler/scoped_tracker.h"
#include "components/signin/core/browser/signin_client.h"
#include "components/signin/core/browser/signin_metrics.h"
#include "components/signin/core/browser/webdata/token_web_data.h"
@@ -190,6 +191,12 @@ void MutableProfileOAuth2TokenService::LoadCredentials(
void MutableProfileOAuth2TokenService::OnWebDataServiceRequestDone(
WebDataServiceBase::Handle handle,
const WDTypedResult* result) {
+ // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466312
+ // is fixed.
+ tracked_objects::ScopedTracker tracking_profile(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "466312 "
+ "MutableProfileOAuth2TokenService::OnWebDataServiceRequestDone"));
VLOG(1) << "MutablePO2TS::OnWebDataServiceRequestDone. Result type: "
<< (result == nullptr ? -1 : (int)result->GetType());
DCHECK_EQ(web_data_service_request_, handle);
diff --git a/components/webdata/common/web_data_request_manager.cc b/components/webdata/common/web_data_request_manager.cc
index 9aba721..103f10d 100644
--- a/components/webdata/common/web_data_request_manager.cc
+++ b/components/webdata/common/web_data_request_manager.cc
@@ -6,6 +6,7 @@
#include "base/bind.h"
#include "base/message_loop/message_loop.h"
+#include "base/profiler/scoped_tracker.h"
#include "base/stl_util.h"
////////////////////////////////////////////////////////////////////////////////
@@ -120,6 +121,11 @@ void WebDataRequestManager::RequestCompletedOnThread(
scoped_ptr<WebDataRequest> request) {
if (request->IsCancelled())
return;
+ // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466312
+ // is fixed.
+ tracked_objects::ScopedTracker tracking_profile1(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "466312 WebDataRequestManager::RequestCompletedOnThread::UpdateMap"));
{
base::AutoLock l(pending_lock_);
RequestMap::iterator i = pending_requests_.find(request->GetHandle());
@@ -132,6 +138,12 @@ void WebDataRequestManager::RequestCompletedOnThread(
pending_requests_.erase(i);
}
+ // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466312
+ // is fixed.
+ tracked_objects::ScopedTracker tracking_profile2(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "466312 "
+ "WebDataRequestManager::RequestCompletedOnThread::NotifyConsumer"));
// Notify the consumer if needed.
if (!request->IsCancelled()) {
WebDataServiceConsumer* consumer = request->GetConsumer();