]>
Commit | Line | Data |
---|---|---|
80eeb67f AK |
1 | #ifndef PMU_EVENTS_H |
2 | #define PMU_EVENTS_H | |
3 | ||
4 | /* | |
5 | * Describe each PMU event. Each CPU has a table of PMU events. | |
6 | */ | |
7 | struct pmu_event { | |
8 | const char *name; | |
9 | const char *event; | |
10 | const char *desc; | |
11 | const char *topic; | |
794ba54a | 12 | const char *long_desc; |
fedb2b51 AK |
13 | const char *pmu; |
14 | const char *unit; | |
15 | const char *perpkg; | |
00636c3b | 16 | const char *metric_expr; |
96284814 | 17 | const char *metric_name; |
80eeb67f AK |
18 | }; |
19 | ||
20 | /* | |
21 | * | |
22 | * Map a CPU to its table of PMU events. The CPU is identified by the | |
23 | * cpuid field, which is an arch-specific identifier for the CPU. | |
24 | * The identifier specified in tools/perf/pmu-events/arch/xxx/mapfile | |
25 | * must match the get_cpustr() in tools/perf/arch/xxx/util/header.c) | |
26 | * | |
27 | * The cpuid can contain any character other than the comma. | |
28 | */ | |
29 | struct pmu_events_map { | |
30 | const char *cpuid; | |
31 | const char *version; | |
32 | const char *type; /* core, uncore etc */ | |
33 | struct pmu_event *table; | |
34 | }; | |
35 | ||
36 | /* | |
37 | * Global table mapping each known CPU for the architecture to its | |
38 | * table of PMU events. | |
39 | */ | |
40 | extern struct pmu_events_map pmu_events_map[]; | |
41 | ||
42 | #endif |