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

Issue 18083015: Add queued_time_ms trace for events in message loop (Closed)

Created:
7 years, 5 months ago by Xianzhu
Modified:
7 years, 5 months ago
CC:
chromium-reviews, erikwright+watch_chromium.org, n.s.buttar
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Add queued_time_ms trace for events in message loop These trace can be useful for examining the status of message loop queues when debugging some performance issues. BUG=none Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=210880

Patch Set 1 #

Patch Set 2 : Combine queued_time into TRACE_EVENT("RunTask") and remove queue length counters #

Patch Set 3 : Use ConvertableToTraceFormat #

Total comments: 11

Patch Set 4 : Naming etc #

Total comments: 4

Patch Set 5 : Add queue_duration argument into TRACE_EVENT_FLOW_BEGIN #

Total comments: 4

Patch Set 6 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+22 lines, -16 lines) Patch
M base/message_loop/message_loop.cc View 1 2 3 4 5 2 chunks +8 lines, -5 lines 0 comments Download
M base/tracked_objects.cc View 1 2 3 4 5 2 chunks +2 lines, -11 lines 0 comments Download
M base/tracking_info.h View 1 2 3 4 5 2 chunks +12 lines, -0 lines 0 comments Download

Messages

Total messages: 24 (0 generated)
Xianzhu
7 years, 5 months ago (2013-06-28 20:28:40 UTC) #1
Xianzhu
7 years, 5 months ago (2013-07-01 22:43:10 UTC) #2
Mark Mentovai
Looks fine, but → jar for tracey stuff.
7 years, 5 months ago (2013-07-02 20:08:36 UTC) #3
nduca
What about putting the queuing times into an arg of the trace_event for the runtask ...
7 years, 5 months ago (2013-07-02 22:34:48 UTC) #4
jar (doing other things)
On 2013/07/02 22:34:48, nduca wrote: > What about putting the queuing times into an arg ...
7 years, 5 months ago (2013-07-02 22:43:23 UTC) #5
Xianzhu
On 2013/07/02 22:34:48, nduca wrote: > What about putting the queuing times into an arg ...
7 years, 5 months ago (2013-07-02 23:24:24 UTC) #6
Xianzhu
Can we omit "src_file" to make space for "queued_time_ms"? Looked at several traces. Seems in ...
7 years, 5 months ago (2013-07-02 23:43:35 UTC) #7
Xianzhu
FYI, http://www/~wangxianzhu/profile-touch-delay-theverge is the trace containing the new counters. The incoming_queue_length and working_queue_length counters may ...
7 years, 5 months ago (2013-07-02 23:53:04 UTC) #8
jar (doing other things)
I would expect you'd be more concerned with the queuing delay, than the queued task ...
7 years, 5 months ago (2013-07-03 00:04:23 UTC) #9
Xianzhu
On 2013/07/03 00:04:23, jar wrote: > I would expect you'd be more concerned with the ...
7 years, 5 months ago (2013-07-03 00:14:32 UTC) #10
nduca
You can use trace_Event_impl's ConvertableToTraceLog to capture >2 arguments.
7 years, 5 months ago (2013-07-03 00:18:05 UTC) #11
Xianzhu
On 2013/07/03 00:18:05, nduca wrote: > You can use trace_Event_impl's ConvertableToTraceLog to capture >2 arguments. ...
7 years, 5 months ago (2013-07-03 18:21:17 UTC) #12
jar (doing other things)
https://codereview.chromium.org/18083015/diff/23001/base/location.cc File base/location.cc (right): https://codereview.chromium.org/18083015/diff/23001/base/location.cc#newcode30 base/location.cc:30: virtual void AppendAsTraceFormat(std::string* out) const OVERRIDE { When/how often ...
7 years, 5 months ago (2013-07-08 17:08:33 UTC) #13
Xianzhu
PTAL. https://codereview.chromium.org/18083015/diff/23001/base/location.cc File base/location.cc (right): https://codereview.chromium.org/18083015/diff/23001/base/location.cc#newcode30 base/location.cc:30: virtual void AppendAsTraceFormat(std::string* out) const OVERRIDE { On ...
7 years, 5 months ago (2013-07-08 18:51:39 UTC) #14
jar (doing other things)
https://codereview.chromium.org/18083015/diff/23001/base/tracking_info.h File base/tracking_info.h (right): https://codereview.chromium.org/18083015/diff/23001/base/tracking_info.h#newcode35 base/tracking_info.h:35: return TimeTicks::Now() - ExpectedRunTime(); On 2013/07/08 18:51:39, Xianzhu wrote: ...
7 years, 5 months ago (2013-07-08 23:14:18 UTC) #15
Xianzhu
https://codereview.chromium.org/18083015/diff/30001/base/tracked_objects.cc File base/tracked_objects.cc (right): https://codereview.chromium.org/18083015/diff/30001/base/tracked_objects.cc#newcode475 base/tracked_objects.cc:475: if (!start_of_run.is_null()) { On 2013/07/08 23:14:19, jar wrote: > ...
7 years, 5 months ago (2013-07-09 00:39:07 UTC) #16
jar (doing other things)
https://codereview.chromium.org/18083015/diff/31010/base/message_loop/message_loop.cc File base/message_loop/message_loop.cc (right): https://codereview.chromium.org/18083015/diff/31010/base/message_loop/message_loop.cc#newcode462 base/message_loop/message_loop.cc:462: (tracked_objects::TrackedTime::Now() - I believe that we get the value ...
7 years, 5 months ago (2013-07-09 16:50:53 UTC) #17
Xianzhu
https://codereview.chromium.org/18083015/diff/31010/base/message_loop/message_loop.cc File base/message_loop/message_loop.cc (right): https://codereview.chromium.org/18083015/diff/31010/base/message_loop/message_loop.cc#newcode462 base/message_loop/message_loop.cc:462: (tracked_objects::TrackedTime::Now() - On 2013/07/09 16:50:53, jar wrote: > I ...
7 years, 5 months ago (2013-07-09 17:22:42 UTC) #18
Xianzhu
Looked at the code. It seems that the profiler can be disabled with enable-profiling=0, when ...
7 years, 5 months ago (2013-07-09 17:49:17 UTC) #19
jar (doing other things)
On 2013/07/09 17:49:17, Xianzhu wrote: > Looked at the code. It seems that the profiler ...
7 years, 5 months ago (2013-07-10 15:48:09 UTC) #20
jar (doing other things)
LGTM This is now a nice compact change. Thanks!
7 years, 5 months ago (2013-07-10 15:48:47 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wangxianzhu@chromium.org/18083015/17011
7 years, 5 months ago (2013-07-10 15:51:54 UTC) #22
commit-bot: I haz the power
Change committed as 210880
7 years, 5 months ago (2013-07-10 17:50:32 UTC) #23
Xianzhu
7 years, 5 months ago (2013-07-10 21:28:40 UTC) #24
Message was sent while issue was closed.
https://codereview.chromium.org/18083015/diff/30001/base/tracked_objects.cc
File base/tracked_objects.cc (right):

https://codereview.chromium.org/18083015/diff/30001/base/tracked_objects.cc#n...
base/tracked_objects.cc:475: if (!start_of_run.is_null()) {

On 2013/07/08 23:14:19, jar wrote:
> I think that start_of_run is probably now always set...
>
> ... add a DCHECK() to validate
> the assumption that we always have a start_of_run time that is real.  (...and
> you could probably assign a bug for me to cleanup up profiling, now that it is
> always on... I just left the code in place to allow me to test the impact (on
vs
> off)).

I'm not sure if I have understood all the comments. Should the bug be like "Turn
profiling always on and cleanup conditions"?

Powered by Google App Engine
This is Rietveld 408576698