]> asedeno.scripts.mit.edu Git - linux.git/blob - tools/perf/pmu-events/pmu-events.h
Merge branch 'asoc-5.5' into asoc-linus
[linux.git] / tools / perf / pmu-events / pmu-events.h
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef PMU_EVENTS_H
3 #define PMU_EVENTS_H
4
5 /*
6  * Describe each PMU event. Each CPU has a table of PMU events.
7  */
8 struct pmu_event {
9         const char *name;
10         const char *event;
11         const char *desc;
12         const char *topic;
13         const char *long_desc;
14         const char *pmu;
15         const char *unit;
16         const char *perpkg;
17         const char *metric_expr;
18         const char *metric_name;
19         const char *metric_group;
20         const char *deprecated;
21 };
22
23 /*
24  *
25  * Map a CPU to its table of PMU events. The CPU is identified by the
26  * cpuid field, which is an arch-specific identifier for the CPU.
27  * The identifier specified in tools/perf/pmu-events/arch/xxx/mapfile
28  * must match the get_cpustr() in tools/perf/arch/xxx/util/header.c)
29  *
30  * The  cpuid can contain any character other than the comma.
31  */
32 struct pmu_events_map {
33         const char *cpuid;
34         const char *version;
35         const char *type;               /* core, uncore etc */
36         struct pmu_event *table;
37 };
38
39 /*
40  * Global table mapping each known CPU for the architecture to its
41  * table of PMU events.
42  */
43 extern struct pmu_events_map pmu_events_map[];
44
45 #endif