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

Unified Diff: components/sync_driver/data_type_manager_impl.cc

Issue 925673003: Add profiling for FinishConfigureDataTypesOnFrontendLoop (sync). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments from vadimt. Created 5 years, 10 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 | « chrome/browser/sync/glue/sync_backend_host_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync_driver/data_type_manager_impl.cc
diff --git a/components/sync_driver/data_type_manager_impl.cc b/components/sync_driver/data_type_manager_impl.cc
index 07f79c49639e09b294a38e091b568dd3b6b93740..dfffa3c775078403ff6a0a8aa4071e9a9dbfd68a 100644
--- a/components/sync_driver/data_type_manager_impl.cc
+++ b/components/sync_driver/data_type_manager_impl.cc
@@ -13,6 +13,7 @@
#include "base/compiler_specific.h"
#include "base/logging.h"
#include "base/metrics/histogram.h"
+#include "base/profiler/scoped_tracker.h"
#include "base/strings/stringprintf.h"
#include "base/trace_event/trace_event.h"
#include "components/sync_driver/data_type_controller.h"
@@ -349,12 +350,23 @@ void DataTypeManagerImpl::DownloadReady(
syncer::ModelTypeSet high_priority_types_before,
syncer::ModelTypeSet first_sync_types,
syncer::ModelTypeSet failed_configuration_types) {
+ // TODO(erikchen): Remove ScopedTracker below once https://crbug.com/458406
+ // is fixed.
+ tracked_objects::ScopedTracker tracking_profile1(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "458406 DataTypeManagerImpl::DownloadReady"));
+
DCHECK(state_ == DOWNLOAD_PENDING || state_ == CONFIGURING);
// Persistence errors are reset after each backend configuration attempt
// during which they would have been purged.
data_type_status_table_.ResetPersistenceErrorsFrom(types_to_download);
+ // TODO(erikchen): Remove ScopedTracker below once https://crbug.com/458406
+ // is fixed.
+ tracked_objects::ScopedTracker tracking_profile2(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "458406 DataTypeManagerImpl::DownloadReady::NeedsReconfigure"));
stanisc 2015/02/17 19:25:29 Would it make sense to define a scope for each of
erikchen 2015/02/18 18:57:15 Each ScopedTracker automatically subtracts out the
// Ignore |failed_configuration_types| if we need to reconfigure
// anyway.
if (needs_reconfigure_) {
@@ -363,6 +375,11 @@ void DataTypeManagerImpl::DownloadReady(
return;
}
+ // TODO(erikchen): Remove ScopedTracker below once https://crbug.com/458406
+ // is fixed.
+ tracked_objects::ScopedTracker tracking_profile3(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "458406 DataTypeManagerImpl::DownloadReady::UnrecoverableError"));
if (!failed_configuration_types.Empty()) {
if (!unrecoverable_error_method_.is_null())
unrecoverable_error_method_.Run();
@@ -383,6 +400,11 @@ void DataTypeManagerImpl::DownloadReady(
state_ = CONFIGURING;
+ // TODO(erikchen): Remove ScopedTracker below once https://crbug.com/458406
+ // is fixed.
+ tracked_objects::ScopedTracker tracking_profile4(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "458406 DataTypeManagerImpl::DownloadReady::Associate"));
// Pop and associate download-ready types.
syncer::ModelTypeSet ready_types = types_to_download;
CHECK(!download_types_queue_.empty());
@@ -401,6 +423,11 @@ void DataTypeManagerImpl::DownloadReady(
if (association_types_queue_.size() == 1u)
StartNextAssociation();
stanisc 2015/02/17 19:25:29 I suspect most of the time is spent here. Also tak
+ // TODO(erikchen): Remove ScopedTracker below once https://crbug.com/458406
+ // is fixed.
+ tracked_objects::ScopedTracker tracking_profile5(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "458406 DataTypeManagerImpl::DownloadReady::ConfigureDataTypes"));
// Download types of low priority while configuring types of high priority.
if (!new_types_to_download.Empty()) {
configurer_->ConfigureDataTypes(
« no previous file with comments | « chrome/browser/sync/glue/sync_backend_host_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698