]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/blob - tools/perf/lib/include/internal/evsel.h
libperf: Add missing 'struct xyarray' forward declaration
[mirror_ubuntu-focal-kernel.git] / tools / perf / lib / include / internal / evsel.h
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __LIBPERF_INTERNAL_EVSEL_H
3 #define __LIBPERF_INTERNAL_EVSEL_H
4
5 #include <linux/types.h>
6 #include <linux/perf_event.h>
7 #include <stdbool.h>
8
9 struct perf_cpu_map;
10 struct perf_thread_map;
11 struct xyarray;
12
13 struct perf_evsel {
14 struct list_head node;
15 struct perf_event_attr attr;
16 struct perf_cpu_map *cpus;
17 struct perf_cpu_map *own_cpus;
18 struct perf_thread_map *threads;
19 struct xyarray *fd;
20
21 /* parse modifier helper */
22 int nr_members;
23 bool system_wide;
24 };
25
26 int perf_evsel__alloc_fd(struct perf_evsel *evsel, int ncpus, int nthreads);
27 void perf_evsel__close_fd(struct perf_evsel *evsel);
28 void perf_evsel__free_fd(struct perf_evsel *evsel);
29 int perf_evsel__read_size(struct perf_evsel *evsel);
30 int perf_evsel__apply_filter(struct perf_evsel *evsel, const char *filter);
31
32 #endif /* __LIBPERF_INTERNAL_EVSEL_H */