]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/blame - tools/perf/util/evlist.h
perf test: check if cpu_map__new() return NULL
[mirror_ubuntu-hirsute-kernel.git] / tools / perf / util / evlist.h
CommitLineData
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
7struct 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
12struct 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
22struct perf_evsel;
23
24struct perf_evlist *perf_evlist__new(void);
25void perf_evlist__delete(struct perf_evlist *evlist);
26
27void perf_evlist__add(struct perf_evlist *evlist, struct perf_evsel *entry);
28int perf_evlist__add_default(struct perf_evlist *evlist);
29
5c581041 30int perf_evlist__alloc_pollfd(struct perf_evlist *evlist, int ncpus, int nthreads);
70082dd9 31void perf_evlist__add_pollfd(struct perf_evlist *evlist, int fd);
5c581041 32
70db7533
ACM
33struct perf_evsel *perf_evlist__id2evsel(struct perf_evlist *evlist, u64 id);
34
361c99a6 35#endif /* __PERF_EVLIST_H */