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

Issue 8573011: Event tracing for sync events (Closed)

Created:
9 years, 1 month ago by rlarocque
Modified:
9 years, 1 month ago
CC:
chromium-reviews, Raghu Simha, ncarter (slow), tim (not reviewing)
Visibility:
Public.

Description

Event tracing for sync events Adds a "sync" trace event category that traces the following events: - model association time - time spent in each step of the syncer state machine - transactions Also included is a "sync_lock_contention" category that tracks the time spent acquiring the sync lock. This information would normally clutter up the logs, but it is useful information when we suspect lock contention is an issue. To trace model association tracing, I needed to have a set of strings with application lifetime representing each model type. I have changed the return type of ModelTypeToString from std::string to const char* to meet this need. In the interest of avoiding duplicate functionality, this change also removes other mechanisms for tracing transaction time. In particular, some of the log messages around acquiring and releasing transactions have been removed. BUG=104353 TEST=Run with '--trace-startup=sync,sync_lock_contention', open resulting chrometrace.log in about:tracing. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=111265

Patch Set 1 #

Total comments: 6

Patch Set 2 : Use simpler TRACE_EVENT macros #

Total comments: 16

Patch Set 3 : Respond to review comments #

Patch Set 4 : More review related changes #

Patch Set 5 : More fixes #

Patch Set 6 : Rebase to trunk to resolve conflicts #

Total comments: 1

Patch Set 7 : Rebase to avoid conflicts #

Patch Set 8 : Small bug fix #

Patch Set 9 : Fix line length issues #

Unified diffs Side-by-side diffs Delta from patch set Stats (+65 lines, -41 lines) Patch
M chrome/browser/sync/engine/syncer.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/sync/engine/syncer.cc View 1 2 3 4 11 chunks +36 lines, -19 lines 0 comments Download
M chrome/browser/sync/failed_datatypes_handler.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sync/glue/data_type_manager_impl.cc View 1 2 3 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/sync/profile_sync_service_harness.cc View 1 2 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/sync/syncable/model_type.h View 1 2 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/browser/sync/syncable/model_type.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sync/syncable/syncable.h View 1 2 3 4 5 6 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/sync/syncable/syncable.cc View 1 2 3 4 5 6 7 8 5 chunks +14 lines, -15 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
rlarocque
John: Please take a quick look to make sure I'm not misusing this feature. Neither ...
9 years, 1 month ago (2011-11-15 19:45:06 UTC) #1
tim (not reviewing)
+Fred for review for relatedness to about:sync and quickness :)
9 years, 1 month ago (2011-11-15 20:03:03 UTC) #2
jbates
LGTM if it's working for you, with the caveats in the comments below... Currently, if ...
9 years, 1 month ago (2011-11-16 00:46:57 UTC) #3
rlarocque
Thanks for the comments. I had assumed that the parameters in the END statements had ...
9 years, 1 month ago (2011-11-16 01:03:40 UTC) #4
rlarocque
Updated and simplified this patch. It looks a bit cleaner now that I don't bother ...
9 years, 1 month ago (2011-11-16 19:30:48 UTC) #5
akalin
http://codereview.chromium.org/8573011/diff/5001/chrome/browser/sync/engine/syncer.cc File chrome/browser/sync/engine/syncer.cc (left): http://codereview.chromium.org/8573011/diff/5001/chrome/browser/sync/engine/syncer.cc#oldcode8 chrome/browser/sync/engine/syncer.cc:8: #include "base/message_loop.h" #include "base/logging.h" http://codereview.chromium.org/8573011/diff/5001/chrome/browser/sync/engine/syncer.cc File chrome/browser/sync/engine/syncer.cc (right): http://codereview.chromium.org/8573011/diff/5001/chrome/browser/sync/engine/syncer.cc#newcode77 ...
9 years, 1 month ago (2011-11-17 03:27:21 UTC) #6
akalin
On 2011/11/15 19:45:06, rlarocque wrote: > http://codereview.chromium.org/8573011/diff/1/chrome/browser/sync/syncable/syncable.cc#newcode1150 > chrome/browser/sync/syncable/syncable.cc:1150: > &TransactionObserver::OnTransactionStart, from_here_, writer_); > I'm ...
9 years, 1 month ago (2011-11-17 03:35:30 UTC) #7
rlarocque
Most comments addressed in new patch. I haven't removed OnTransaction{Start,End} in this patch because I ...
9 years, 1 month ago (2011-11-17 19:37:53 UTC) #8
akalin
I meant to remove OnTransaction{Start,End} in a separate CL. http://codereview.chromium.org/8573011/diff/5001/chrome/browser/sync/engine/syncer.cc File chrome/browser/sync/engine/syncer.cc (right): http://codereview.chromium.org/8573011/diff/5001/chrome/browser/sync/engine/syncer.cc#newcode58 chrome/browser/sync/engine/syncer.cc:58: ...
9 years, 1 month ago (2011-11-17 22:17:45 UTC) #9
akalin
http://codereview.chromium.org/8573011/diff/5001/chrome/browser/sync/syncable/model_type.h File chrome/browser/sync/syncable/model_type.h (right): http://codereview.chromium.org/8573011/diff/5001/chrome/browser/sync/syncable/model_type.h#newcode124 chrome/browser/sync/syncable/model_type.h:124: // Returns a pointer to a string with application ...
9 years, 1 month ago (2011-11-17 22:18:59 UTC) #10
rlarocque
http://codereview.chromium.org/8573011/diff/5001/chrome/browser/sync/engine/syncer.cc File chrome/browser/sync/engine/syncer.cc (right): http://codereview.chromium.org/8573011/diff/5001/chrome/browser/sync/engine/syncer.cc#newcode58 chrome/browser/sync/engine/syncer.cc:58: #define ENUM_CASE(x) case x: return #x; break On 2011/11/17 ...
9 years, 1 month ago (2011-11-18 02:47:10 UTC) #11
akalin
LGTM http://codereview.chromium.org/8573011/diff/20001/chrome/browser/sync/syncable/syncable.cc File chrome/browser/sync/syncable/syncable.cc (right): http://codereview.chromium.org/8573011/diff/20001/chrome/browser/sync/syncable/syncable.cc#newcode1161 chrome/browser/sync/syncable/syncable.cc:1161: TRACE_EVENT_END0("sync", "ReadTransaction"); "ReadTransaction" -> name_
9 years, 1 month ago (2011-11-19 00:32:13 UTC) #12
akalin
On 2011/11/19 00:32:13, akalin wrote: > LGTM > > http://codereview.chromium.org/8573011/diff/20001/chrome/browser/sync/syncable/syncable.cc > File chrome/browser/sync/syncable/syncable.cc (right): > ...
9 years, 1 month ago (2011-11-19 00:32:47 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rlarocque@chromium.org/8573011/26002
9 years, 1 month ago (2011-11-22 22:18:09 UTC) #14
commit-bot: I haz the power
Presubmit check for 8573011-26002 failed and returned exit status 1. Running presubmit commit checks ...
9 years, 1 month ago (2011-11-22 22:18:20 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rlarocque@chromium.org/8573011/31001
9 years, 1 month ago (2011-11-22 22:34:32 UTC) #16
commit-bot: I haz the power
9 years, 1 month ago (2011-11-23 00:52:15 UTC) #17
Change committed as 111265

Powered by Google App Engine
This is Rietveld 408576698