Thomas Gleixner | 386b05e | 2009-06-06 14:56:33 +0200 | [diff] [blame] | 1 | perf-list(1) |
Ingo Molnar | 6e6b754 | 2008-04-15 22:39:31 +0200 | [diff] [blame] | 2 | ============ |
Thomas Gleixner | 386b05e | 2009-06-06 14:56:33 +0200 | [diff] [blame] | 3 | |
| 4 | NAME |
| 5 | ---- |
| 6 | perf-list - List all symbolic event types |
| 7 | |
| 8 | SYNOPSIS |
| 9 | -------- |
| 10 | [verse] |
Andi Kleen | dc098b3 | 2013-04-20 11:02:29 -0700 | [diff] [blame] | 11 | 'perf list' [hw|sw|cache|tracepoint|pmu|event_glob] |
Thomas Gleixner | 386b05e | 2009-06-06 14:56:33 +0200 | [diff] [blame] | 12 | |
| 13 | DESCRIPTION |
| 14 | ----------- |
| 15 | This command displays the symbolic event types which can be selected in the |
| 16 | various perf commands with the -e option. |
| 17 | |
Robert Richter | 75bc5ca | 2012-08-07 19:43:15 +0200 | [diff] [blame] | 18 | [[EVENT_MODIFIERS]] |
Sonny Rao | ffec516 | 2010-10-14 20:51:00 -0500 | [diff] [blame] | 19 | EVENT MODIFIERS |
| 20 | --------------- |
| 21 | |
| 22 | Events can optionally have a modifer by appending a colon and one or |
Robert Richter | 2055fda | 2012-08-07 19:43:16 +0200 | [diff] [blame] | 23 | more modifiers. Modifiers allow the user to restrict the events to be |
| 24 | counted. 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 Olsa | 3c17631 | 2012-10-10 17:39:03 +0200 | [diff] [blame^] | 32 | S - read sample value (PERF_SAMPLE_READ) |
Sonny Rao | ffec516 | 2010-10-14 20:51:00 -0500 | [diff] [blame] | 33 | |
| 34 | The 'p' modifier can be used for specifying how precise the instruction |
Robert Richter | 2055fda | 2012-08-07 19:43:16 +0200 | [diff] [blame] | 35 | address should be. The 'p' modifier can be specified multiple times: |
Sonny Rao | ffec516 | 2010-10-14 20:51:00 -0500 | [diff] [blame] | 36 | |
Robert Richter | 2055fda | 2012-08-07 19:43:16 +0200 | [diff] [blame] | 37 | 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 | |
| 42 | For Intel systems precise event sampling is implemented with PEBS |
| 43 | which supports up to precise-level 2. |
| 44 | |
| 45 | On AMD systems it is implemented using IBS (up to precise-level 2). |
| 46 | The precise modifier works with event types 0x76 (cpu-cycles, CPU |
| 47 | clocks not halted) and 0xC1 (micro-ops retired). Both events map to |
| 48 | IBS execution sampling (IBS op) with the IBS Op Counter Control bit |
| 49 | (IbsOpCntCtl) set respectively (see AMD64 Architecture Programmer’s |
| 50 | Manual Volume 2: System Programming, 13.3 Instruction-Based |
| 51 | Sampling). 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 Rao | ffec516 | 2010-10-14 20:51:00 -0500 | [diff] [blame] | 56 | |
Arnaldo Carvalho de Melo | 9e32a3c | 2010-05-05 11:20:05 -0300 | [diff] [blame] | 57 | RAW HARDWARE EVENT DESCRIPTOR |
| 58 | ----------------------------- |
| 59 | Even when an event is not available in a symbolic form within perf right now, |
Arnaldo Carvalho de Melo | 1cf4a06 | 2010-05-07 14:07:05 -0300 | [diff] [blame] | 60 | it can be encoded in a per processor specific way. |
| 61 | |
| 62 | For instance For x86 CPUs NNN represents the raw register encoding with the |
| 63 | layout of IA32_PERFEVTSELx MSRs (see [Intel® 64 and IA-32 Architectures Software Developer's Manual Volume 3B: System Programming Guide] Figure 30-1 Layout |
| 64 | of IA32_PERFEVTSELx MSRs) or AMD's PerfEvtSeln (see [AMD64 Architecture Programmer’s Manual Volume 2: System Programming], Page 344, |
| 65 | Figure 13-7 Performance Event-Select Register (PerfEvtSeln)). |
| 66 | |
Robert Richter | 75bc5ca | 2012-08-07 19:43:15 +0200 | [diff] [blame] | 67 | Note: Only the following bit fields can be set in x86 counter |
| 68 | registers: event, umask, edge, inv, cmask. Esp. guest/host only and |
| 69 | OS/user mode flags must be setup using <<EVENT_MODIFIERS, EVENT |
| 70 | MODIFIERS>>. |
| 71 | |
Arnaldo Carvalho de Melo | 1cf4a06 | 2010-05-07 14:07:05 -0300 | [diff] [blame] | 72 | Example: |
| 73 | |
| 74 | If the Intel docs for a QM720 Core i7 describe an event as: |
Arnaldo Carvalho de Melo | 9e32a3c | 2010-05-05 11:20:05 -0300 | [diff] [blame] | 75 | |
| 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 | |
| 83 | raw encoding of 0x1A8 can be used: |
| 84 | |
| 85 | perf stat -e r1a8 -a sleep 1 |
| 86 | perf record -e r1a8 ... |
| 87 | |
Arnaldo Carvalho de Melo | 1cf4a06 | 2010-05-07 14:07:05 -0300 | [diff] [blame] | 88 | You should refer to the processor specific documentation for getting these |
| 89 | details. Some of them are referenced in the SEE ALSO section below. |
| 90 | |
Thomas Gleixner | 386b05e | 2009-06-06 14:56:33 +0200 | [diff] [blame] | 91 | OPTIONS |
| 92 | ------- |
Arnaldo Carvalho de Melo | 668b878 | 2011-02-17 15:38:58 -0200 | [diff] [blame] | 93 | |
| 94 | Without options all known events will be listed. |
| 95 | |
| 96 | To 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 Kleen | dc098b3 | 2013-04-20 11:02:29 -0700 | [diff] [blame] | 108 | . 'pmu' to print the kernel supplied PMU events. |
| 109 | |
Arnaldo Carvalho de Melo | 668b878 | 2011-02-17 15:38:58 -0200 | [diff] [blame] | 110 | . If none of the above is matched, it will apply the supplied glob to all |
| 111 | events, printing the ones that match. |
| 112 | |
| 113 | One or more types can be used at the same time, listing the events for the |
| 114 | types specified. |
Thomas Gleixner | 386b05e | 2009-06-06 14:56:33 +0200 | [diff] [blame] | 115 | |
| 116 | SEE ALSO |
| 117 | -------- |
| 118 | linkperf:perf-stat[1], linkperf:perf-top[1], |
Arnaldo Carvalho de Melo | 1cf4a06 | 2010-05-07 14:07:05 -0300 | [diff] [blame] | 119 | linkperf:perf-record[1], |
| 120 | http://www.intel.com/Assets/PDF/manual/253669.pdf[Intel® 64 and IA-32 Architectures Software Developer's Manual Volume 3B: System Programming Guide], |
Robert Richter | 2055fda | 2012-08-07 19:43:16 +0200 | [diff] [blame] | 121 | http://support.amd.com/us/Processor_TechDocs/24593_APM_v2.pdf[AMD64 Architecture Programmer’s Manual Volume 2: System Programming] |