blob: eb03f063f0a2a0b71a7de5b84e25e26dfe2ff581 [file] [log] [blame]
Thomas Gleixner386b05e2009-06-06 14:56:33 +02001perf-list(1)
Ingo Molnar6e6b7542008-04-15 22:39:31 +02002============
Thomas Gleixner386b05e2009-06-06 14:56:33 +02003
4NAME
5----
6perf-list - List all symbolic event types
7
8SYNOPSIS
9--------
10[verse]
Andi Kleendc098b32013-04-20 11:02:29 -070011'perf list' [hw|sw|cache|tracepoint|pmu|event_glob]
Thomas Gleixner386b05e2009-06-06 14:56:33 +020012
13DESCRIPTION
14-----------
15This command displays the symbolic event types which can be selected in the
16various perf commands with the -e option.
17
Robert Richter75bc5ca2012-08-07 19:43:15 +020018[[EVENT_MODIFIERS]]
Sonny Raoffec5162010-10-14 20:51:00 -050019EVENT MODIFIERS
20---------------
21
22Events can optionally have a modifer by appending a colon and one or
Robert Richter2055fda2012-08-07 19:43:16 +020023more modifiers. Modifiers allow the user to restrict the events to be
24counted. The following modifiers exist:
25
26 u - user-space counting
27 k - kernel counting
28 h - hypervisor counting
29 G - guest counting (in KVM guests)
30 H - host counting (not in KVM guests)
31 p - precise level
Jiri Olsa3c176312012-10-10 17:39:03 +020032 S - read sample value (PERF_SAMPLE_READ)
Sonny Raoffec5162010-10-14 20:51:00 -050033
34The 'p' modifier can be used for specifying how precise the instruction
Robert Richter2055fda2012-08-07 19:43:16 +020035address should be. The 'p' modifier can be specified multiple times:
Sonny Raoffec5162010-10-14 20:51:00 -050036
Robert Richter2055fda2012-08-07 19:43:16 +020037 0 - SAMPLE_IP can have arbitrary skid
38 1 - SAMPLE_IP must have constant skid
39 2 - SAMPLE_IP requested to have 0 skid
40 3 - SAMPLE_IP must have 0 skid
41
42For Intel systems precise event sampling is implemented with PEBS
43which supports up to precise-level 2.
44
45On AMD systems it is implemented using IBS (up to precise-level 2).
46The precise modifier works with event types 0x76 (cpu-cycles, CPU
47clocks not halted) and 0xC1 (micro-ops retired). Both events map to
48IBS execution sampling (IBS op) with the IBS Op Counter Control bit
49(IbsOpCntCtl) set respectively (see AMD64 Architecture Programmer’s
50Manual Volume 2: System Programming, 13.3 Instruction-Based
51Sampling). Examples to use IBS:
52
53 perf record -a -e cpu-cycles:p ... # use ibs op counting cycles
54 perf record -a -e r076:p ... # same as -e cpu-cycles:p
55 perf record -a -e r0C1:p ... # use ibs op counting micro-ops
Sonny Raoffec5162010-10-14 20:51:00 -050056
Arnaldo Carvalho de Melo9e32a3c2010-05-05 11:20:05 -030057RAW HARDWARE EVENT DESCRIPTOR
58-----------------------------
59Even when an event is not available in a symbolic form within perf right now,
Arnaldo Carvalho de Melo1cf4a062010-05-07 14:07:05 -030060it can be encoded in a per processor specific way.
61
62For instance For x86 CPUs NNN represents the raw register encoding with the
63layout of IA32_PERFEVTSELx MSRs (see [Intel® 64 and IA-32 Architectures Software Developer's Manual Volume 3B: System Programming Guide] Figure 30-1 Layout
64of IA32_PERFEVTSELx MSRs) or AMD's PerfEvtSeln (see [AMD64 Architecture Programmer’s Manual Volume 2: System Programming], Page 344,
65Figure 13-7 Performance Event-Select Register (PerfEvtSeln)).
66
Robert Richter75bc5ca2012-08-07 19:43:15 +020067Note: Only the following bit fields can be set in x86 counter
68registers: event, umask, edge, inv, cmask. Esp. guest/host only and
69OS/user mode flags must be setup using <<EVENT_MODIFIERS, EVENT
70MODIFIERS>>.
71
Arnaldo Carvalho de Melo1cf4a062010-05-07 14:07:05 -030072Example:
73
74If the Intel docs for a QM720 Core i7 describe an event as:
Arnaldo Carvalho de Melo9e32a3c2010-05-05 11:20:05 -030075
76 Event Umask Event Mask
77 Num. Value Mnemonic Description Comment
78
79 A8H 01H LSD.UOPS Counts the number of micro-ops Use cmask=1 and
80 delivered by loop stream detector invert to count
81 cycles
82
83raw encoding of 0x1A8 can be used:
84
85 perf stat -e r1a8 -a sleep 1
86 perf record -e r1a8 ...
87
Arnaldo Carvalho de Melo1cf4a062010-05-07 14:07:05 -030088You should refer to the processor specific documentation for getting these
89details. Some of them are referenced in the SEE ALSO section below.
90
Thomas Gleixner386b05e2009-06-06 14:56:33 +020091OPTIONS
92-------
Arnaldo Carvalho de Melo668b8782011-02-17 15:38:58 -020093
94Without options all known events will be listed.
95
96To limit the list use:
97
98. 'hw' or 'hardware' to list hardware events such as cache-misses, etc.
99
100. 'sw' or 'software' to list software events such as context switches, etc.
101
102. 'cache' or 'hwcache' to list hardware cache events such as L1-dcache-loads, etc.
103
104. 'tracepoint' to list all tracepoint events, alternatively use
105 'subsys_glob:event_glob' to filter by tracepoint subsystems such as sched,
106 block, etc.
107
Andi Kleendc098b32013-04-20 11:02:29 -0700108. 'pmu' to print the kernel supplied PMU events.
109
Arnaldo Carvalho de Melo668b8782011-02-17 15:38:58 -0200110. If none of the above is matched, it will apply the supplied glob to all
111 events, printing the ones that match.
112
113One or more types can be used at the same time, listing the events for the
114types specified.
Thomas Gleixner386b05e2009-06-06 14:56:33 +0200115
116SEE ALSO
117--------
118linkperf:perf-stat[1], linkperf:perf-top[1],
Arnaldo Carvalho de Melo1cf4a062010-05-07 14:07:05 -0300119linkperf:perf-record[1],
120http://www.intel.com/Assets/PDF/manual/253669.pdf[Intel® 64 and IA-32 Architectures Software Developer's Manual Volume 3B: System Programming Guide],
Robert Richter2055fda2012-08-07 19:43:16 +0200121http://support.amd.com/us/Processor_TechDocs/24593_APM_v2.pdf[AMD64 Architecture Programmer’s Manual Volume 2: System Programming]