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

Issue 2276263003: Pass in custom options to Systrace agents (Closed)

Created:
4 years, 3 months ago by washingtonp
Modified:
4 years, 3 months ago
Reviewers:
Zhen Wang, Chris Craik, Sami
CC:
catapult-reviews_chromium.org, telemetry-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/external/github.com/catapult-project/catapult.git@master
Target Ref:
refs/heads/master
Project:
catapult
Visibility:
Public.

Description

Pass in custom options to Systrace agents This CL refactors the Systace agent API to take in a custom config object tailored to the object. In doing so, this CL: - Updates Systrace's StartAgentTracing() to take in custom options - Updates profile_chrome's StartAgentTracing() as well - Updates the Telemetry call that calls Systrace - Updates the unit tests accordingly Note that profile_chrome still needs to be followed to follow Systrace's controller API. This will be in a separate follow-up CL. Because so much code is moved between files, this CL looks artificially large. BUG=catapult:#2690 Committed: https://chromium.googlesource.com/external/github.com/catapult-project/catapult/+/2629713e67ee64c5448824c93f086efc92a5c2f0

Patch Set 1 #

Total comments: 14

Patch Set 2 : Style fixes + added categories back to profile_chrome unit tests #

Patch Set 3 : Rebase #

Total comments: 28

Patch Set 4 : Resolve style errors and ensure ftrace gets command-line categories as well #

Total comments: 6

Patch Set 5 : Set categories based on target devices and revised comments #

Total comments: 13

Patch Set 6 : Refactors #

Total comments: 4

Patch Set 7 : Small refactors #

Patch Set 8 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+641 lines, -360 lines) Patch
M systrace/bin/adb_profile_chrome_startup View 1 2 3 4 5 6 3 chunks +7 lines, -10 lines 0 comments Download
M systrace/profile_chrome/atrace_tracing_agent.py View 1 2 3 4 5 4 chunks +37 lines, -3 lines 0 comments Download
M systrace/profile_chrome/atrace_tracing_agent_unittest.py View 1 1 chunk +2 lines, -3 lines 0 comments Download
M systrace/profile_chrome/chrome_startup_tracing_agent.py View 1 2 3 4 5 3 chunks +23 lines, -1 line 0 comments Download
M systrace/profile_chrome/chrome_startup_tracing_agent_unittest.py View 1 chunk +1 line, -1 line 0 comments Download
M systrace/profile_chrome/chrome_tracing_agent.py View 1 2 3 5 chunks +79 lines, -4 lines 0 comments Download
M systrace/profile_chrome/chrome_tracing_agent_unittest.py View 1 1 chunk +4 lines, -2 lines 0 comments Download
M systrace/profile_chrome/ddms_tracing_agent.py View 1 3 chunks +18 lines, -1 line 0 comments Download
M systrace/profile_chrome/ddms_tracing_agent_unittest.py View 1 chunk +1 line, -1 line 0 comments Download
M systrace/profile_chrome/flags.py View 1 chunk +0 lines, -13 lines 0 comments Download
M systrace/profile_chrome/main.py View 5 chunks +13 lines, -104 lines 0 comments Download
M systrace/profile_chrome/perf_tracing_agent.py View 1 2 3 4 chunks +41 lines, -3 lines 0 comments Download
M systrace/profile_chrome/perf_tracing_agent_unittest.py View 1 1 chunk +3 lines, -4 lines 0 comments Download
M systrace/profile_chrome/profiler.py View 1 3 chunks +23 lines, -4 lines 0 comments Download
M systrace/profile_chrome/profiler_unittest.py View 4 chunks +6 lines, -8 lines 0 comments Download
M systrace/systrace/run_systrace.py View 1 2 3 4 5 6 5 chunks +46 lines, -44 lines 0 comments Download
M systrace/systrace/systrace_runner.py View 1 2 3 3 chunks +51 lines, -12 lines 0 comments Download
M systrace/systrace/tracing_agents/__init__.py View 1 1 chunk +12 lines, -3 lines 0 comments Download
M systrace/systrace/tracing_agents/atrace_agent.py View 1 2 3 4 10 chunks +112 lines, -57 lines 0 comments Download
M systrace/systrace/tracing_agents/atrace_agent_unittest.py View 1 2 3 3 chunks +4 lines, -2 lines 0 comments Download
M systrace/systrace/tracing_agents/atrace_from_file_agent.py View 1 2 3 2 chunks +17 lines, -1 line 0 comments Download
M systrace/systrace/tracing_agents/battor_trace_agent.py View 1 2 3 3 chunks +57 lines, -13 lines 0 comments Download
M systrace/systrace/tracing_agents/battor_trace_agent_unittest.py View 1 6 chunks +6 lines, -1 line 0 comments Download
M systrace/systrace/tracing_agents/ftrace_agent.py View 1 2 3 6 chunks +41 lines, -14 lines 0 comments Download
M systrace/systrace/tracing_agents/ftrace_agent_unittest.py View 2 chunks +4 lines, -3 lines 0 comments Download
M systrace/systrace/tracing_controller.py View 1 2 3 4 5 6 7 6 chunks +22 lines, -22 lines 0 comments Download
M telemetry/telemetry/internal/platform/tracing_agent/atrace_tracing_agent.py View 1 2 3 4 5 2 chunks +11 lines, -26 lines 0 comments Download

