Skip to content

Commit 9957d8c

Browse files
captain5050namhyung
authored andcommitted
perf jevents: Add common software event json
Add json for software events so that in perf list the events can have a description. Common json exists for the tool PMU but it has no sysfs equivalent. Modify the map_for_pmu code to return the common map (rather than an architecture specific one) when a PMU with a common name is being looked for, this allows the events to be found. Signed-off-by: Ian Rogers <[email protected]> Tested-by: Arnaldo Carvalho de Melo <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Namhyung Kim <[email protected]>
1 parent af470fb commit 9957d8c

File tree

3 files changed

+264
-109
lines changed

3 files changed

+264
-109
lines changed
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
[
2+
{
3+
"Unit": "software",
4+
"EventName": "cpu-clock",
5+
"BriefDescription": "Per-CPU high-resolution timer based event",
6+
"ConfigCode": "0"
7+
},
8+
{
9+
"Unit": "software",
10+
"EventName": "task-clock",
11+
"BriefDescription": "Per-task high-resolution timer based event",
12+
"ConfigCode": "1"
13+
},
14+
{
15+
"Unit": "software",
16+
"EventName": "faults",
17+
"BriefDescription": "Number of page faults [This event is an alias of page-faults]",
18+
"ConfigCode": "2"
19+
},
20+
{
21+
"Unit": "software",
22+
"EventName": "page-faults",
23+
"BriefDescription": "Number of page faults [This event is an alias of faults]",
24+
"ConfigCode": "2"
25+
},
26+
{
27+
"Unit": "software",
28+
"EventName": "context-switches",
29+
"BriefDescription": "Number of context switches [This event is an alias of cs]",
30+
"ConfigCode": "3"
31+
},
32+
{
33+
"Unit": "software",
34+
"EventName": "cs",
35+
"BriefDescription": "Number of context switches [This event is an alias of context-switches]",
36+
"ConfigCode": "3"
37+
},
38+
{
39+
"Unit": "software",
40+
"EventName": "cpu-migrations",
41+
"BriefDescription": "Number of times a process has migrated to a new CPU [This event is an alias of migrations]",
42+
"ConfigCode": "4"
43+
},
44+
{
45+
"Unit": "software",
46+
"EventName": "migrations",
47+
"BriefDescription": "Number of times a process has migrated to a new CPU [This event is an alias of cpu-migrations]",
48+
"ConfigCode": "4"
49+
},
50+
{
51+
"Unit": "software",
52+
"EventName": "minor-faults",
53+
"BriefDescription": "Number of minor page faults. Minor faults don't require I/O to handle",
54+
"ConfigCode": "5"
55+
},
56+
{
57+
"Unit": "software",
58+
"EventName": "major-faults",
59+
"BriefDescription": "Number of major page faults. Major faults require I/O to handle",
60+
"ConfigCode": "6"
61+
},
62+
{
63+
"Unit": "software",
64+
"EventName": "alignment-faults",
65+
"BriefDescription": "Number of kernel handled memory alignment faults",
66+
"ConfigCode": "7"
67+
},
68+
{
69+
"Unit": "software",
70+
"EventName": "emulation-faults",
71+
"BriefDescription": "Number of kernel handled unimplemented instruction faults handled through emulation",
72+
"ConfigCode": "8"
73+
},
74+
{
75+
"Unit": "software",
76+
"EventName": "dummy",
77+
"BriefDescription": "A placeholder event that doesn't count anything",
78+
"ConfigCode": "9"
79+
},
80+
{
81+
"Unit": "software",
82+
"EventName": "bpf-output",
83+
"BriefDescription": "An event used by BPF programs to write to the perf ring buffer",
84+
"ConfigCode": "10"
85+
},
86+
{
87+
"Unit": "software",
88+
"EventName": "cgroup-switches",
89+
"BriefDescription": "Number of context switches to a task in a different cgroup",
90+
"ConfigCode": "11"
91+
}
92+
]

0 commit comments

Comments
 (0)