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

Issue 1067023003: Add shell::Tracer object and wire up to --trace-startup on Android (Closed)

Created:
5 years, 8 months ago by jamesr
Modified:
5 years, 8 months ago
Reviewers:
viettrungluu, qsr
CC:
mojo-reviews_chromium.org, qsr+mojo_chromium.org, yzshen+watch_chromium.org
Base URL:
git@github.com:domokit/mojo.git@master
Target Ref:
refs/heads/master
Project:
mojo
Visibility:
Public.

Description

Add shell::Tracer object and wire up to --trace-startup on Android This adds an object to keep track of tracing state and wires it into the android mojo shell main. When --trace-startup is passed in on the command line (or via the intent extra args thingy on Android) the shell enables tracing for itself. It stops tracing when it shuts down cleanly or 5 seconds elapse. On desktop, this writes into a file named "mojo_shell.trace" in the CWD. On Android, this writes to /data/data/org.chromium.mojo.shell/cache/tmp/mojo_shell.trace. Follow-up patches will patch in trace data from the tracing service into this file. R=qsr@chromium.org, viettrungluu@chromium.org Committed: https://chromium.googlesource.com/external/mojo/+/f0f1860a52c87faa45f372e1b5b6a8948ae43249

Patch Set 1 #

Total comments: 11

Patch Set 2 : rm printfs #

Total comments: 3

Patch Set 3 : review comments #

Total comments: 2

Patch Set 4 : fix android Tracer lifetime #

Patch Set 5 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+194 lines, -76 lines) Patch
M PRESUBMIT.py View 1 2 3 4 1 chunk +3 lines, -2 lines 0 comments Download
M shell/BUILD.gn View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M shell/android/main.cc View 1 2 3 7 chunks +24 lines, -7 lines 0 comments Download
M shell/desktop/main.cc View 1 2 3 5 chunks +13 lines, -67 lines 0 comments Download
A shell/tracer.h View 1 2 3 1 chunk +65 lines, -0 lines 0 comments Download
A shell/tracer.cc View 1 2 3 1 chunk +87 lines, -0 lines 0 comments Download

Messages

Total messages: 13 (1 generated)
jamesr
vtl - please review qsr - FYI for android shell changes
5 years, 8 months ago (2015-04-07 20:22:38 UTC) #2
jamesr
https://codereview.chromium.org/1067023003/diff/1/shell/tracer.cc File shell/tracer.cc (right): https://codereview.chromium.org/1067023003/diff/1/shell/tracer.cc#newcode80 shell/tracer.cc:80: flush_complete_event.Wait(); if the message loop is running (i.e. we're ...
5 years, 8 months ago (2015-04-07 20:23:37 UTC) #3
jamesr
https://codereview.chromium.org/1067023003/diff/1/shell/tracer.cc File shell/tracer.cc (right): https://codereview.chromium.org/1067023003/diff/1/shell/tracer.cc#newcode22 shell/tracer.cc:22: printf("tracing started\n"); whoops, didn't mean to check these in. ...
5 years, 8 months ago (2015-04-07 20:33:57 UTC) #4
jamesr
spurious printf()s gone, PTAL
5 years, 8 months ago (2015-04-07 22:02:34 UTC) #5
viettrungluu
https://codereview.chromium.org/1067023003/diff/1/PRESUBMIT.py File PRESUBMIT.py (right): https://codereview.chromium.org/1067023003/diff/1/PRESUBMIT.py#newcode1028 PRESUBMIT.py:1028: def _GetJSONParseError(input_api, filename, eat_comments=True): Remove the eat_comments arg? https://codereview.chromium.org/1067023003/diff/1/PRESUBMIT_test.py ...
5 years, 8 months ago (2015-04-07 22:05:44 UTC) #6
jamesr
thanks, PTAL https://codereview.chromium.org/1067023003/diff/1/PRESUBMIT_test.py File PRESUBMIT_test.py (left): https://codereview.chromium.org/1067023003/diff/1/PRESUBMIT_test.py#oldcode437 PRESUBMIT_test.py:437: def testNoEatComments(self): On 2015/04/07 22:05:44, viettrungluu wrote: ...
5 years, 8 months ago (2015-04-07 22:20:07 UTC) #7
viettrungluu
LGTM w/printf removed. https://codereview.chromium.org/1067023003/diff/40001/shell/tracer.cc File shell/tracer.cc (right): https://codereview.chromium.org/1067023003/diff/40001/shell/tracer.cc#newcode61 shell/tracer.cc:61: printf("got empty chunk, skipping. has_more_events %d\n", ...
5 years, 8 months ago (2015-04-08 00:39:16 UTC) #8
qsr
https://codereview.chromium.org/1067023003/diff/40001/shell/android/main.cc File shell/android/main.cc (right): https://codereview.chromium.org/1067023003/diff/40001/shell/android/main.cc#newcode195 shell/android/main.cc:195: base::Bind(&Tracer::StopAndFlushToFile, base::Unretained(&tracer), I am missing something here. tracer is ...
5 years, 8 months ago (2015-04-08 08:55:57 UTC) #9
jamesr
On 2015/04/08 08:55:57, qsr wrote: > https://codereview.chromium.org/1067023003/diff/40001/shell/android/main.cc > File shell/android/main.cc (right): > > https://codereview.chromium.org/1067023003/diff/40001/shell/android/main.cc#newcode195 > ...
5 years, 8 months ago (2015-04-09 23:00:04 UTC) #10
jamesr
PTAL
5 years, 8 months ago (2015-04-09 23:41:00 UTC) #11
qsr
lgtm
5 years, 8 months ago (2015-04-10 08:08:02 UTC) #12
jamesr
5 years, 8 months ago (2015-04-10 18:29:52 UTC) #13
Message was sent while issue was closed.
Committed patchset #5 (id:80001) manually as
f0f1860a52c87faa45f372e1b5b6a8948ae43249 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698