Skip to content

Commit 6047e1a

Browse files
rostedtacmel
authored andcommitted
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) <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Tzvetomir Stoyanov <[email protected]> Cc: [email protected] Link: http://lore.kernel.org/lkml/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent 443b063 commit 6047e1a

File tree

2 files changed

+0
-33
lines changed

2 files changed

+0
-33
lines changed

tools/perf/util/trace-event-parse.c

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -173,37 +173,6 @@ int parse_event_file(struct tep_handle *pevent,
173173
return tep_parse_event(pevent, buf, size, sys);
174174
}
175175

176-
struct 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-
207176
struct flag {
208177
const char *name;
209178
unsigned long long value;

tools/perf/util/trace-event.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@ void parse_saved_cmdline(struct tep_handle *pevent, char *file, unsigned int siz
4747

4848
ssize_t trace_report(int fd, struct trace_event *tevent, bool repipe);
4949

50-
struct tep_event *trace_find_next_event(struct tep_handle *pevent,
51-
struct tep_event *event);
5250
unsigned long long read_size(struct tep_event *event, void *ptr, int size);
5351
unsigned long long eval_flag(const char *flag);
5452

0 commit comments

Comments
 (0)