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>
This commit is contained in:
committed by
Arnaldo Carvalho de Melo
parent
a5e05abc6b
commit
9bdff5b643
@@ -173,37 +173,6 @@ int parse_event_file(struct tep_handle *pevent,
|
||||
return tep_parse_event(pevent, buf, size, sys);
|
||||
}
|
||||
|
||||
struct tep_event *trace_find_next_event(struct tep_handle *pevent,
|
||||
struct tep_event *event)
|
||||
{
|
||||
static int idx;
|
||||
int events_count;
|
||||
struct tep_event *all_events;
|
||||
|
||||
all_events = tep_get_first_event(pevent);
|
||||
events_count = tep_get_events_count(pevent);
|
||||
if (!pevent || !all_events || events_count < 1)
|
||||
return NULL;
|
||||
|
||||
if (!event) {
|
||||
idx = 0;
|
||||
return all_events;
|
||||
}
|
||||
|
||||
if (idx < events_count && event == (all_events + idx)) {
|
||||
idx++;
|
||||
if (idx == events_count)
|
||||
return NULL;
|
||||
return (all_events + idx);
|
||||
}
|
||||
|
||||
for (idx = 1; idx < events_count; idx++) {
|
||||
if (event == (all_events + (idx - 1)))
|
||||
return (all_events + idx);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
struct flag {
|
||||
const char *name;
|
||||
unsigned long long value;
|
||||
|
||||
Reference in New Issue
Block a user