Chromium Code Reviews| Index: telemetry/telemetry/internal/platform/tracing_agent/atrace_tracing_agent.py |
| diff --git a/telemetry/telemetry/internal/platform/tracing_agent/atrace_tracing_agent.py b/telemetry/telemetry/internal/platform/tracing_agent/atrace_tracing_agent.py |
| index 5a939dfa15b247243fb3f91d4739caef894816a7..ed36697994a75fdd8825f469d0b3b758000d44bf 100644 |
| --- a/telemetry/telemetry/internal/platform/tracing_agent/atrace_tracing_agent.py |
| +++ b/telemetry/telemetry/internal/platform/tracing_agent/atrace_tracing_agent.py |
| @@ -18,7 +18,7 @@ class AtraceOpts(object): |
| to do so. |
| ''' |
| - def __init__(self, serial_number, app_name): |
| + def __init__(self, serial_number, app_name, categories): |
| self.compress_trace_data = True |
| self.trace_time = None |
| self.trace_buf_size = None |
| @@ -29,6 +29,7 @@ class AtraceOpts(object): |
| self.fix_tgids = True |
| self.fix_circular = True |
| self.device_serial_number = serial_number |
| + self.atrace_categories = categories |
| class AtraceTracingAgent(tracing_agent.TracingAgent): |
| def __init__(self, platform_backend): |
| @@ -36,7 +37,7 @@ class AtraceTracingAgent(tracing_agent.TracingAgent): |
| self._device = platform_backend.device |
| self._categories = None |
| self._atrace_agent = atrace_agent.AtraceAgent() |
| - self._options = None |
| + self._config = None |
| @classmethod |
| def IsSupported(cls, platform_backend): |
| @@ -46,10 +47,10 @@ class AtraceTracingAgent(tracing_agent.TracingAgent): |
| def StartAgentTracing(self, config, timeout): |
| if not config.enable_atrace_trace: |
| return False |
| - self._categories = config.atrace_config.categories |
| - self._options = AtraceOpts(str(self._device), config.atrace_config.app_name) |
| - return self._atrace_agent.StartAgentTracing( |
| - self._options, self._categories, timeout) |
| + self._config = AtraceOpts(str(self._device), |
|
Zhen Wang
2016/08/29 16:30:20
Are you intend to use AtraceConfig instead of Atra
washingtonp
2016/08/29 20:00:41
Done.
|
| + config.atrace_config.app_name, |
| + config.atrace_config.categories) |
| + return self._atrace_agent.StartAgentTracing(self._config, timeout) |
| def StopAgentTracing(self): |
| self._atrace_agent.StopAgentTracing() |