perf evlist: Make event2evsel public
authorJiri Olsa <jolsa@kernel.org>
Sun, 10 Jul 2016 11:07:53 +0000 (13:07 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 12 Jul 2016 19:13:58 +0000 (16:13 -0300)
It will be used outside of evlist.c object in folowing patches.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1468148882-10362-2-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/evlist.c
tools/perf/util/evlist.h

index f2d478df8c3e40bcc661ace6d54c94a0189855da..862e69c2690d17054b10b40b24741ffe0e4ed02c 100644 (file)
@@ -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;
index 872912b392c9ff96d74b7400bb2d7f8ecdeb747c..afd087761a475b284ccb571e022391689d15c4fb 100644 (file)
@@ -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 */