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

Issue 1105773002: Teach the mojo_shell --trace-startup flag to gather data from services (Closed)

Created:
5 years, 8 months ago by jamesr
Modified:
5 years, 3 months ago
Reviewers:
viettrungluu, etiennej
CC:
mojo-reviews_chromium.org, qsr+mojo_chromium.org, ppi+watch_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, darin (slow to review), ben+mojo_chromium.org, ojan, alhaad, eseidel
Base URL:
git@github.com:domokit/mojo.git@master
Target Ref:
refs/heads/master
Project:
mojo
Visibility:
Public.

Description

Teach the mojo_shell --trace-startup flag to gather data from services This makes passing --trace-startup to mojo_shell (or MojoShell.apk) collect and save data from all apps/services that support tracing, not just the shell itself. R=viettrungluu@chromium.org Committed: https://chromium.googlesource.com/external/mojo/+/6997fa253c58bea69e94903a718bc382a577173b

Patch Set 1 #

Total comments: 7

Patch Set 2 : fix crashes #

Patch Set 3 : #

Total comments: 3

Patch Set 4 : buffer data from tracing service to avoid needing to frame it or add extra commas #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+173 lines, -63 lines) Patch
M mojo/common/trace_controller_impl.h View 2 chunks +9 lines, -1 line 0 comments Download
M mojo/common/trace_controller_impl.cc View 2 chunks +8 lines, -6 lines 1 comment Download
M mojo/common/tracing_impl.cc View 1 chunk +1 line, -1 line 0 comments Download
M shell/android/main.cc View 1 chunk +1 line, -1 line 0 comments Download
M shell/context.h View 1 2 2 chunks +3 lines, -3 lines 0 comments Download
M shell/context.cc View 1 4 chunks +22 lines, -10 lines 0 comments Download
M shell/desktop/main.cc View 2 chunks +6 lines, -6 lines 0 comments Download
M shell/tracer.h View 1 2 3 3 chunks +32 lines, -5 lines 0 comments Download
M shell/tracer.cc View 1 2 3 2 chunks +86 lines, -28 lines 0 comments Download
M sky/tools/debugger/debugger.cc View 1 2 3 3 chunks +5 lines, -2 lines 0 comments Download

Messages

Total messages: 11 (1 generated)
jamesr
This makes startup tracing much more useful, although it still doesn't capture data on shutdown.
5 years, 8 months ago (2015-04-23 23:35:53 UTC) #1
viettrungluu
Seems to cause some test crashes? https://codereview.chromium.org/1105773002/diff/1/shell/context.cc File shell/context.cc (right): https://codereview.chromium.org/1105773002/diff/1/shell/context.cc#newcode293 shell/context.cc:293: new TracingServiceProvider(tracer_, GetProxy(&tracing_exposed_services)); ...
5 years, 8 months ago (2015-04-27 17:04:11 UTC) #2
jamesr
Now less crashy, PTAL https://codereview.chromium.org/1105773002/diff/1/shell/context.cc File shell/context.cc (right): https://codereview.chromium.org/1105773002/diff/1/shell/context.cc#newcode293 shell/context.cc:293: new TracingServiceProvider(tracer_, GetProxy(&tracing_exposed_services)); On 2015/04/27 ...
5 years, 8 months ago (2015-04-27 23:46:57 UTC) #3
viettrungluu
https://codereview.chromium.org/1105773002/diff/40001/shell/tracer.cc File shell/tracer.cc (right): https://codereview.chromium.org/1105773002/diff/40001/shell/tracer.cc#newcode56 shell/tracer.cc:56: PCHECK(trace_file_); nit: move this to be immediately after the ...
5 years, 8 months ago (2015-04-28 00:42:18 UTC) #4
jamesr
On 2015/04/28 00:42:18, viettrungluu wrote: > https://codereview.chromium.org/1105773002/diff/40001/shell/tracer.cc#newcode121 > shell/tracer.cc:121: void Tracer::OnDataAvailable(const void* data, size_t > ...
5 years, 7 months ago (2015-04-28 18:18:52 UTC) #5
jamesr
On 2015/04/28 18:18:52, jamesr wrote: > On 2015/04/28 00:42:18, viettrungluu wrote: > > > https://codereview.chromium.org/1105773002/diff/40001/shell/tracer.cc#newcode121 ...
5 years, 7 months ago (2015-04-29 00:56:38 UTC) #6
viettrungluu
LGTM
5 years, 7 months ago (2015-05-01 17:29:42 UTC) #7
jamesr
Committed patchset #4 (id:60001) manually as 6997fa253c58bea69e94903a718bc382a577173b (presubmit successful).
5 years, 7 months ago (2015-05-01 18:03:15 UTC) #8
etiennej
https://codereview.chromium.org/1105773002/diff/60001/mojo/common/trace_controller_impl.cc File mojo/common/trace_controller_impl.cc (right): https://codereview.chromium.org/1105773002/diff/60001/mojo/common/trace_controller_impl.cc#newcode16 mojo/common/trace_controller_impl.cc:16: : tracing_already_started_(false), binding_(this, request.Pass()) { I am currently looking ...
5 years, 3 months ago (2015-09-11 09:43:16 UTC) #10
jamesr
5 years, 3 months ago (2015-09-11 22:37:32 UTC) #11
Message was sent while issue was closed.
On 2015/09/11 at 09:43:16, etiennej wrote:
>
https://codereview.chromium.org/1105773002/diff/60001/mojo/common/trace_contr...
> File mojo/common/trace_controller_impl.cc (right):
> 
>
https://codereview.chromium.org/1105773002/diff/60001/mojo/common/trace_contr...
> mojo/common/trace_controller_impl.cc:16: : tracing_already_started_(false),
binding_(this, request.Pass()) {
> I am currently looking at this code. Was there a reason to use this field
instead of base::trace_event::TraceLog::GetInstance()->IsEnabled(), or instead
of doing nothing and calling SetEnabled every time?

Calling SetEnabled() requires knowing the configuration (specifically the set of
categories) and is not idempotent.  It will silently merge, but that's not
necessarily what you want to happen.  IsEnabled() queries TraceLog::mode_
without taking its lock and thus isn't safe to call unless the code knows what
every other thread is doing at the time of call.

Powered by Google App Engine
This is Rietveld 408576698