blob: 70d54794e3cb4dbe6bd4fc0311d784046ff490fd [file] [log] [blame]
Andi Kleen80eeb672016-09-19 17:39:33 -03001#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 */
7struct pmu_event {
8 const char *name;
9 const char *event;
10 const char *desc;
11 const char *topic;
12};
13
14/*
15 *
16 * Map a CPU to its table of PMU events. The CPU is identified by the
17 * cpuid field, which is an arch-specific identifier for the CPU.
18 * The identifier specified in tools/perf/pmu-events/arch/xxx/mapfile
19 * must match the get_cpustr() in tools/perf/arch/xxx/util/header.c)
20 *
21 * The cpuid can contain any character other than the comma.
22 */
23struct pmu_events_map {
24 const char *cpuid;
25 const char *version;
26 const char *type; /* core, uncore etc */
27 struct pmu_event *table;
28};
29
30/*
31 * Global table mapping each known CPU for the architecture to its
32 * table of PMU events.
33 */
34extern struct pmu_events_map pmu_events_map[];
35
36#endif