Skip to content

Commit e879b5d

Browse files
lenticularis39rostedt
authored andcommitted
rtla: Add trace_instance_stop
Support not only turning trace on for the timerlat tracer, but also turning it off. This will be used in subsequent patches to stop the timerlat tracer without also wiping the trace buffer. Cc: stable@vger.kernel.org Cc: John Kacur <jkacur@redhat.com> Cc: Luis Goncalves <lgoncalv@redhat.com> Cc: Gabriele Monaco <gmonaco@redhat.com> Link: https://lore.kernel.org/20250116144931.649593-2-tglozar@redhat.com Signed-off-by: Tomas Glozar <tglozar@redhat.com> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
1 parent ab16714 commit e879b5d

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

tools/tracing/rtla/src/trace.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,14 @@ int trace_instance_start(struct trace_instance *trace)
196196
return tracefs_trace_on(trace->inst);
197197
}
198198

199+
/*
200+
* trace_instance_stop - stop tracing a given rtla instance
201+
*/
202+
int trace_instance_stop(struct trace_instance *trace)
203+
{
204+
return tracefs_trace_off(trace->inst);
205+
}
206+
199207
/*
200208
* trace_events_free - free a list of trace events
201209
*/

tools/tracing/rtla/src/trace.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ struct trace_instance {
2121

2222
int trace_instance_init(struct trace_instance *trace, char *tool_name);
2323
int trace_instance_start(struct trace_instance *trace);
24+
int trace_instance_stop(struct trace_instance *trace);
2425
void trace_instance_destroy(struct trace_instance *trace);
2526

2627
struct trace_seq *get_trace_seq(void);

0 commit comments

Comments
 (0)