Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
pmu.h
Go to the documentation of this file.
1 #ifndef __PMU_H
2 #define __PMU_H
3 
4 #include <linux/bitops.h>
5 #include <linux/perf_event.h>
6 
7 enum {
11 };
12 
13 #define PERF_PMU_FORMAT_BITS 64
14 
16  char *name;
17  int value;
19  struct list_head list;
20 };
21 
23  char *name;
24  struct list_head terms;
25  struct list_head list;
26 };
27 
28 struct perf_pmu {
29  char *name;
31  struct cpu_map *cpus;
32  struct list_head format;
34  struct list_head list;
35 };
36 
37 struct perf_pmu *perf_pmu__find(char *name);
38 int perf_pmu__config(struct perf_pmu *pmu, struct perf_event_attr *attr,
39  struct list_head *head_terms);
40 int perf_pmu__check_alias(struct perf_pmu *pmu, struct list_head *head_terms);
41 struct list_head *perf_pmu__alias(struct perf_pmu *pmu,
42  struct list_head *head_terms);
43 int perf_pmu_wrap(void);
44 void perf_pmu_error(struct list_head *list, char *name, char const *msg);
45 
46 int perf_pmu__new_format(struct list_head *list, char *name,
47  int config, unsigned long *bits);
48 void perf_pmu__set_format(unsigned long *bits, long from, long to);
49 
50 struct perf_pmu *perf_pmu__scan(struct perf_pmu *pmu);
51 
52 int perf_pmu__test(void);
53 #endif /* __PMU_H */