xref: /openbmc/linux/Documentation/ABI/testing/sysfs-bus-event_source-devices-events (revision c900529f3d9161bfde5cca0754f83b4d3c3e0220)
12ac3634aSSukadev BhattiproluWhat:		/sys/devices/cpu/events/
22ac3634aSSukadev Bhattiprolu		/sys/devices/cpu/events/branch-misses
32ac3634aSSukadev Bhattiprolu		/sys/devices/cpu/events/cache-references
42ac3634aSSukadev Bhattiprolu		/sys/devices/cpu/events/cache-misses
52ac3634aSSukadev Bhattiprolu		/sys/devices/cpu/events/stalled-cycles-frontend
62ac3634aSSukadev Bhattiprolu		/sys/devices/cpu/events/branch-instructions
72ac3634aSSukadev Bhattiprolu		/sys/devices/cpu/events/stalled-cycles-backend
82ac3634aSSukadev Bhattiprolu		/sys/devices/cpu/events/instructions
92ac3634aSSukadev Bhattiprolu		/sys/devices/cpu/events/cpu-cycles
102ac3634aSSukadev Bhattiprolu
112ac3634aSSukadev BhattiproluDate:		2013/01/08
122ac3634aSSukadev Bhattiprolu
132ac3634aSSukadev BhattiproluContact:	Linux kernel mailing list <linux-kernel@vger.kernel.org>
142ac3634aSSukadev Bhattiprolu
152ac3634aSSukadev BhattiproluDescription:	Generic performance monitoring events
162ac3634aSSukadev Bhattiprolu
172ac3634aSSukadev Bhattiprolu		A collection of performance monitoring events that may be
182ac3634aSSukadev Bhattiprolu		supported by many/most CPUs. These events can be monitored
192ac3634aSSukadev Bhattiprolu		using the 'perf(1)' tool.
202ac3634aSSukadev Bhattiprolu
212ac3634aSSukadev Bhattiprolu		The contents of each file would look like:
222ac3634aSSukadev Bhattiprolu
232ac3634aSSukadev Bhattiprolu			event=0xNNNN
242ac3634aSSukadev Bhattiprolu
252ac3634aSSukadev Bhattiprolu		where 'N' is a hex digit and the number '0xNNNN' shows the
262ac3634aSSukadev Bhattiprolu		"raw code" for the perf event identified by the file's
272ac3634aSSukadev Bhattiprolu		"basename".
282ac3634aSSukadev Bhattiprolu
292ac3634aSSukadev Bhattiprolu
30ed90a446SCody P SchaferWhat: /sys/bus/event_source/devices/<pmu>/events/<event>
31ed90a446SCody P SchaferDate: 2014/02/24
32ed90a446SCody P SchaferContact:	Linux kernel mailing list <linux-kernel@vger.kernel.org>
33ed90a446SCody P SchaferDescription:	Per-pmu performance monitoring events specific to the running system
34ed90a446SCody P Schafer
35ed90a446SCody P Schafer		Each file (except for some of those with a '.' in them, '.unit'
36ed90a446SCody P Schafer		and '.scale') in the 'events' directory describes a single
37ed90a446SCody P Schafer		performance monitoring event supported by the <pmu>. The name
38ed90a446SCody P Schafer		of the file is the name of the event.
39ed90a446SCody P Schafer
40ed90a446SCody P Schafer		File contents:
41ed90a446SCody P Schafer
42ed90a446SCody P Schafer			<term>[=<value>][,<term>[=<value>]]...
43ed90a446SCody P Schafer
44ed90a446SCody P Schafer		Where <term> is one of the terms listed under
45ed90a446SCody P Schafer		/sys/bus/event_source/devices/<pmu>/format/ and <value> is
46ed90a446SCody P Schafer		a number is base-16 format with a '0x' prefix (lowercase only).
47ed90a446SCody P Schafer		If a <term> is specified alone (without an assigned value), it
48ed90a446SCody P Schafer		is implied that 0x1 is assigned to that <term>.
49ed90a446SCody P Schafer
50*ebab9426SBjorn Helgaas		Examples (each of these lines would be in a separate file):
51ed90a446SCody P Schafer
52ed90a446SCody P Schafer			event=0x2abc
53ed90a446SCody P Schafer			event=0x423,inv,cmask=0x3
54ed90a446SCody P Schafer			domain=0x1,offset=0x8,starting_index=0xffff
5598a43e0eSCody P Schafer			domain=0x1,offset=0x8,core=?
56ed90a446SCody P Schafer
57ed90a446SCody P Schafer		Each of the assignments indicates a value to be assigned to a
58ed90a446SCody P Schafer		particular set of bits (as defined by the format file
59ed90a446SCody P Schafer		corresponding to the <term>) in the perf_event structure passed
60ed90a446SCody P Schafer		to the perf_open syscall.
61ed90a446SCody P Schafer
6298a43e0eSCody P Schafer		In the case of the last example, a value replacing "?" would
6398a43e0eSCody P Schafer		need to be provided by the user selecting the particular event.
6498a43e0eSCody P Schafer		This is referred to as "event parameterization". Event
6598a43e0eSCody P Schafer		parameters have the format 'param=?'.
6698a43e0eSCody P Schafer
67ed90a446SCody P SchaferWhat: /sys/bus/event_source/devices/<pmu>/events/<event>.unit
68ed90a446SCody P SchaferDate: 2014/02/24
69ed90a446SCody P SchaferContact:	Linux kernel mailing list <linux-kernel@vger.kernel.org>
70ed90a446SCody P SchaferDescription:	Perf event units
71ed90a446SCody P Schafer
72ed90a446SCody P Schafer		A string specifying the English plural numerical unit that <event>
73ed90a446SCody P Schafer		(once multiplied by <event>.scale) represents.
74ed90a446SCody P Schafer
75ed90a446SCody P Schafer		Example:
76ed90a446SCody P Schafer
77ed90a446SCody P Schafer			Joules
78ed90a446SCody P Schafer
79ed90a446SCody P SchaferWhat: /sys/bus/event_source/devices/<pmu>/events/<event>.scale
80ed90a446SCody P SchaferDate: 2014/02/24
81ed90a446SCody P SchaferContact:	Linux kernel mailing list <linux-kernel@vger.kernel.org>
82ed90a446SCody P SchaferDescription:	Perf event scaling factors
83ed90a446SCody P Schafer
84ed90a446SCody P Schafer		A string representing a floating point value expressed in
85ed90a446SCody P Schafer		scientific notation to be multiplied by the event count
86*ebab9426SBjorn Helgaas		received from the kernel to match the unit specified in the
87ed90a446SCody P Schafer		<event>.unit file.
88ed90a446SCody P Schafer
89ed90a446SCody P Schafer		Example:
90ed90a446SCody P Schafer
91ed90a446SCody P Schafer			2.3283064365386962890625e-10
92ed90a446SCody P Schafer
93ed90a446SCody P Schafer		This is provided to avoid performing floating point arithmetic
94ed90a446SCody P Schafer		in the kernel.
95