]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
rtla: Add trace_instance_stop
authorTomas Glozar <tglozar@redhat.com>
Thu, 16 Jan 2025 14:49:27 +0000 (15:49 +0100)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Fri, 24 Jan 2025 18:45:02 +0000 (13:45 -0500)
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>
tools/tracing/rtla/src/trace.c
tools/tracing/rtla/src/trace.h

index 170a706248abffd5ecbcf154ec27542241d89fde..440323a997c621737235f0097dff25a392861e0a 100644 (file)
@@ -196,6 +196,14 @@ int trace_instance_start(struct trace_instance *trace)
        return tracefs_trace_on(trace->inst);
 }
 
+/*
+ * trace_instance_stop - stop tracing a given rtla instance
+ */
+int trace_instance_stop(struct trace_instance *trace)
+{
+       return tracefs_trace_off(trace->inst);
+}
+
 /*
  * trace_events_free - free a list of trace events
  */
index c7c92dc9a18a61be124f42f975a5a1f8a6f8b5eb..76e1b77291ba2af17fcc09c9263030bb2381b6a5 100644 (file)
@@ -21,6 +21,7 @@ struct trace_instance {
 
 int trace_instance_init(struct trace_instance *trace, char *tool_name);
 int trace_instance_start(struct trace_instance *trace);
+int trace_instance_stop(struct trace_instance *trace);
 void trace_instance_destroy(struct trace_instance *trace);
 
 struct trace_seq *get_trace_seq(void);