Skip to content

Commit

Permalink
instruments/trace_cmd: Allow setting top_buffer_size
Browse files Browse the repository at this point in the history
Allow optionally setting the top level ftrace buffer size separately
from the devlib buffer size. The parameter will be passed to the devlib
FtraceCollector and take effect there.

Signed-off-by: Kajetan Puchalski <[email protected]>
  • Loading branch information
mrkajetanp committed Aug 15, 2023
1 parent 839242d commit 00f60b5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions wa/instruments/trace_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,13 @@ class TraceCmdInstrument(Instrument):
value by going down from the specified size in
``buffer_size_step`` intervals.
"""),
Parameter('top_buffer_size', kind=int, default=None,
global_alias='trace_top_buffer_size',
description="""
The same as buffer_size except it sets the size of the
top-level buffer instead of the devlib one. If left unset,
it will default to the same as the devlib buffer size.
"""),
Parameter('buffer_size_step', kind=int, default=1000,
global_alias='trace_buffer_size_step',
description="""
Expand Down Expand Up @@ -168,6 +175,7 @@ def initialize(self, context):
events=self.events,
functions=self.functions,
buffer_size=self.buffer_size,
top_buffer_size=self.top_buffer_size,
buffer_size_step=1000,
automark=False,
autoreport=True,
Expand Down

0 comments on commit 00f60b5

Please sign in to comment.