162306a36Sopenharmony_ciWhat: /sys/devices/cpu/events/ 262306a36Sopenharmony_ci /sys/devices/cpu/events/branch-misses 362306a36Sopenharmony_ci /sys/devices/cpu/events/cache-references 462306a36Sopenharmony_ci /sys/devices/cpu/events/cache-misses 562306a36Sopenharmony_ci /sys/devices/cpu/events/stalled-cycles-frontend 662306a36Sopenharmony_ci /sys/devices/cpu/events/branch-instructions 762306a36Sopenharmony_ci /sys/devices/cpu/events/stalled-cycles-backend 862306a36Sopenharmony_ci /sys/devices/cpu/events/instructions 962306a36Sopenharmony_ci /sys/devices/cpu/events/cpu-cycles 1062306a36Sopenharmony_ci 1162306a36Sopenharmony_ciDate: 2013/01/08 1262306a36Sopenharmony_ci 1362306a36Sopenharmony_ciContact: Linux kernel mailing list <linux-kernel@vger.kernel.org> 1462306a36Sopenharmony_ci 1562306a36Sopenharmony_ciDescription: Generic performance monitoring events 1662306a36Sopenharmony_ci 1762306a36Sopenharmony_ci A collection of performance monitoring events that may be 1862306a36Sopenharmony_ci supported by many/most CPUs. These events can be monitored 1962306a36Sopenharmony_ci using the 'perf(1)' tool. 2062306a36Sopenharmony_ci 2162306a36Sopenharmony_ci The contents of each file would look like: 2262306a36Sopenharmony_ci 2362306a36Sopenharmony_ci event=0xNNNN 2462306a36Sopenharmony_ci 2562306a36Sopenharmony_ci where 'N' is a hex digit and the number '0xNNNN' shows the 2662306a36Sopenharmony_ci "raw code" for the perf event identified by the file's 2762306a36Sopenharmony_ci "basename". 2862306a36Sopenharmony_ci 2962306a36Sopenharmony_ci 3062306a36Sopenharmony_ciWhat: /sys/bus/event_source/devices/<pmu>/events/<event> 3162306a36Sopenharmony_ciDate: 2014/02/24 3262306a36Sopenharmony_ciContact: Linux kernel mailing list <linux-kernel@vger.kernel.org> 3362306a36Sopenharmony_ciDescription: Per-pmu performance monitoring events specific to the running system 3462306a36Sopenharmony_ci 3562306a36Sopenharmony_ci Each file (except for some of those with a '.' in them, '.unit' 3662306a36Sopenharmony_ci and '.scale') in the 'events' directory describes a single 3762306a36Sopenharmony_ci performance monitoring event supported by the <pmu>. The name 3862306a36Sopenharmony_ci of the file is the name of the event. 3962306a36Sopenharmony_ci 4062306a36Sopenharmony_ci File contents: 4162306a36Sopenharmony_ci 4262306a36Sopenharmony_ci <term>[=<value>][,<term>[=<value>]]... 4362306a36Sopenharmony_ci 4462306a36Sopenharmony_ci Where <term> is one of the terms listed under 4562306a36Sopenharmony_ci /sys/bus/event_source/devices/<pmu>/format/ and <value> is 4662306a36Sopenharmony_ci a number is base-16 format with a '0x' prefix (lowercase only). 4762306a36Sopenharmony_ci If a <term> is specified alone (without an assigned value), it 4862306a36Sopenharmony_ci is implied that 0x1 is assigned to that <term>. 4962306a36Sopenharmony_ci 5062306a36Sopenharmony_ci Examples (each of these lines would be in a separate file): 5162306a36Sopenharmony_ci 5262306a36Sopenharmony_ci event=0x2abc 5362306a36Sopenharmony_ci event=0x423,inv,cmask=0x3 5462306a36Sopenharmony_ci domain=0x1,offset=0x8,starting_index=0xffff 5562306a36Sopenharmony_ci domain=0x1,offset=0x8,core=? 5662306a36Sopenharmony_ci 5762306a36Sopenharmony_ci Each of the assignments indicates a value to be assigned to a 5862306a36Sopenharmony_ci particular set of bits (as defined by the format file 5962306a36Sopenharmony_ci corresponding to the <term>) in the perf_event structure passed 6062306a36Sopenharmony_ci to the perf_open syscall. 6162306a36Sopenharmony_ci 6262306a36Sopenharmony_ci In the case of the last example, a value replacing "?" would 6362306a36Sopenharmony_ci need to be provided by the user selecting the particular event. 6462306a36Sopenharmony_ci This is referred to as "event parameterization". Event 6562306a36Sopenharmony_ci parameters have the format 'param=?'. 6662306a36Sopenharmony_ci 6762306a36Sopenharmony_ciWhat: /sys/bus/event_source/devices/<pmu>/events/<event>.unit 6862306a36Sopenharmony_ciDate: 2014/02/24 6962306a36Sopenharmony_ciContact: Linux kernel mailing list <linux-kernel@vger.kernel.org> 7062306a36Sopenharmony_ciDescription: Perf event units 7162306a36Sopenharmony_ci 7262306a36Sopenharmony_ci A string specifying the English plural numerical unit that <event> 7362306a36Sopenharmony_ci (once multiplied by <event>.scale) represents. 7462306a36Sopenharmony_ci 7562306a36Sopenharmony_ci Example: 7662306a36Sopenharmony_ci 7762306a36Sopenharmony_ci Joules 7862306a36Sopenharmony_ci 7962306a36Sopenharmony_ciWhat: /sys/bus/event_source/devices/<pmu>/events/<event>.scale 8062306a36Sopenharmony_ciDate: 2014/02/24 8162306a36Sopenharmony_ciContact: Linux kernel mailing list <linux-kernel@vger.kernel.org> 8262306a36Sopenharmony_ciDescription: Perf event scaling factors 8362306a36Sopenharmony_ci 8462306a36Sopenharmony_ci A string representing a floating point value expressed in 8562306a36Sopenharmony_ci scientific notation to be multiplied by the event count 8662306a36Sopenharmony_ci received from the kernel to match the unit specified in the 8762306a36Sopenharmony_ci <event>.unit file. 8862306a36Sopenharmony_ci 8962306a36Sopenharmony_ci Example: 9062306a36Sopenharmony_ci 9162306a36Sopenharmony_ci 2.3283064365386962890625e-10 9262306a36Sopenharmony_ci 9362306a36Sopenharmony_ci This is provided to avoid performing floating point arithmetic 9462306a36Sopenharmony_ci in the kernel. 95