perf tests: Move test__syscall_open_tp_fields into separate object
[deliverable/linux.git] / tools / perf / util / pmu.h
CommitLineData
cd82a32e
JO
1#ifndef __PMU_H
2#define __PMU_H
3
4#include <linux/bitops.h>
7d380c8f 5#include "../../../include/uapi/linux/perf_event.h"
cd82a32e
JO
6
7enum {
8 PERF_PMU_FORMAT_VALUE_CONFIG,
9 PERF_PMU_FORMAT_VALUE_CONFIG1,
10 PERF_PMU_FORMAT_VALUE_CONFIG2,
11};
12
13#define PERF_PMU_FORMAT_BITS 64
14
15struct perf_pmu__format {
16 char *name;
17 int value;
18 DECLARE_BITMAP(bits, PERF_PMU_FORMAT_BITS);
19 struct list_head list;
20};
21
a6146d50
ZY
22struct perf_pmu__alias {
23 char *name;
24 struct list_head terms;
25 struct list_head list;
26};
27
cd82a32e
JO
28struct perf_pmu {
29 char *name;
30 __u32 type;
7ae92e74 31 struct cpu_map *cpus;
cd82a32e 32 struct list_head format;
a6146d50 33 struct list_head aliases;
cd82a32e
JO
34 struct list_head list;
35};
36
37struct perf_pmu *perf_pmu__find(char *name);
38int perf_pmu__config(struct perf_pmu *pmu, struct perf_event_attr *attr,
39 struct list_head *head_terms);
a6146d50
ZY
40int perf_pmu__check_alias(struct perf_pmu *pmu, struct list_head *head_terms);
41struct list_head *perf_pmu__alias(struct perf_pmu *pmu,
42 struct list_head *head_terms);
cd82a32e
JO
43int perf_pmu_wrap(void);
44void perf_pmu_error(struct list_head *list, char *name, char const *msg);
45
46int perf_pmu__new_format(struct list_head *list, char *name,
47 int config, unsigned long *bits);
48void perf_pmu__set_format(unsigned long *bits, long from, long to);
49
50a9667c
RR
50struct perf_pmu *perf_pmu__scan(struct perf_pmu *pmu);
51
cd82a32e
JO
52int perf_pmu__test(void);
53#endif /* __PMU_H */
This page took 0.051341 seconds and 5 git commands to generate.