You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tools/power turbostat: Allow using cpu device in perf counters on hybrid platforms
Intel hybrid platforms expose different perf devices for P and E cores.
Instead of one, "/sys/bus/event_source/devices/cpu" device, there are
"/sys/bus/event_source/devices/{cpu_core,cpu_atom}".
This, however makes it more complicated for the user,
because most of the counters are available on both and had to be
handled manually.
This patch allows users to use "virtual" cpu device that is seemingly
translated to cpu_core and cpu_atom perf devices, depending on the type
of a CPU we are opening the counter for.
Signed-off-by: Patryk Wlazlyn <[email protected]>
Signed-off-by: Len Brown <[email protected]>
Copy file name to clipboardExpand all lines: tools/power/x86/turbostat/turbostat.8
+25Lines changed: 25 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -33,6 +33,9 @@ name as necessary to disambiguate it from others is necessary. Note that option
33
33
msr0xXXX is a hex offset, eg. msr0x10
34
34
/sys/path... is an absolute path to a sysfs attribute
35
35
<device> is a perf device from /sys/bus/event_source/devices/<device> eg. cstate_core
36
+
On Intel hybrid platforms, instead of one "cpu" perf device there are two, "cpu_core" and "cpu_atom" devices for P and E cores respectively.
37
+
Turbostat, in this case, allow user to use "cpu" device and will automatically detect the type of a CPU and translate it to "cpu_core" and "cpu_atom" accordingly.
38
+
For a complete example see "ADD PERF COUNTER EXAMPLE #2 (using virtual "cpu" device)".
36
39
<event> is a perf event for given device from /sys/bus/event_source/devices/<device>/events/<event> eg. c1-residency
37
40
perf/cstate_core/c1-residency would then use /sys/bus/event_source/devices/cstate_core/events/c1-residency
38
41
@@ -387,6 +390,28 @@ CPU pCPU%c1 CPU%c1
387
390
388
391
.fi
389
392
393
+
.SH ADD PERF COUNTER EXAMPLE #2 (using virtual cpu device)
394
+
Here we run on hybrid, Raptor Lake platform.
395
+
We limit turbostat to show output for just cpu0 (pcore) and cpu12 (ecore).
396
+
We add a counter showing number of L3 cache misses, using virtual "cpu" device,
397
+
labeling it with the column header, "VCMISS".
398
+
We add a counter showing number of L3 cache misses, using virtual "cpu_core" device,
399
+
labeling it with the column header, "PCMISS". This will fail on ecore cpu12.
400
+
We add a counter showing number of L3 cache misses, using virtual "cpu_atom" device,
401
+
labeling it with the column header, "ECMISS". This will fail on pcore cpu0.
402
+
We display it only once, after the conclusion of 0.1 second sleep.
0 commit comments