[tip:perf/core] perf evlist: Make event2evsel public
From: tip-bot for Jiri Olsa
Date: Wed Jul 13 2016 - 03:25:31 EST
Commit-ID: 7cb5c5acaba9fa0b90ca11275f19131d3eca35c2
Gitweb: http://git.kernel.org/tip/7cb5c5acaba9fa0b90ca11275f19131d3eca35c2
Author: Jiri Olsa <jolsa@xxxxxxxxxx>
AuthorDate: Sun, 10 Jul 2016 13:07:53 +0200
Committer: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
CommitDate: Tue, 12 Jul 2016 16:13:58 -0300
perf evlist: Make event2evsel public
It will be used outside of evlist.c object in folowing patches.
Signed-off-by: Jiri Olsa <jolsa@xxxxxxxxxx>
Cc: David Ahern <dsahern@xxxxxxxxx>
Cc: Namhyung Kim <namhyung@xxxxxxxxxx>
Cc: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
Link: http://lkml.kernel.org/r/1468148882-10362-2-git-send-email-jolsa@xxxxxxxxxx
Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
---
tools/perf/util/evlist.c | 4 ++--
tools/perf/util/evlist.h | 3 +++
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c
index f2d478d..862e69c 100644
--- a/tools/perf/util/evlist.c
+++ b/tools/perf/util/evlist.c
@@ -651,8 +651,8 @@ static int perf_evlist__event2id(struct perf_evlist *evlist,
return 0;
}
-static struct perf_evsel *perf_evlist__event2evsel(struct perf_evlist *evlist,
- union perf_event *event)
+struct perf_evsel *perf_evlist__event2evsel(struct perf_evlist *evlist,
+ union perf_event *event)
{
struct perf_evsel *first = perf_evlist__first(evlist);
struct hlist_head *head;
diff --git a/tools/perf/util/evlist.h b/tools/perf/util/evlist.h
index 872912b..afd0877 100644
--- a/tools/perf/util/evlist.h
+++ b/tools/perf/util/evlist.h
@@ -323,4 +323,7 @@ void perf_event_attr__set_max_precise_ip(struct perf_event_attr *attr);
struct perf_evsel *
perf_evlist__find_evsel_by_str(struct perf_evlist *evlist, const char *str);
+
+struct perf_evsel *perf_evlist__event2evsel(struct perf_evlist *evlist,
+ union perf_event *event);
#endif /* __PERF_EVLIST_H */