diff options
author | Jiri Olsa <jolsa@kernel.org> | 2019-07-21 07:24:24 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2019-07-29 17:34:44 -0400 |
commit | b04c597af761ccfd32f40ee3629843b6f3674fce (patch) | |
tree | 7ceefd750e7731718431fa76cc7b79727ca36373 /tools/perf/lib | |
parent | ce9036a6e3bdfac6c7ccf8221aec9bcf9c2d355e (diff) |
libperf: Add perf_evsel__init function
Add the perf_evsel__init() function to initialize perf_evsel struct.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Alexey Budankov <alexey.budankov@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Michael Petlan <mpetlan@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20190721112506.12306-38-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/lib')
-rw-r--r-- | tools/perf/lib/evsel.c | 5 | ||||
-rw-r--r-- | tools/perf/lib/include/perf/evsel.h | 4 | ||||
-rw-r--r-- | tools/perf/lib/libperf.map | 1 |
3 files changed, 10 insertions, 0 deletions
diff --git a/tools/perf/lib/evsel.c b/tools/perf/lib/evsel.c index 12e86de1994b..9a87e867a7ec 100644 --- a/tools/perf/lib/evsel.c +++ b/tools/perf/lib/evsel.c | |||
@@ -2,3 +2,8 @@ | |||
2 | #include <perf/evsel.h> | 2 | #include <perf/evsel.h> |
3 | #include <linux/list.h> | 3 | #include <linux/list.h> |
4 | #include <internal/evsel.h> | 4 | #include <internal/evsel.h> |
5 | |||
6 | void perf_evsel__init(struct perf_evsel *evsel) | ||
7 | { | ||
8 | INIT_LIST_HEAD(&evsel->node); | ||
9 | } | ||
diff --git a/tools/perf/lib/include/perf/evsel.h b/tools/perf/lib/include/perf/evsel.h index 162bffd43409..b4d074a3684b 100644 --- a/tools/perf/lib/include/perf/evsel.h +++ b/tools/perf/lib/include/perf/evsel.h | |||
@@ -2,6 +2,10 @@ | |||
2 | #ifndef __LIBPERF_EVSEL_H | 2 | #ifndef __LIBPERF_EVSEL_H |
3 | #define __LIBPERF_EVSEL_H | 3 | #define __LIBPERF_EVSEL_H |
4 | 4 | ||
5 | #include <perf/core.h> | ||
6 | |||
5 | struct perf_evsel; | 7 | struct perf_evsel; |
6 | 8 | ||
9 | LIBPERF_API void perf_evsel__init(struct perf_evsel *evsel); | ||
10 | |||
7 | #endif /* __LIBPERF_EVSEL_H */ | 11 | #endif /* __LIBPERF_EVSEL_H */ |
diff --git a/tools/perf/lib/libperf.map b/tools/perf/lib/libperf.map index c4f611010ccc..54f8503c6d82 100644 --- a/tools/perf/lib/libperf.map +++ b/tools/perf/lib/libperf.map | |||
@@ -9,6 +9,7 @@ LIBPERF_0.0.1 { | |||
9 | perf_thread_map__comm; | 9 | perf_thread_map__comm; |
10 | perf_thread_map__get; | 10 | perf_thread_map__get; |
11 | perf_thread_map__put; | 11 | perf_thread_map__put; |
12 | perf_evsel__init; | ||
12 | local: | 13 | local: |
13 | *; | 14 | *; |
14 | }; | 15 | }; |