mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Douglas RAILLARD <douglas.raillard@arm.com>
To: rostedt@goodmis.org
Cc: douglas.raillard@arm.com, Masami Hiramatsu <mhiramat@kernel.org>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org
Subject: [PATCH 2/3] tracing: Rename find_synth_event() into synth_event_find()
Date: Tue, 18 Mar 2025 18:08:11 +0000	[thread overview]
Message-ID: <20250318180814.226644-2-douglas.raillard@arm.com> (raw)
In-Reply-To: <20250318180814.226644-1-douglas.raillard@arm.com>

From: Douglas Raillard <douglas.raillard@arm.com>

Rename the freshly exposed function to comply with the existing naming
convention for synth event public API.

Signed-off-by: Douglas Raillard <douglas.raillard@arm.com>
---
 include/linux/trace_events.h      |  2 +-
 kernel/trace/trace_events_hist.c  |  8 ++++----
 kernel/trace/trace_events_synth.c | 10 +++++-----
 3 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/include/linux/trace_events.h b/include/linux/trace_events.h
index cbe389d0e144..e069d84a73f0 100644
--- a/include/linux/trace_events.h
+++ b/include/linux/trace_events.h
@@ -519,7 +519,7 @@ extern int dynevent_create(struct dynevent_cmd *cmd);
 
 struct synth_event;
 
-extern struct synth_event *find_synth_event(const char *name);
+extern struct synth_event *synth_event_find(const char *name);
 
 extern void trace_synth(struct synth_event *event, u64 *var_ref_vals,
 			       unsigned int *var_ref_idx);
diff --git a/kernel/trace/trace_events_hist.c b/kernel/trace/trace_events_hist.c
index a2bc7a972763..7067f6fedb1a 100644
--- a/kernel/trace/trace_events_hist.c
+++ b/kernel/trace/trace_events_hist.c
@@ -3964,7 +3964,7 @@ static int trace_action_create(struct hist_trigger_data *hist_data,
 	else
 		synth_event_name = data->action_name;
 
-	event = find_synth_event(synth_event_name);
+	event = synth_event_find(synth_event_name);
 	if (!event) {
 		hist_err(tr, HIST_ERR_SYNTH_EVENT_NOT_FOUND, errpos(synth_event_name));
 		return -EINVAL;
@@ -6580,7 +6580,7 @@ static void hist_unreg_all(struct trace_event_file *file)
 			trace_event_trigger_enable_disable(file, 0);
 
 			se_name = trace_event_name(file->event_call);
-			se = find_synth_event(se_name);
+			se = synth_event_find(se_name);
 			if (se)
 				se->ref--;
 
@@ -6699,7 +6699,7 @@ static int event_hist_trigger_parse(struct event_command *cmd_ops,
 
 		event_trigger_unregister(cmd_ops, file, glob+1, trigger_data);
 		se_name = trace_event_name(file->event_call);
-		se = find_synth_event(se_name);
+		se = synth_event_find(se_name);
 		if (se)
 			se->ref--;
 		ret = 0;
@@ -6735,7 +6735,7 @@ static int event_hist_trigger_parse(struct event_command *cmd_ops,
 		goto out_unreg;
 
 	se_name = trace_event_name(file->event_call);
-	se = find_synth_event(se_name);
+	se = synth_event_find(se_name);
 	if (se)
 		se->ref++;
  out:
diff --git a/kernel/trace/trace_events_synth.c b/kernel/trace/trace_events_synth.c
index 9f0817eec3c2..4a9a44d37ffc 100644
--- a/kernel/trace/trace_events_synth.c
+++ b/kernel/trace/trace_events_synth.c
@@ -830,7 +830,7 @@ static struct tracepoint *alloc_synth_tracepoint(char *name)
 	return tp;
 }
 
-struct synth_event *find_synth_event(const char *name)
+struct synth_event *synth_event_find(const char *name)
 {
 	struct dyn_event *pos;
 	struct synth_event *event;
@@ -845,7 +845,7 @@ struct synth_event *find_synth_event(const char *name)
 
 	return NULL;
 }
-EXPORT_SYMBOL_GPL(find_synth_event);
+EXPORT_SYMBOL_GPL(synth_event_find);
 
 typedef void (*synth_probe_func_t) (void *__data, u64 *var_ref_vals,
 				    unsigned int *var_ref_idx);
@@ -1317,7 +1317,7 @@ static int __create_synth_event(const char *name, const char *raw_fields)
 
 	mutex_lock(&event_mutex);
 
-	event = find_synth_event(name);
+	event = synth_event_find(name);
 	if (event) {
 		synth_err(SYNTH_ERR_EVENT_EXISTS, errpos(name));
 		ret = -EEXIST;
@@ -1513,7 +1513,7 @@ int synth_event_delete(const char *event_name)
 	int ret = -ENOENT;
 
 	mutex_lock(&event_mutex);
-	se = find_synth_event(event_name);
+	se = synth_event_find(event_name);
 	if (se) {
 		mod = se->mod;
 		ret = destroy_synth_event(se);
@@ -1622,7 +1622,7 @@ static int synth_event_run_command(struct dynevent_cmd *cmd)
 	if (ret)
 		return ret;
 
-	se = find_synth_event(cmd->event_name);
+	se = synth_event_find(cmd->event_name);
 	if (WARN_ON(!se))
 		return -ENOENT;
 
-- 
2.43.0


  reply	other threads:[~2025-03-18 18:08 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-18 18:08 [PATCH 1/3] tracing: Expose functions to trace a synth event Douglas RAILLARD
2025-03-18 18:08 ` Douglas RAILLARD [this message]
2025-03-18 18:08 ` [PATCH 3/3] tracing: Rename trace_synth() to synth_event_trace2() Douglas RAILLARD
2025-03-19 13:37   ` Masami Hiramatsu
2025-03-19 14:51     ` Douglas Raillard
2025-03-24  6:29       ` Masami Hiramatsu
2025-03-24 14:30         ` Steven Rostedt
2025-03-25 16:05         ` Douglas Raillard
2025-03-25 16:25           ` Steven Rostedt
2025-03-25 18:16             ` Douglas Raillard
2025-03-25 20:13               ` Douglas Raillard

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=20250318180814.226644-2-douglas.raillard@arm.com \
    --to=douglas.raillard@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mhiramat@kernel.org \
    --cc=rostedt@goodmis.org \
    /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

all inboxes | Powered by JetHome®