Chromium Code Reviews| Index: systrace/systrace/tracing_agents/atrace_from_file_agent.py |
| diff --git a/systrace/systrace/tracing_agents/atrace_from_file_agent.py b/systrace/systrace/tracing_agents/atrace_from_file_agent.py |
| index ec2ab370f7faf0b17fa19b26b352ddae26f84641..21021ff3fc95d70603d1eefd0be3ff1697ec87e4 100644 |
| --- a/systrace/systrace/tracing_agents/atrace_from_file_agent.py |
| +++ b/systrace/systrace/tracing_agents/atrace_from_file_agent.py |
| @@ -2,6 +2,7 @@ |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| +import optparse |
| import py_utils |
| import re |
| @@ -24,6 +25,23 @@ def try_create_agent(options): |
| else: |
| return False |
| + |
| +class AtraceFromFileConfig(tracing_agents.TracingConfig): |
| + def __init__(self, fix_circular, from_file): |
| + tracing_agents.TracingConfig.__init__(self) |
| + self.fix_circular = fix_circular |
| + self.from_file = from_file |
| + |
| +def add_options(parser): |
| + # The atrace_from_file_agent is not currently used, so don't display |
| + # any options. |
| + options = optparse.OptionGroup(parser, '') |
|
Chris Craik
2016/08/26 20:32:18
There's an extra couple newlines and a colon print
washingtonp
2016/08/27 02:22:44
Done.
|
| + return options |
| + |
| +def get_config(options): |
| + return AtraceFromFileConfig(options.fix_circular, options.from_file) |
| + |
| + |
| class AtraceFromFileAgent(tracing_agents.TracingAgent): |
| def __init__(self, options): |
| super(AtraceFromFileAgent, self).__init__() |
| @@ -32,7 +50,7 @@ class AtraceFromFileAgent(tracing_agents.TracingAgent): |
| self._fix_circular_traces = options.fix_circular |
| @py_utils.Timeout(tracing_agents.START_STOP_TIMEOUT) |
| - def StartAgentTracing(self, options, categories, timeout=None): |
| + def StartAgentTracing(self, options, timeout=None): |
| pass |
| @py_utils.Timeout(tracing_agents.START_STOP_TIMEOUT) |