| Index: systrace/systrace/tracing_agents/ftrace_agent.py
|
| diff --git a/systrace/systrace/tracing_agents/ftrace_agent.py b/systrace/systrace/tracing_agents/ftrace_agent.py
|
| index 89d3e1aefbc8277106cf72d2df72e3579cf7429f..fc69c74c633f989b33bbc6287856561172b608c2 100644
|
| --- a/systrace/systrace/tracing_agents/ftrace_agent.py
|
| +++ b/systrace/systrace/tracing_agents/ftrace_agent.py
|
| @@ -4,7 +4,6 @@
|
|
|
| import os
|
| import sys
|
| -import time
|
|
|
| from devil.utils import timeout_retry
|
| from systrace import tracing_agents
|
| @@ -116,13 +115,6 @@ class FtraceAgent(tracing_agents.TracingAgent):
|
| buffer_size = self._options.trace_buf_size
|
| return buffer_size
|
|
|
| - def _get_trace_time(self):
|
| - wait_time = 5
|
| - if ((self._options.trace_time is not None)
|
| - and (self._options.trace_time > 0)):
|
| - wait_time = self._options.trace_time
|
| - return wait_time
|
| -
|
| def _fix_categories(self, categories):
|
| """
|
| Applies the default category (sched) if there are no categories
|
| @@ -168,23 +160,12 @@ class FtraceAgent(tracing_agents.TracingAgent):
|
| args=[options, categories])
|
|
|
| def _StopAgentTracingImpl(self):
|
| - pass
|
| -
|
| - def StopAgentTracing(self, timeout):
|
| - return timeout_retry.Run(self._StopAgentTracingImpl,
|
| - timeout, 1)
|
| -
|
| - def _GetResultsImpl(self):
|
| """Collect the result of tracing.
|
|
|
| This function will block while collecting the result. For sync mode, it
|
| reads the data, e.g., from stdout, until it finishes. For async mode, it
|
| blocks until the agent is stopped and the data is ready.
|
| """
|
| - try:
|
| - time.sleep(self._get_trace_time())
|
| - except KeyboardInterrupt:
|
| - pass
|
| self._fio.writeFile(FT_TRACE_ON, '0')
|
| for category in self._categories:
|
| self._category_disable(category)
|
| @@ -195,6 +176,11 @@ class FtraceAgent(tracing_agents.TracingAgent):
|
| if self._options.fix_circular:
|
| print "WARN: circular buffer fixups are not yet supported."
|
|
|
| + def StopAgentTracing(self, timeout):
|
| + return timeout_retry.Run(self._StopAgentTracingImpl,
|
| + timeout, 1)
|
| +
|
| + def _GetResultsImpl(self):
|
| # get the output
|
| d = self._fio.readFile(FT_TRACE)
|
| self._fio.writeFile(FT_BUFFER_SIZE, "1")
|
|
|