Sukadev Bhattiprolu | 2ac3634 | 2013-01-22 22:26:45 -0800 | [diff] [blame] | 1 | What: /sys/devices/cpu/events/ |
| 2 | /sys/devices/cpu/events/branch-misses |
| 3 | /sys/devices/cpu/events/cache-references |
| 4 | /sys/devices/cpu/events/cache-misses |
| 5 | /sys/devices/cpu/events/stalled-cycles-frontend |
| 6 | /sys/devices/cpu/events/branch-instructions |
| 7 | /sys/devices/cpu/events/stalled-cycles-backend |
| 8 | /sys/devices/cpu/events/instructions |
| 9 | /sys/devices/cpu/events/cpu-cycles |
| 10 | |
| 11 | Date: 2013/01/08 |
| 12 | |
| 13 | Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org> |
| 14 | |
| 15 | Description: Generic performance monitoring events |
| 16 | |
| 17 | A collection of performance monitoring events that may be |
| 18 | supported by many/most CPUs. These events can be monitored |
| 19 | using the 'perf(1)' tool. |
| 20 | |
| 21 | The contents of each file would look like: |
| 22 | |
| 23 | event=0xNNNN |
| 24 | |
| 25 | where 'N' is a hex digit and the number '0xNNNN' shows the |
| 26 | "raw code" for the perf event identified by the file's |
| 27 | "basename". |
| 28 | |
| 29 | |
Cody P Schafer | ed90a44 | 2014-09-30 23:03:19 -0700 | [diff] [blame] | 30 | What: /sys/bus/event_source/devices/<pmu>/events/<event> |
| 31 | Date: 2014/02/24 |
| 32 | Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org> |
| 33 | Description: Per-pmu performance monitoring events specific to the running system |
| 34 | |
| 35 | Each file (except for some of those with a '.' in them, '.unit' |
| 36 | and '.scale') in the 'events' directory describes a single |
| 37 | performance monitoring event supported by the <pmu>. The name |
| 38 | of the file is the name of the event. |
| 39 | |
| 40 | File contents: |
| 41 | |
| 42 | <term>[=<value>][,<term>[=<value>]]... |
| 43 | |
| 44 | Where <term> is one of the terms listed under |
| 45 | /sys/bus/event_source/devices/<pmu>/format/ and <value> is |
| 46 | a number is base-16 format with a '0x' prefix (lowercase only). |
| 47 | If a <term> is specified alone (without an assigned value), it |
| 48 | is implied that 0x1 is assigned to that <term>. |
| 49 | |
| 50 | Examples (each of these lines would be in a seperate file): |
| 51 | |
| 52 | event=0x2abc |
| 53 | event=0x423,inv,cmask=0x3 |
| 54 | domain=0x1,offset=0x8,starting_index=0xffff |
Cody P Schafer | 98a43e0 | 2015-01-07 17:13:52 -0800 | [diff] [blame] | 55 | domain=0x1,offset=0x8,core=? |
Cody P Schafer | ed90a44 | 2014-09-30 23:03:19 -0700 | [diff] [blame] | 56 | |
| 57 | Each of the assignments indicates a value to be assigned to a |
| 58 | particular set of bits (as defined by the format file |
| 59 | corresponding to the <term>) in the perf_event structure passed |
| 60 | to the perf_open syscall. |
| 61 | |
Cody P Schafer | 98a43e0 | 2015-01-07 17:13:52 -0800 | [diff] [blame] | 62 | In the case of the last example, a value replacing "?" would |
| 63 | need to be provided by the user selecting the particular event. |
| 64 | This is referred to as "event parameterization". Event |
| 65 | parameters have the format 'param=?'. |
| 66 | |
Cody P Schafer | ed90a44 | 2014-09-30 23:03:19 -0700 | [diff] [blame] | 67 | What: /sys/bus/event_source/devices/<pmu>/events/<event>.unit |
| 68 | Date: 2014/02/24 |
| 69 | Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org> |
| 70 | Description: Perf event units |
| 71 | |
| 72 | A string specifying the English plural numerical unit that <event> |
| 73 | (once multiplied by <event>.scale) represents. |
| 74 | |
| 75 | Example: |
| 76 | |
| 77 | Joules |
| 78 | |
| 79 | What: /sys/bus/event_source/devices/<pmu>/events/<event>.scale |
| 80 | Date: 2014/02/24 |
| 81 | Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org> |
| 82 | Description: Perf event scaling factors |
| 83 | |
| 84 | A string representing a floating point value expressed in |
| 85 | scientific notation to be multiplied by the event count |
| 86 | recieved from the kernel to match the unit specified in the |
| 87 | <event>.unit file. |
| 88 | |
| 89 | Example: |
| 90 | |
| 91 | 2.3283064365386962890625e-10 |
| 92 | |
| 93 | This is provided to avoid performing floating point arithmetic |
| 94 | in the kernel. |