blob: 3eb3989a21107aac5be0a654630d117fa643575a [file] [log] [blame]
Arnaldo Carvalho de Melo69aad6f2011-01-03 16:39:04 -02001#ifndef __PERF_EVSEL_H
2#define __PERF_EVSEL_H 1
3
4#include <linux/list.h>
5#include <linux/perf_event.h>
6#include "types.h"
7#include "xyarray.h"
8
9struct perf_evsel {
10 struct list_head node;
11 struct perf_event_attr attr;
12 char *filter;
13 struct xyarray *fd;
14 int idx;
15 void *priv;
16};
17
18struct perf_evsel *perf_evsel__new(u32 type, u64 config, int idx);
19void perf_evsel__delete(struct perf_evsel *evsel);
20
21int perf_evsel__alloc_fd(struct perf_evsel *evsel, int ncpus, int nthreads);
22void perf_evsel__free_fd(struct perf_evsel *evsel);
23
24#endif /* __PERF_EVSEL_H */