diff options
author | Jamie Gennis <jgennis@google.com> | 2013-03-27 19:55:09 -0700 |
---|---|---|
committer | Jamie Gennis <jgennis@google.com> | 2013-03-29 16:11:42 -0700 |
commit | b9a5fc88b96d2cd8f6b08c72cc35917e42367969 (patch) | |
tree | 0cd69adb2053182cea4bd2e6e522fdd8a76cef1c | |
parent | 88448d9ae4dfff1805045790ef5f32495d62abcc (diff) | |
download | chromium-trace-b9a5fc88b96d2cd8f6b08c72cc35917e42367969.tar.gz |
systrace: plumb the -a flag through to systrace.py
Change-Id: I93d10fb3c526c3cbe6a19220b489bb327bb3146b
-rwxr-xr-x | systrace.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/systrace.py b/systrace.py index da98284a..e5da99d1 100755 --- a/systrace.py +++ b/systrace.py @@ -32,6 +32,9 @@ def main(): help='use a trace buffer size of N KB', metavar='N') parser.add_option('-l', '--list-categories', dest='list_categories', default=False, action='store_true', help='list the available categories and exit') + parser.add_option('-a', '--app', dest='app_name', default=None, type='string', + action='store', help='enable application-level tracing for comma-separated ' + + 'list of app cmdlines') parser.add_option('--link-assets', dest='link_assets', default=False, action='store_true', help='link to original CSS or JS resources ' @@ -60,12 +63,16 @@ def main(): atrace_args.extend(['-t', str(options.trace_time)]) else: parser.error('the trace time must be a positive number') + if options.trace_buf_size is not None: if options.trace_buf_size > 0: atrace_args.extend(['-b', str(options.trace_buf_size)]) else: parser.error('the trace buffer size must be a positive number') + if options.app_name is not None: + atrace_args.extend(['-a', options.app_name]) + atrace_args.extend(args) if atrace_args[0] == 'adb': @@ -200,6 +207,7 @@ def get_assets(src_dir, build_dir): html_prefix = """<!DOCTYPE HTML> <html> <head i18n-values="dir:textdirection;"> +<meta charset="utf-8"/> <title>Android System Trace</title> %s %s |