]> www.infradead.org Git - linux.git/commitdiff
perf: event: Remove deadcode
authorDr. David Alan Gilbert <linux@treblig.org>
Wed, 6 Nov 2024 14:48:26 +0000 (14:48 +0000)
committerNamhyung Kim <namhyung@kernel.org>
Thu, 7 Nov 2024 18:51:56 +0000 (10:51 -0800)
event_format__print() last use was removed by 2017's
commit 894f3f1732cb ("perf script: Use event_format__fprintf()")

evlist__find_tracepoint_by_id() last use was removed by 2012's
commit e60fc847cefa ("perf evlist: Remove some unused methods")

evlist__set_tp_filter_pid() last use was removed by 2017's
commit dd1a50377c92 ("perf trace: Introduce filter_loop_pids()")

Remove them.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Reviewed-by: Ian Rogers <irogers@google.com>
Link: https://lore.kernel.org/r/20241106144826.91728-1-linux@treblig.org
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
tools/perf/util/evlist.c
tools/perf/util/evlist.h
tools/perf/util/trace-event-parse.c
tools/perf/util/trace-event.h

index 37d0fc01c180016b109b36016dd8de4926fa2e50..f0dd174e2debdbe8786813f41a37b724ef3aad26 100644 (file)
@@ -320,19 +320,6 @@ struct evsel *evlist__add_sched_switch(struct evlist *evlist, bool system_wide)
 }
 #endif
 
-struct evsel *evlist__find_tracepoint_by_id(struct evlist *evlist, int id)
-{
-       struct evsel *evsel;
-
-       evlist__for_each_entry(evlist, evsel) {
-               if (evsel->core.attr.type   == PERF_TYPE_TRACEPOINT &&
-                   (int)evsel->core.attr.config == id)
-                       return evsel;
-       }
-
-       return NULL;
-}
-
 struct evsel *evlist__find_tracepoint_by_name(struct evlist *evlist, const char *name)
 {
        struct evsel *evsel;
@@ -1157,11 +1144,6 @@ int evlist__set_tp_filter_pids(struct evlist *evlist, size_t npids, pid_t *pids)
        return ret;
 }
 
-int evlist__set_tp_filter_pid(struct evlist *evlist, pid_t pid)
-{
-       return evlist__set_tp_filter_pids(evlist, 1, &pid);
-}
-
 int evlist__append_tp_filter_pids(struct evlist *evlist, size_t npids, pid_t *pids)
 {
        char *filter = asprintf__tp_filter_pids(npids, pids);
index cd80a470a4ba5a830d0415f1e085378c68e9f88d..adddb1db1ad2b25d30068f6389bef7f5ea71d135 100644 (file)
@@ -132,7 +132,6 @@ int __evlist__set_tracepoints_handlers(struct evlist *evlist,
        __evlist__set_tracepoints_handlers(evlist, array, ARRAY_SIZE(array))
 
 int evlist__set_tp_filter(struct evlist *evlist, const char *filter);
-int evlist__set_tp_filter_pid(struct evlist *evlist, pid_t pid);
 int evlist__set_tp_filter_pids(struct evlist *evlist, size_t npids, pid_t *pids);
 
 int evlist__append_tp_filter(struct evlist *evlist, const char *filter);
@@ -140,7 +139,6 @@ int evlist__append_tp_filter(struct evlist *evlist, const char *filter);
 int evlist__append_tp_filter_pid(struct evlist *evlist, pid_t pid);
 int evlist__append_tp_filter_pids(struct evlist *evlist, size_t npids, pid_t *pids);
 
-struct evsel *evlist__find_tracepoint_by_id(struct evlist *evlist, int id);
 struct evsel *evlist__find_tracepoint_by_name(struct evlist *evlist, const char *name);
 
 int evlist__add_pollfd(struct evlist *evlist, int fd);
index f0332bd3a501ea4e3881178d62246a576b6ef875..d97830cdbd7e638533951681b8c18e4afacc047d 100644 (file)
@@ -116,12 +116,6 @@ void event_format__fprintf(struct tep_event *event,
        trace_seq_destroy(&s);
 }
 
-void event_format__print(struct tep_event *event,
-                        int cpu, void *data, int size)
-{
-       return event_format__fprintf(event, cpu, data, size, stdout);
-}
-
 /*
  * prev_state is of size long, which is 32 bits on 32 bit architectures.
  * As it needs to have the same bits for both 32 bit and 64 bit architectures
index bbf8b26bc8da2b3c438742036bfc86599b460e61..0e5133f1b9103960c487c6f5fb48fc732b90a0b6 100644 (file)
@@ -42,9 +42,6 @@ struct tep_event *trace_event__tp_format_id(int id);
 void event_format__fprintf(struct tep_event *event,
                           int cpu, void *data, int size, FILE *fp);
 
-void event_format__print(struct tep_event *event,
-                        int cpu, void *data, int size);
-
 int parse_ftrace_file(struct tep_handle *pevent, char *buf, unsigned long size);
 int parse_event_file(struct tep_handle *pevent,
                     char *buf, unsigned long size, char *sys);