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

Side by Side Diff: systrace/systrace/run_systrace.py

Issue 3018533002: Implementing a Monsoon power monitor trace agent, utilizing the UI infrastructure that the BattOr a…
Patch Set: Updating static methods and fixing test fakes. Created 3 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 2
3 # Copyright (c) 2011 The Chromium Authors. All rights reserved. 3 # Copyright (c) 2011 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 """Android system-wide tracing utility. 7 """Android system-wide tracing utility.
8 8
9 This is a tool for capturing a trace that includes data from both userland and 9 This is a tool for capturing a trace that includes data from both userland and
10 the kernel. It creates an HTML file for visualizing the trace. 10 the kernel. It creates an HTML file for visualizing the trace.
(...skipping 26 matching lines...) Expand all
37 if _SYSTRACE_DIR not in sys.path: 37 if _SYSTRACE_DIR not in sys.path:
38 sys.path.insert(0, _SYSTRACE_DIR) 38 sys.path.insert(0, _SYSTRACE_DIR)
39 39
40 from devil import devil_env 40 from devil import devil_env
41 from devil.android.sdk import adb_wrapper 41 from devil.android.sdk import adb_wrapper
42 from systrace import systrace_runner 42 from systrace import systrace_runner
43 from systrace import util 43 from systrace import util
44 from systrace.tracing_agents import atrace_agent 44 from systrace.tracing_agents import atrace_agent
45 from systrace.tracing_agents import atrace_from_file_agent 45 from systrace.tracing_agents import atrace_from_file_agent
46 from systrace.tracing_agents import atrace_process_dump 46 from systrace.tracing_agents import atrace_process_dump
47 from systrace.tracing_agents import monsoon_agent
47 from systrace.tracing_agents import battor_trace_agent 48 from systrace.tracing_agents import battor_trace_agent
48 from systrace.tracing_agents import ftrace_agent 49 from systrace.tracing_agents import ftrace_agent
49 from systrace.tracing_agents import walt_agent 50 from systrace.tracing_agents import walt_agent
50 51
51 52
52 ALL_MODULES = [atrace_agent, atrace_from_file_agent, atrace_process_dump, 53 ALL_MODULES = [atrace_agent, atrace_from_file_agent, atrace_process_dump,
53 battor_trace_agent, ftrace_agent, walt_agent] 54 battor_trace_agent, ftrace_agent, walt_agent, monsoon_agent]
54 55
55 56
56 def parse_options(argv): 57 def parse_options(argv):
57 """Parses and checks the command-line options. 58 """Parses and checks the command-line options.
58 59
59 Returns: 60 Returns:
60 A tuple containing the options structure and a list of categories to 61 A tuple containing the options structure and a list of categories to
61 be traced. 62 be traced.
62 """ 63 """
63 usage = 'Usage: %prog [options] [category1 [category2 ...]]' 64 usage = 'Usage: %prog [options] [category1 [category2 ...]]'
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 print('Tracing completed. Collecting output...') 192 print('Tracing completed. Collecting output...')
192 controller.StopTracing() 193 controller.StopTracing()
193 print('Outputting Systrace results...') 194 print('Outputting Systrace results...')
194 controller.OutputSystraceResults(write_json=options.write_json) 195 controller.OutputSystraceResults(write_json=options.write_json)
195 196
196 def main(): 197 def main():
197 main_impl(sys.argv) 198 main_impl(sys.argv)
198 199
199 if __name__ == '__main__' and __package__ is None: 200 if __name__ == '__main__' and __package__ is None:
200 main() 201 main()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698