blob: 569eab3688dd084236e6261d7511a31a40dc7117 [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;
Sukadev Bhattiprolu794ba542016-09-15 15:24:47 -070012 const char *long_desc;
Andi Kleenfedb2b52017-01-27 18:03:37 -080013 const char *pmu;
14 const char *unit;
15 const char *perpkg;
Andi Kleen00636c32017-03-20 13:17:07 -070016 const char *metric_expr;
Andi Kleen96284812017-03-20 13:17:10 -070017 const char *metric_name;
Andi Kleen80eeb672016-09-19 17:39:33 -030018};
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 */
29struct 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 */
40extern struct pmu_events_map pmu_events_map[];
41
42#endif