* [PATCH] perf: Remove unused add_perf_probe_events
@ 2024-09-29 1:06 linux
2024-09-30 5:25 ` Namhyung Kim
2024-10-09 17:55 ` Namhyung Kim
0 siblings, 2 replies; 3+ messages in thread
From: linux @ 2024-09-29 1:06 UTC (permalink / raw)
To: irogers, peterz, mingo, acme, namhyung, jolsa
Cc: linux-perf-users, linux-kernel, Dr. David Alan Gilbert
From: "Dr. David Alan Gilbert" <linux@treblig.org>
add_perf_probe_events has been unused since 2015's commit
b02137cc6550 ("perf probe: Move print logic into cmd_probe()")
which confusingly now uses perf_add_probe_events.
Remove it.
Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
---
tools/perf/util/probe-event.c | 18 ------------------
tools/perf/util/probe-event.h | 1 -
2 files changed, 19 deletions(-)
diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
index a17c9b8a7a79..698a92875374 100644
--- a/tools/perf/util/probe-event.c
+++ b/tools/perf/util/probe-event.c
@@ -3705,24 +3705,6 @@ void cleanup_perf_probe_events(struct perf_probe_event *pevs, int npevs)
}
}
-int add_perf_probe_events(struct perf_probe_event *pevs, int npevs)
-{
- int ret;
-
- ret = init_probe_symbol_maps(pevs->uprobes);
- if (ret < 0)
- return ret;
-
- ret = convert_perf_probe_events(pevs, npevs);
- if (ret == 0)
- ret = apply_perf_probe_events(pevs, npevs);
-
- cleanup_perf_probe_events(pevs, npevs);
-
- exit_probe_symbol_maps();
- return ret;
-}
-
int del_perf_probe_events(struct strfilter *filter)
{
int ret, ret2, ufd = -1, kfd = -1;
diff --git a/tools/perf/util/probe-event.h b/tools/perf/util/probe-event.h
index 7e3b6c3d1f74..4850e52f274e 100644
--- a/tools/perf/util/probe-event.h
+++ b/tools/perf/util/probe-event.h
@@ -159,7 +159,6 @@ void line_range__clear(struct line_range *lr);
/* Initialize line range */
int line_range__init(struct line_range *lr);
-int add_perf_probe_events(struct perf_probe_event *pevs, int npevs);
int convert_perf_probe_events(struct perf_probe_event *pevs, int npevs);
int apply_perf_probe_events(struct perf_probe_event *pevs, int npevs);
int show_probe_trace_events(struct perf_probe_event *pevs, int npevs);
--
2.46.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] perf: Remove unused add_perf_probe_events
2024-09-29 1:06 [PATCH] perf: Remove unused add_perf_probe_events linux
@ 2024-09-30 5:25 ` Namhyung Kim
2024-10-09 17:55 ` Namhyung Kim
1 sibling, 0 replies; 3+ messages in thread
From: Namhyung Kim @ 2024-09-30 5:25 UTC (permalink / raw)
To: linux
Cc: irogers, peterz, mingo, acme, jolsa, linux-perf-users,
linux-kernel, Masami Hiramatsu
Adding Masami to CC.
On Sun, Sep 29, 2024 at 02:06:59AM +0100, linux@treblig.org wrote:
> From: "Dr. David Alan Gilbert" <linux@treblig.org>
>
> add_perf_probe_events has been unused since 2015's commit
> b02137cc6550 ("perf probe: Move print logic into cmd_probe()")
> which confusingly now uses perf_add_probe_events.
>
> Remove it.
>
> Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
> ---
> tools/perf/util/probe-event.c | 18 ------------------
> tools/perf/util/probe-event.h | 1 -
> 2 files changed, 19 deletions(-)
>
> diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
> index a17c9b8a7a79..698a92875374 100644
> --- a/tools/perf/util/probe-event.c
> +++ b/tools/perf/util/probe-event.c
> @@ -3705,24 +3705,6 @@ void cleanup_perf_probe_events(struct perf_probe_event *pevs, int npevs)
> }
> }
>
> -int add_perf_probe_events(struct perf_probe_event *pevs, int npevs)
> -{
> - int ret;
> -
> - ret = init_probe_symbol_maps(pevs->uprobes);
> - if (ret < 0)
> - return ret;
> -
> - ret = convert_perf_probe_events(pevs, npevs);
> - if (ret == 0)
> - ret = apply_perf_probe_events(pevs, npevs);
> -
> - cleanup_perf_probe_events(pevs, npevs);
> -
> - exit_probe_symbol_maps();
> - return ret;
> -}
> -
> int del_perf_probe_events(struct strfilter *filter)
> {
> int ret, ret2, ufd = -1, kfd = -1;
> diff --git a/tools/perf/util/probe-event.h b/tools/perf/util/probe-event.h
> index 7e3b6c3d1f74..4850e52f274e 100644
> --- a/tools/perf/util/probe-event.h
> +++ b/tools/perf/util/probe-event.h
> @@ -159,7 +159,6 @@ void line_range__clear(struct line_range *lr);
> /* Initialize line range */
> int line_range__init(struct line_range *lr);
>
> -int add_perf_probe_events(struct perf_probe_event *pevs, int npevs);
> int convert_perf_probe_events(struct perf_probe_event *pevs, int npevs);
> int apply_perf_probe_events(struct perf_probe_event *pevs, int npevs);
> int show_probe_trace_events(struct perf_probe_event *pevs, int npevs);
> --
> 2.46.2
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] perf: Remove unused add_perf_probe_events
2024-09-29 1:06 [PATCH] perf: Remove unused add_perf_probe_events linux
2024-09-30 5:25 ` Namhyung Kim
@ 2024-10-09 17:55 ` Namhyung Kim
1 sibling, 0 replies; 3+ messages in thread
From: Namhyung Kim @ 2024-10-09 17:55 UTC (permalink / raw)
To: irogers, peterz, mingo, acme, jolsa, linux; +Cc: linux-perf-users, linux-kernel
On Sun, 29 Sep 2024 02:06:59 +0100, linux@treblig.org wrote:
> add_perf_probe_events has been unused since 2015's commit
> b02137cc6550 ("perf probe: Move print logic into cmd_probe()")
> which confusingly now uses perf_add_probe_events.
>
> Remove it.
>
>
> [...]
Applied to perf-tools-next, thanks!
[1/1] perf: Remove unused add_perf_probe_events
commit: 3c4e558787f233044052ffd255a44ff7127952ce
Best regards,
Namhyung
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-10-09 17:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-29 1:06 [PATCH] perf: Remove unused add_perf_probe_events linux
2024-09-30 5:25 ` Namhyung Kim
2024-10-09 17:55 ` Namhyung Kim
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).