diff --git a/devlib/collector/ftrace.py b/devlib/collector/ftrace.py index 3cf5a3d29..90bb19dcc 100644 --- a/devlib/collector/ftrace.py +++ b/devlib/collector/ftrace.py @@ -74,6 +74,7 @@ def __init__(self, target, trace_clock='local', saved_cmdlines_nr=4096, trace_cmd_mode='start', + record_interval=1000, ): super(FtraceCollector, self).__init__(target) self.events = events if events is not None else DEFAULT_EVENTS @@ -101,6 +102,7 @@ def __init__(self, target, self.function_string = None self.trace_clock = trace_clock self.saved_cmdlines_nr = saved_cmdlines_nr + self.record_interval = record_interval self._reset_needed = True self.bg_cmd = None self.tmp_output_dir = None @@ -299,9 +301,10 @@ async def start(self): self.target.busybox, output_dir=self.target.working_directory, )).strip() - trace_cmd = "cd {} && {command} {output}".format( + trace_cmd = "cd {} && {command} {interval} {output}".format( self.tmp_output_dir, command=trace_cmd, + interval="-s {}".format(self.record_interval), output="-o {}".format(self.target_output_file) ) if self.bg_cmd is None: