public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Tomas Glozar <tglozar@redhat.com>, John Kacur <jkacur@redhat.com>,
	stable@vger.kernel.org, Luis Goncalves <lgoncalv@redhat.com>,
	Gabriele Monaco <gmonaco@redhat.com>
Subject: [for-next][PATCH 02/14] rtla: Add trace_instance_stop
Date: Fri, 24 Jan 2025 13:48:37 -0500	[thread overview]
Message-ID: <20250124184856.544449472@goodmis.org> (raw)
In-Reply-To: 20250124184835.052017152@goodmis.org

From: Tomas Glozar <tglozar@redhat.com>

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 | 8 ++++++++
 tools/tracing/rtla/src/trace.h | 1 +
 2 files changed, 9 insertions(+)

diff --git a/tools/tracing/rtla/src/trace.c b/tools/tracing/rtla/src/trace.c
index 170a706248ab..440323a997c6 100644
--- a/tools/tracing/rtla/src/trace.c
+++ b/tools/tracing/rtla/src/trace.c
@@ -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
  */
diff --git a/tools/tracing/rtla/src/trace.h b/tools/tracing/rtla/src/trace.h
index c7c92dc9a18a..76e1b77291ba 100644
--- a/tools/tracing/rtla/src/trace.h
+++ b/tools/tracing/rtla/src/trace.h
@@ -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);
-- 
2.45.2



  parent reply	other threads:[~2025-01-24 18:48 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-24 18:48 [for-next][PATCH 00/14] rtla: Update for tools for 6.14 Steven Rostedt
2025-01-24 18:48 ` [for-next][PATCH 01/14] tools/rtla: Add basic test suite Steven Rostedt
2025-01-24 18:48 ` Steven Rostedt [this message]
2025-01-24 18:48 ` [for-next][PATCH 03/14] rtla/timerlat_hist: Stop timerlat tracer on signal Steven Rostedt
2025-01-24 18:48 ` [for-next][PATCH 04/14] rtla/timerlat_top: " Steven Rostedt
2025-01-24 18:48 ` [for-next][PATCH 05/14] rtla/timerlat_hist: Abort event processing on second signal Steven Rostedt
2025-01-24 18:48 ` [for-next][PATCH 06/14] rtla/timerlat_top: " Steven Rostedt
2025-01-24 18:48 ` [for-next][PATCH 07/14] rtla/osnoise: Distinguish missing workload option Steven Rostedt
2025-01-24 18:48 ` [for-next][PATCH 08/14] rtla/timerlat_hist: Set OSNOISE_WORKLOAD for kernel threads Steven Rostedt
2025-01-24 18:48 ` [for-next][PATCH 09/14] rtla/timerlat_top: " Steven Rostedt
2025-01-24 18:48 ` [for-next][PATCH 10/14] tools/rtla: Add osnoise_trace_is_off() Steven Rostedt
2025-01-24 18:48 ` [for-next][PATCH 11/14] rtla: Count missed trace events Steven Rostedt
2025-01-24 18:48 ` [for-next][PATCH 12/14] rtla: Count all processed events Steven Rostedt
2025-01-24 18:48 ` [for-next][PATCH 13/14] rtla: Add function to report missed events Steven Rostedt
2025-01-24 18:48 ` [for-next][PATCH 14/14] rtla: Report missed event count Steven Rostedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250124184856.544449472@goodmis.org \
    --to=rostedt@goodmis.org \
    --cc=gmonaco@redhat.com \
    --cc=jkacur@redhat.com \
    --cc=lgoncalv@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=tglozar@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox