]>
Commit | Line | Data |
---|---|---|
361c99a6 ACM |
1 | #ifndef __PERF_EVLIST_H |
2 | #define __PERF_EVLIST_H 1 | |
3 | ||
4 | #include <linux/list.h> | |
70db7533 | 5 | #include "../perf.h" |
361c99a6 | 6 | |
5c581041 ACM |
7 | struct pollfd; |
8 | ||
70db7533 ACM |
9 | #define PERF_EVLIST__HLIST_BITS 8 |
10 | #define PERF_EVLIST__HLIST_SIZE (1 << PERF_EVLIST__HLIST_BITS) | |
11 | ||
361c99a6 ACM |
12 | struct perf_evlist { |
13 | struct list_head entries; | |
70db7533 | 14 | struct hlist_head heads[PERF_EVLIST__HLIST_SIZE]; |
361c99a6 | 15 | int nr_entries; |
5c581041 | 16 | int nr_fds; |
70db7533 ACM |
17 | int mmap_len; |
18 | struct perf_mmap *mmap; | |
5c581041 | 19 | struct pollfd *pollfd; |
361c99a6 ACM |
20 | }; |
21 | ||
22 | struct perf_evsel; | |
23 | ||
24 | struct perf_evlist *perf_evlist__new(void); | |
25 | void perf_evlist__delete(struct perf_evlist *evlist); | |
26 | ||
27 | void perf_evlist__add(struct perf_evlist *evlist, struct perf_evsel *entry); | |
28 | int perf_evlist__add_default(struct perf_evlist *evlist); | |
29 | ||
5c581041 | 30 | int perf_evlist__alloc_pollfd(struct perf_evlist *evlist, int ncpus, int nthreads); |
70082dd9 | 31 | void perf_evlist__add_pollfd(struct perf_evlist *evlist, int fd); |
5c581041 | 32 | |
70db7533 ACM |
33 | struct perf_evsel *perf_evlist__id2evsel(struct perf_evlist *evlist, u64 id); |
34 | ||
361c99a6 | 35 | #endif /* __PERF_EVLIST_H */ |