mirror of
https://github.com/ARM-software/devlib.git
synced 2025-02-23 21:17:50 +00:00
devlib/trace/ftrace.py: Fix reset and stop states
A system with function_profile_enabled set to 1 prevents using function_graph. Using nop tracer left the tracing files in a dirty state.
This commit is contained in:
parent
795c0f233f
commit
0465a75c56
@ -227,6 +227,8 @@ class FtraceCollector(CollectorBase):
|
||||
self._set_buffer_size()
|
||||
self.target.execute('{} reset'.format(self.target_binary),
|
||||
as_root=True, timeout=TIMEOUT)
|
||||
if self.functions:
|
||||
self.target.write_value(self.function_profile_file, 0, verify=False)
|
||||
self._reset_needed = False
|
||||
|
||||
def start(self):
|
||||
@ -290,7 +292,7 @@ class FtraceCollector(CollectorBase):
|
||||
def stop(self):
|
||||
# Disable kernel function profiling
|
||||
if self.functions and self.tracer is None:
|
||||
self.target.execute('echo 1 > {}'.format(self.function_profile_file),
|
||||
self.target.execute('echo 0 > {}'.format(self.function_profile_file),
|
||||
as_root=True)
|
||||
if 'cpufreq' in self.target.modules:
|
||||
self.logger.debug('Trace CPUFreq frequencies')
|
||||
|
Loading…
x
Reference in New Issue
Block a user