2019-07-21 11:24:21 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
|
|
|
#ifndef __LIBPERF_INTERNAL_EVSEL_H
|
|
|
|
#define __LIBPERF_INTERNAL_EVSEL_H
|
|
|
|
|
2019-07-21 11:24:29 +00:00
|
|
|
#include <linux/types.h>
|
|
|
|
#include <linux/perf_event.h>
|
2019-08-06 09:35:19 +00:00
|
|
|
#include <stdbool.h>
|
2019-07-21 11:24:29 +00:00
|
|
|
|
2019-07-21 11:24:37 +00:00
|
|
|
struct perf_cpu_map;
|
2019-07-21 11:24:39 +00:00
|
|
|
struct perf_thread_map;
|
2019-09-23 18:10:35 +00:00
|
|
|
struct xyarray;
|
2019-07-21 11:24:37 +00:00
|
|
|
|
2019-07-21 11:24:21 +00:00
|
|
|
struct perf_evsel {
|
2019-07-21 11:24:37 +00:00
|
|
|
struct list_head node;
|
|
|
|
struct perf_event_attr attr;
|
|
|
|
struct perf_cpu_map *cpus;
|
2019-07-21 11:24:38 +00:00
|
|
|
struct perf_cpu_map *own_cpus;
|
2019-07-21 11:24:39 +00:00
|
|
|
struct perf_thread_map *threads;
|
2019-07-21 11:24:45 +00:00
|
|
|
struct xyarray *fd;
|
2019-07-21 11:24:46 +00:00
|
|
|
|
|
|
|
/* parse modifier helper */
|
|
|
|
int nr_members;
|
2019-08-06 09:35:19 +00:00
|
|
|
bool system_wide;
|
2019-07-21 11:24:21 +00:00
|
|
|
};
|
|
|
|
|
2019-07-21 11:24:48 +00:00
|
|
|
int perf_evsel__alloc_fd(struct perf_evsel *evsel, int ncpus, int nthreads);
|
2019-07-21 11:24:50 +00:00
|
|
|
void perf_evsel__close_fd(struct perf_evsel *evsel);
|
|
|
|
void perf_evsel__free_fd(struct perf_evsel *evsel);
|
2019-07-21 11:24:51 +00:00
|
|
|
int perf_evsel__read_size(struct perf_evsel *evsel);
|
2019-07-21 11:24:52 +00:00
|
|
|
int perf_evsel__apply_filter(struct perf_evsel *evsel, const char *filter);
|
2019-07-21 11:24:48 +00:00
|
|
|
|
2019-07-21 11:24:21 +00:00
|
|
|
#endif /* __LIBPERF_INTERNAL_EVSEL_H */
|