mirror of
https://github.com/ARM-software/devlib.git
synced 2025-01-31 02:00:45 +00:00
ftrace: move file path definitions
All ftrace generated files are present under a common base folder. This patch updates the FtraceCollector API to exposes just the common base folder from where all the other paths can be generated. This is a refactoring patch which makes it easier to add further attributes. Signed-off-by: Patrick Bellasi <patrick.bellasi@arm.com>
This commit is contained in:
parent
51b7f01d36
commit
bda7a16656
@ -47,8 +47,7 @@ class FtraceCollector(TraceCollector):
|
||||
events=None,
|
||||
buffer_size=None,
|
||||
buffer_size_step=1000,
|
||||
buffer_size_file='/sys/kernel/debug/tracing/buffer_size_kb',
|
||||
marker_file='/sys/kernel/debug/tracing/trace_marker',
|
||||
tracing_path='/sys/kernel/debug/tracing',
|
||||
automark=True,
|
||||
autoreport=True,
|
||||
autoview=False,
|
||||
@ -58,8 +57,7 @@ class FtraceCollector(TraceCollector):
|
||||
self.events = events if events is not None else DEFAULT_EVENTS
|
||||
self.buffer_size = buffer_size
|
||||
self.buffer_size_step = buffer_size_step
|
||||
self.buffer_size_file = buffer_size_file
|
||||
self.marker_file = marker_file
|
||||
self.tracing_path = tracing_path
|
||||
self.automark = automark
|
||||
self.autoreport = autoreport
|
||||
self.autoview = autoview
|
||||
@ -71,6 +69,10 @@ class FtraceCollector(TraceCollector):
|
||||
self.event_string = _build_trace_events(self.events)
|
||||
self._reset_needed = True
|
||||
|
||||
# Setup tracing paths
|
||||
self.buffer_size_file = self.target.path.join(self.tracing_path, 'buffer_size_kb')
|
||||
self.marker_file = self.target.path.join(self.tracing_path, 'trace_marker')
|
||||
|
||||
self.host_binary = which('trace-cmd')
|
||||
self.kernelshark = which('kernelshark')
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user