summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Rostedt (VMware) <rostedt@goodmis.org>2019-10-17 17:05:23 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2019-11-05 06:39:27 -0500
commit6047e1a81e9fe9851ed37e13c2438312c04435d9 (patch)
treecebf988bf8f6077be5d33108d06f42a94cffbe12
parent443b0636ea7386d01dc460b4a4264e125f710b53 (diff)
perf tools: Remove unused trace_find_next_event()
trace_find_next_event() was buggy and pretty much a useless helper. As there are no more users, just remove it. Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Tzvetomir Stoyanov <tstoyanov@vmware.com> Cc: linux-trace-devel@vger.kernel.org Link: http://lore.kernel.org/lkml/20191017210636.224045576@goodmis.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r--tools/perf/util/trace-event-parse.c31
-rw-r--r--tools/perf/util/trace-event.h2
2 files changed, 0 insertions, 33 deletions
diff --git a/tools/perf/util/trace-event-parse.c b/tools/perf/util/trace-event-parse.c
index 5d6bfc70b210..9634f0ae57be 100644
--- a/tools/perf/util/trace-event-parse.c
+++ b/tools/perf/util/trace-event-parse.c
@@ -173,37 +173,6 @@ int parse_event_file(struct tep_handle *pevent,
173 return tep_parse_event(pevent, buf, size, sys); 173 return tep_parse_event(pevent, buf, size, sys);
174} 174}
175 175
176struct tep_event *trace_find_next_event(struct tep_handle *pevent,
177 struct tep_event *event)
178{
179 static int idx;
180 int events_count;
181 struct tep_event *all_events;
182
183 all_events = tep_get_first_event(pevent);
184 events_count = tep_get_events_count(pevent);
185 if (!pevent || !all_events || events_count < 1)
186 return NULL;
187
188 if (!event) {
189 idx = 0;
190 return all_events;
191 }
192
193 if (idx < events_count && event == (all_events + idx)) {
194 idx++;
195 if (idx == events_count)
196 return NULL;
197 return (all_events + idx);
198 }
199
200 for (idx = 1; idx < events_count; idx++) {
201 if (event == (all_events + (idx - 1)))
202 return (all_events + idx);
203 }
204 return NULL;
205}
206
207struct flag { 176struct flag {
208 const char *name; 177 const char *name;
209 unsigned long long value; 178 unsigned long long value;
diff --git a/tools/perf/util/trace-event.h b/tools/perf/util/trace-event.h
index 2e158387b3d7..72fdf2a3577c 100644
--- a/tools/perf/util/trace-event.h
+++ b/tools/perf/util/trace-event.h
@@ -47,8 +47,6 @@ void parse_saved_cmdline(struct tep_handle *pevent, char *file, unsigned int siz
47 47
48ssize_t trace_report(int fd, struct trace_event *tevent, bool repipe); 48ssize_t trace_report(int fd, struct trace_event *tevent, bool repipe);
49 49
50struct tep_event *trace_find_next_event(struct tep_handle *pevent,
51 struct tep_event *event);
52unsigned long long read_size(struct tep_event *event, void *ptr, int size); 50unsigned long long read_size(struct tep_event *event, void *ptr, int size);
53unsigned long long eval_flag(const char *flag); 51unsigned long long eval_flag(const char *flag);
54 52