-
Notifications
You must be signed in to change notification settings - Fork 0
/
first-steps.tex
67 lines (54 loc) · 3.04 KB
/
first-steps.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
\chapter{First Steps}
\section{Perf List}
To get a first overview which events are known to perf use the perf
command {\tt list}. There are several groups of events that are known to
perf, namely: Hardware, Software, \PMU\, raw hardware,
tracepoints and \infull{SDT} (\SDT\) events.
\starttyping
# perf list
List of pre-defined events (to be used in -e):
cpu-cycles OR cycles [Hardware event]
instructions [Hardware event]
alignment-faults [Software event]
bpf-output [Software event]
context-switches OR cs [Software event]
cpu-clock [Software event]
cpu-migrations OR migrations [Software event]
dummy [Software event]
emulation-faults [Software event]
major-faults [Software event]
minor-faults [Software event]
page-faults OR faults [Software event]
task-clock [Software event]
\stoptyping
To narrow the output just append the specific group identifier to
{\tt list}. Lets see which events from the PMU are known to perf.
\starttyping
# perf list pmu
List of pre-defined events (to be used in -e):
cpum_cf/AES_BLOCKED_CYCLES/ [Kernel PMU event]
cpum_cf/AES_BLOCKED_FUNCTIONS/ [Kernel PMU event]
cpum_cf/AES_CYCLES/ [Kernel PMU event]
cpum_cf/AES_FUNCTIONS/ [Kernel PMU event]
cpum_cf/CPU_CYCLES/ [Kernel PMU event]
cpum_cf/DEA_BLOCKED_CYCLES/ [Kernel PMU event]
cpum_cf/DEA_BLOCKED_FUNCTIONS/ [Kernel PMU event]
cpum_cf/DEA_CYCLES/ [Kernel PMU event]
cpum_cf/DEA_FUNCTIONS/ [Kernel PMU event]
cpum_cf/DTLB1_GPAGE_WRITES/ [Kernel PMU event]
\stoptyping
Simple regex can be also used to narrow the output for specific
functions, here e.g. show only the syscalls events known to {\em perf}.
\starttyping
# perf list 'syscalls:*'
List of pre-defined events (to be used in -e):
syscalls:sys_enter_access [Tracepoint event]
syscalls:sys_enter_acct [Tracepoint event]
syscalls:sys_enter_add_key [Tracepoint event]
syscalls:sys_enter_adjtimex [Tracepoint event]
syscalls:sys_enter_alarm [Tracepoint event]
syscalls:sys_enter_bdflush [Tracepoint event]
syscalls:sys_enter_bind [Tracepoint event]
syscalls:sys_enter_bpf [Tracepoint event]
syscalls:sys_enter_brk [Tracepoint event]
\stoptyping