diff options
Diffstat (limited to 'tools/perf/util/evsel.h')
-rw-r--r-- | tools/perf/util/evsel.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/perf/util/evsel.h b/tools/perf/util/evsel.h index 1594696bd127..c8fbef299436 100644 --- a/tools/perf/util/evsel.h +++ b/tools/perf/util/evsel.h | |||
@@ -29,19 +29,23 @@ struct perf_evsel { | |||
29 | struct perf_event_attr attr; | 29 | struct perf_event_attr attr; |
30 | char *filter; | 30 | char *filter; |
31 | struct xyarray *fd; | 31 | struct xyarray *fd; |
32 | struct xyarray *mmap; | ||
32 | struct perf_counts *counts; | 33 | struct perf_counts *counts; |
34 | size_t mmap_len; | ||
33 | int idx; | 35 | int idx; |
34 | void *priv; | 36 | void *priv; |
35 | }; | 37 | }; |
36 | 38 | ||
37 | struct cpu_map; | 39 | struct cpu_map; |
38 | struct thread_map; | 40 | struct thread_map; |
41 | struct perf_evlist; | ||
39 | 42 | ||
40 | struct perf_evsel *perf_evsel__new(struct perf_event_attr *attr, int idx); | 43 | struct perf_evsel *perf_evsel__new(struct perf_event_attr *attr, int idx); |
41 | void perf_evsel__delete(struct perf_evsel *evsel); | 44 | void perf_evsel__delete(struct perf_evsel *evsel); |
42 | 45 | ||
43 | int perf_evsel__alloc_fd(struct perf_evsel *evsel, int ncpus, int nthreads); | 46 | int perf_evsel__alloc_fd(struct perf_evsel *evsel, int ncpus, int nthreads); |
44 | int perf_evsel__alloc_counts(struct perf_evsel *evsel, int ncpus); | 47 | int perf_evsel__alloc_counts(struct perf_evsel *evsel, int ncpus); |
48 | int perf_evsel__alloc_mmap(struct perf_evsel *evsel, int ncpus, int nthreads); | ||
45 | void perf_evsel__free_fd(struct perf_evsel *evsel); | 49 | void perf_evsel__free_fd(struct perf_evsel *evsel); |
46 | void perf_evsel__close_fd(struct perf_evsel *evsel, int ncpus, int nthreads); | 50 | void perf_evsel__close_fd(struct perf_evsel *evsel, int ncpus, int nthreads); |
47 | 51 | ||
@@ -51,6 +55,10 @@ int perf_evsel__open_per_thread(struct perf_evsel *evsel, | |||
51 | struct thread_map *threads, bool group, bool inherit); | 55 | struct thread_map *threads, bool group, bool inherit); |
52 | int perf_evsel__open(struct perf_evsel *evsel, struct cpu_map *cpus, | 56 | int perf_evsel__open(struct perf_evsel *evsel, struct cpu_map *cpus, |
53 | struct thread_map *threads, bool group, bool inherit); | 57 | struct thread_map *threads, bool group, bool inherit); |
58 | int perf_evsel__mmap(struct perf_evsel *evsel, struct cpu_map *cpus, | ||
59 | struct thread_map *threads, int pages, | ||
60 | struct perf_evlist *evlist); | ||
61 | void perf_evsel__munmap(struct perf_evsel *evsel, int ncpus, int nthreads); | ||
54 | 62 | ||
55 | #define perf_evsel__match(evsel, t, c) \ | 63 | #define perf_evsel__match(evsel, t, c) \ |
56 | (evsel->attr.type == PERF_TYPE_##t && \ | 64 | (evsel->attr.type == PERF_TYPE_##t && \ |