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

Unified Diff: chrome/browser/sync/glue/model_association_manager.cc

Issue 23907005: sync: Improve ModelAssociation event tracing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/glue/model_association_manager.cc
diff --git a/chrome/browser/sync/glue/model_association_manager.cc b/chrome/browser/sync/glue/model_association_manager.cc
index f37fd63390c6566e8ecc727bc3b1f42bee661a20..995c943213729116c60eae65525a0df119ce5da8 100644
--- a/chrome/browser/sync/glue/model_association_manager.cc
+++ b/chrome/browser/sync/glue/model_association_manager.cc
@@ -240,7 +240,10 @@ void ModelAssociationManager::Stop() {
waiting_to_associate_.size() > 0);
if (currently_associating_) {
- TRACE_EVENT_END0("sync", "ModelAssociation");
+ TRACE_EVENT_ASYNC_END1("sync", "ModelAssociation",
+ "DataType",
+ ModelTypeToString(currently_associating_->type()),
+ currently_associating_);
DVLOG(1) << "ModelAssociationManager: stopping "
<< currently_associating_->name();
currently_associating_->Stop();
@@ -324,7 +327,10 @@ void ModelAssociationManager::TypeStartCallback(
const syncer::SyncMergeResult& local_merge_result,
const syncer::SyncMergeResult& syncer_merge_result) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- TRACE_EVENT_END0("sync", "ModelAssociation");
+ TRACE_EVENT_ASYNC_END1("sync", "ModelAssociation",
+ "DataType",
+ ModelTypeToString(currently_associating_->type()),
+ currently_associating_);
DVLOG(1) << "ModelAssociationManager: TypeStartCallback";
if (state_ == ABORTED) {
@@ -513,13 +519,14 @@ void ModelAssociationManager::StartAssociatingNextType() {
if (!waiting_to_associate_.empty()) {
DVLOG(1) << "ModelAssociationManager: Starting "
<< waiting_to_associate_[0]->name();
- TRACE_EVENT_BEGIN1("sync", "ModelAssociation",
- "DataType",
- ModelTypeToString(waiting_to_associate_[0]->type()));
DataTypeController* dtc = waiting_to_associate_[0];
waiting_to_associate_.erase(waiting_to_associate_.begin());
currently_associating_ = dtc;
current_type_association_start_time_ = base::Time::Now();
+ TRACE_EVENT_ASYNC_BEGIN1("sync", "ModelAssociation",
+ "DataType",
+ ModelTypeToString(currently_associating_->type()),
+ currently_associating_);
Raghu Simha 2013/09/07 00:20:18 I think the order of arguments in these calls is i
dtc->StartAssociating(base::Bind(
&ModelAssociationManager::TypeStartCallback,
weak_ptr_factory_.GetWeakPtr()));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698