Skip to contentSkip to conversation

perf probe: Make synthesize_perf_probe_point() private to probe-event.c

PATCH In review Arnaldo Carvalho de Melo 3 participants 3 messages Aug 4, 2023 – Aug 11, 2023 perf events

lore
Share & tools
lore

Arnaldo Carvalho de Melo

author maintainer
#0 lore raw

PATCH 1/1 perf probe: Make synthesize_perf_probe_point() private to probe-event.c

Not used in any other place, so just make it static.

---
 tools/perf/util/probe-event.c | 4 +++-
 tools/perf/util/probe-event.h | 1 -
 2 files changed, 3 insertions(+), 2 deletions(-)
tools/perf/util/probe-event.c +3 -1
index 2835d87cb97771f9..1a5b7fa459b23204 100644
@@ -53,6 +53,8 @@
 bool probe_event_dry_run;	/* Dry run flag */
 struct probe_conf probe_conf = { .magic_num = DEFAULT_PROBE_MAGIC_NUM };
 
+static char *synthesize_perf_probe_point(struct perf_probe_point *pp);
+
 #define semantic_error(msg ...) pr_err("Semantic error :" msg)
 
 int e_snprintf(char *str, size_t size, const char *format, ...)
@@ -2010,7 +2012,7 @@ char *synthesize_perf_probe_arg(struct perf_probe_arg *pa)
 }
 
 /* Compose only probe point (not argument) */
-char *synthesize_perf_probe_point(struct perf_probe_point *pp)
+static char *synthesize_perf_probe_point(struct perf_probe_point *pp)
 {
 	struct strbuf buf;
 	char *tmp, *ret = NULL;
tools/perf/util/probe-event.h +0 -1
index 8ad5b1579f1d37b6..7e3b6c3d1f7447a7 100644
@@ -137,7 +137,6 @@ int parse_probe_trace_command(const char *cmd, struct probe_trace_event *tev);
 char *synthesize_perf_probe_command(struct perf_probe_event *pev);
 char *synthesize_probe_trace_command(struct probe_trace_event *tev);
 char *synthesize_perf_probe_arg(struct perf_probe_arg *pa);
-char *synthesize_perf_probe_point(struct perf_probe_point *pp);
 
 int perf_probe_event__copy(struct perf_probe_event *dst,
 			   struct perf_probe_event *src);
Signature · 1 line
2.37.1
reviewer Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · Arnaldo Carvalho de Melo

Not used in any other place, so just make it static.

Thanks,
Ian

Quoted 42 lines
---
 tools/perf/util/probe-event.c | 4 +++-
 tools/perf/util/probe-event.h | 1 -
 2 files changed, 3 insertions(+), 2 deletions(-)
tools/perf/util/probe-event.c +3 -1
index 2835d87cb97771f9..1a5b7fa459b23204 100644
@@ -53,6 +53,8 @@
 bool probe_event_dry_run;      /* Dry run flag */
 struct probe_conf probe_conf = { .magic_num = DEFAULT_PROBE_MAGIC_NUM };
 
+static char *synthesize_perf_probe_point(struct perf_probe_point *pp);
+
 #define semantic_error(msg ...) pr_err("Semantic error :" msg)
 
 int e_snprintf(char *str, size_t size, const char *format, ...)
@@ -2010,7 +2012,7 @@ char *synthesize_perf_probe_arg(struct perf_probe_arg *pa)
 }
 
 /* Compose only probe point (not argument) */
-char *synthesize_perf_probe_point(struct perf_probe_point *pp)
+static char *synthesize_perf_probe_point(struct perf_probe_point *pp)
 {
        struct strbuf buf;
        char *tmp, *ret = NULL;
tools/perf/util/probe-event.h +0 -2
index 8ad5b1579f1d37b6..7e3b6c3d1f7447a7 100644
@@ -137,7 +137,6 @@ int parse_probe_trace_command(const char *cmd, struct probe_trace_event *tev);
 char *synthesize_perf_probe_command(struct perf_probe_event *pev);
 char *synthesize_probe_trace_command(struct probe_trace_event *tev);
 char *synthesize_perf_probe_arg(struct perf_probe_arg *pa);
-char *synthesize_perf_probe_point(struct perf_probe_point *pp);
 
 int perf_probe_event__copy(struct perf_probe_event *dst,
                           struct perf_probe_event *src);
--

2.37.1

Acked-by on v1 1/1
#2 lore raw
In reply to Arnaldo Carvalho de Melo
Quoted 2 lines · On Fri, 4 Aug 2023 13:38:37 -0300 Arnaldo Carvalho de Melo <[email protected]>…

Not used in any other place, so just make it static.

Looks good to me.

Thanks!

Quoted 49 lines
---
 tools/perf/util/probe-event.c | 4 +++-
 tools/perf/util/probe-event.h | 1 -
 2 files changed, 3 insertions(+), 2 deletions(-)
tools/perf/util/probe-event.c +3 -1
index 2835d87cb97771f9..1a5b7fa459b23204 100644
@@ -53,6 +53,8 @@
 bool probe_event_dry_run;	/* Dry run flag */
 struct probe_conf probe_conf = { .magic_num = DEFAULT_PROBE_MAGIC_NUM };
 
+static char *synthesize_perf_probe_point(struct perf_probe_point *pp);
+
 #define semantic_error(msg ...) pr_err("Semantic error :" msg)
 
 int e_snprintf(char *str, size_t size, const char *format, ...)
@@ -2010,7 +2012,7 @@ char *synthesize_perf_probe_arg(struct perf_probe_arg *pa)
 }
 
 /* Compose only probe point (not argument) */
-char *synthesize_perf_probe_point(struct perf_probe_point *pp)
+static char *synthesize_perf_probe_point(struct perf_probe_point *pp)
 {
 	struct strbuf buf;
 	char *tmp, *ret = NULL;
tools/perf/util/probe-event.h +0 -1
index 8ad5b1579f1d37b6..7e3b6c3d1f7447a7 100644
@@ -137,7 +137,6 @@ int parse_probe_trace_command(const char *cmd, struct probe_trace_event *tev);
 char *synthesize_perf_probe_command(struct perf_probe_event *pev);
 char *synthesize_probe_trace_command(struct probe_trace_event *tev);
 char *synthesize_perf_probe_arg(struct perf_probe_arg *pa);
-char *synthesize_perf_probe_point(struct perf_probe_point *pp);
 
 int perf_probe_event__copy(struct perf_probe_event *dst,
 			   struct perf_probe_event *src);
Signature · 1 line
2.37.1
Signature · 1 line
Masami Hiramatsu (Google) <[email protected]>