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