Messages

Total messages: 24 (5 generated)
washingtonp
ptal
4 years, 3 months ago (2016-08-26 02:58:07 UTC) #2
Sami
Couple of minor suggestions. https://codereview.chromium.org/2276263003/diff/1/systrace/profile_chrome/atrace_tracing_agent.py File systrace/profile_chrome/atrace_tracing_agent.py (right): https://codereview.chromium.org/2276263003/diff/1/systrace/profile_chrome/atrace_tracing_agent.py#newcode5 systrace/profile_chrome/atrace_tracing_agent.py:5: import optparse Not something for ...
4 years, 3 months ago (2016-08-26 15:53:43 UTC) #4
washingtonp
ptal https://codereview.chromium.org/2276263003/diff/1/systrace/profile_chrome/atrace_tracing_agent.py File systrace/profile_chrome/atrace_tracing_agent.py (right): https://codereview.chromium.org/2276263003/diff/1/systrace/profile_chrome/atrace_tracing_agent.py#newcode5 systrace/profile_chrome/atrace_tracing_agent.py:5: import optparse On 2016/08/26 15:53:43, Sami wrote: > ...
4 years, 3 months ago (2016-08-26 18:50:55 UTC) #5
Chris Craik
https://codereview.chromium.org/2276263003/diff/30001/systrace/systrace/systrace_runner.py File systrace/systrace/systrace_runner.py (right): https://codereview.chromium.org/2276263003/diff/30001/systrace/systrace/systrace_runner.py#newcode72 systrace/systrace/systrace_runner.py:72: class AgentWithConfig(object): This structure feels a bit strange. We ...
4 years, 3 months ago (2016-08-26 20:32:18 UTC) #6
Zhen Wang
https://codereview.chromium.org/2276263003/diff/30001/systrace/profile_chrome/atrace_tracing_agent.py File systrace/profile_chrome/atrace_tracing_agent.py (right): https://codereview.chromium.org/2276263003/diff/30001/systrace/profile_chrome/atrace_tracing_agent.py#newcode124 systrace/profile_chrome/atrace_tracing_agent.py:124: class AtraceConfig(tracing_agents.TracingConfig): Is the plan to use the AtraceConfig ...
4 years, 3 months ago (2016-08-26 20:39:41 UTC) #7
Zhen Wang
https://codereview.chromium.org/2276263003/diff/30001/systrace/systrace/systrace_runner.py File systrace/systrace/systrace_runner.py (right): https://codereview.chromium.org/2276263003/diff/30001/systrace/systrace/systrace_runner.py#newcode72 systrace/systrace/systrace_runner.py:72: class AgentWithConfig(object): On 2016/08/26 20:32:18, Chris Craik wrote: > ...
4 years, 3 months ago (2016-08-26 20:51:18 UTC) #8
Chris Craik
> I think the root cause of this is because config is not passed to ...
4 years, 3 months ago (2016-08-26 20:58:05 UTC) #9
Zhen Wang
On 2016/08/26 20:58:05, Chris Craik wrote: > > I think the root cause of this ...
4 years, 3 months ago (2016-08-26 21:41:48 UTC) #10
washingtonp
ptal https://codereview.chromium.org/2276263003/diff/30001/systrace/profile_chrome/atrace_tracing_agent.py File systrace/profile_chrome/atrace_tracing_agent.py (right): https://codereview.chromium.org/2276263003/diff/30001/systrace/profile_chrome/atrace_tracing_agent.py#newcode124 systrace/profile_chrome/atrace_tracing_agent.py:124: class AtraceConfig(tracing_agents.TracingConfig): On 2016/08/26 20:39:41, Zhen Wang wrote: ...
4 years, 3 months ago (2016-08-27 02:22:44 UTC) #11
Zhen Wang
Took a quick look. Mostly look ok to me. Some nits. https://codereview.chromium.org/2276263003/diff/50001/systrace/profile_chrome/chrome_startup_tracing_agent.py File systrace/profile_chrome/chrome_startup_tracing_agent.py (right): ...
4 years, 3 months ago (2016-08-27 15:32:42 UTC) #12
washingtonp
ptal https://codereview.chromium.org/2276263003/diff/50001/systrace/profile_chrome/chrome_startup_tracing_agent.py File systrace/profile_chrome/chrome_startup_tracing_agent.py (right): https://codereview.chromium.org/2276263003/diff/50001/systrace/profile_chrome/chrome_startup_tracing_agent.py#newcode99 systrace/profile_chrome/chrome_startup_tracing_agent.py:99: # command line options. On 2016/08/27 15:32:41, Zhen ...
4 years, 3 months ago (2016-08-29 06:40:02 UTC) #13
Zhen Wang
https://codereview.chromium.org/2276263003/diff/70001/systrace/profile_chrome/atrace_tracing_agent.py File systrace/profile_chrome/atrace_tracing_agent.py (right): https://codereview.chromium.org/2276263003/diff/70001/systrace/profile_chrome/atrace_tracing_agent.py#newcode148 systrace/profile_chrome/atrace_tracing_agent.py:148: return [] Are there default ones that we want ...
4 years, 3 months ago (2016-08-29 16:30:21 UTC) #14
Chris Craik
LGTM, but please fix Zhen's remaining comments before submitting.
4 years, 3 months ago (2016-08-29 19:10:13 UTC) #15
washingtonp
ptal https://codereview.chromium.org/2276263003/diff/70001/systrace/profile_chrome/atrace_tracing_agent.py File systrace/profile_chrome/atrace_tracing_agent.py (right): https://codereview.chromium.org/2276263003/diff/70001/systrace/profile_chrome/atrace_tracing_agent.py#newcode148 systrace/profile_chrome/atrace_tracing_agent.py:148: return [] On 2016/08/29 16:30:20, Zhen Wang wrote: ...
4 years, 3 months ago (2016-08-29 20:00:41 UTC) #16
Zhen Wang
lgtm with nits Please wait for Sami to take a look, too. https://codereview.chromium.org/2276263003/diff/70001/systrace/profile_chrome/main.py File systrace/profile_chrome/main.py ...
4 years, 3 months ago (2016-08-29 21:00:26 UTC) #17
washingtonp
Sami, ptal when you have a chance. https://codereview.chromium.org/2276263003/diff/90001/systrace/bin/adb_profile_chrome_startup File systrace/bin/adb_profile_chrome_startup (right): https://codereview.chromium.org/2276263003/diff/90001/systrace/bin/adb_profile_chrome_startup#newcode37 systrace/bin/adb_profile_chrome_startup:37: parser.add_option_group(chrome_startup_tracing_agent.add_options(parser)) On ...
4 years, 3 months ago (2016-08-29 21:13:17 UTC) #18
Sami
lgtm.
4 years, 3 months ago (2016-08-30 18:24:49 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2276263003/130001
4 years, 3 months ago (2016-08-30 20:41:32 UTC) #22
commit-bot: I haz the power
4 years, 3 months ago (2016-08-30 20:53:10 UTC) #24
Message was sent while issue was closed.
Committed patchset #8 (id:130001) as
https://chromium.googlesource.com/external/github.com/catapult-project/catapu...

Powered by Google App Engine
This is Rietveld 408576698