mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-01 06:33:07 +00:00
coresight: Grouping all perf tools oriented section together
This patch groups together section pertaining to the perf tools. That way everything is at the same place rather than spread out. Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
This commit is contained in:
parent
f29816b496
commit
87bf4d68a4
1 changed files with 36 additions and 36 deletions
|
@ -345,42 +345,7 @@ More information on the above and other example on how to use Coresight with
|
||||||
the perf tools can be found in the "HOWTO.md" file of the openCSD gitHub
|
the perf tools can be found in the "HOWTO.md" file of the openCSD gitHub
|
||||||
repository [3].
|
repository [3].
|
||||||
|
|
||||||
How to use the STM module
|
2.1) AutoFDO analysis using the perf tools:
|
||||||
-------------------------
|
|
||||||
|
|
||||||
Using the System Trace Macrocell module is the same as the tracers - the only
|
|
||||||
difference is that clients are driving the trace capture rather
|
|
||||||
than the program flow through the code.
|
|
||||||
|
|
||||||
As with any other CoreSight component, specifics about the STM tracer can be
|
|
||||||
found in sysfs with more information on each entry being found in [1]:
|
|
||||||
|
|
||||||
root@genericarmv8:~# ls /sys/bus/coresight/devices/20100000.stm
|
|
||||||
enable_source hwevent_select port_enable subsystem uevent
|
|
||||||
hwevent_enable mgmt port_select traceid
|
|
||||||
root@genericarmv8:~#
|
|
||||||
|
|
||||||
Like any other source a sink needs to be identified and the STM enabled before
|
|
||||||
being used:
|
|
||||||
|
|
||||||
root@genericarmv8:~# echo 1 > /sys/bus/coresight/devices/20010000.etf/enable_sink
|
|
||||||
root@genericarmv8:~# echo 1 > /sys/bus/coresight/devices/20100000.stm/enable_source
|
|
||||||
|
|
||||||
From there user space applications can request and use channels using the devfs
|
|
||||||
interface provided for that purpose by the generic STM API:
|
|
||||||
|
|
||||||
root@genericarmv8:~# ls -l /dev/20100000.stm
|
|
||||||
crw------- 1 root root 10, 61 Jan 3 18:11 /dev/20100000.stm
|
|
||||||
root@genericarmv8:~#
|
|
||||||
|
|
||||||
Details on how to use the generic STM API can be found here [2].
|
|
||||||
|
|
||||||
[1]. Documentation/ABI/testing/sysfs-bus-coresight-devices-stm
|
|
||||||
[2]. Documentation/trace/stm.txt
|
|
||||||
|
|
||||||
|
|
||||||
Using perf tools
|
|
||||||
----------------
|
|
||||||
|
|
||||||
perf can be used to record and analyze trace of programs.
|
perf can be used to record and analyze trace of programs.
|
||||||
|
|
||||||
|
@ -428,3 +393,38 @@ sort example is from the AutoFDO tutorial (https://gcc.gnu.org/wiki/AutoFDO/Tuto
|
||||||
$ taskset -c 2 ./sort_autofdo
|
$ taskset -c 2 ./sort_autofdo
|
||||||
Bubble sorting array of 30000 elements
|
Bubble sorting array of 30000 elements
|
||||||
5806 ms
|
5806 ms
|
||||||
|
|
||||||
|
|
||||||
|
How to use the STM module
|
||||||
|
-------------------------
|
||||||
|
|
||||||
|
Using the System Trace Macrocell module is the same as the tracers - the only
|
||||||
|
difference is that clients are driving the trace capture rather
|
||||||
|
than the program flow through the code.
|
||||||
|
|
||||||
|
As with any other CoreSight component, specifics about the STM tracer can be
|
||||||
|
found in sysfs with more information on each entry being found in [1]:
|
||||||
|
|
||||||
|
root@genericarmv8:~# ls /sys/bus/coresight/devices/20100000.stm
|
||||||
|
enable_source hwevent_select port_enable subsystem uevent
|
||||||
|
hwevent_enable mgmt port_select traceid
|
||||||
|
root@genericarmv8:~#
|
||||||
|
|
||||||
|
Like any other source a sink needs to be identified and the STM enabled before
|
||||||
|
being used:
|
||||||
|
|
||||||
|
root@genericarmv8:~# echo 1 > /sys/bus/coresight/devices/20010000.etf/enable_sink
|
||||||
|
root@genericarmv8:~# echo 1 > /sys/bus/coresight/devices/20100000.stm/enable_source
|
||||||
|
|
||||||
|
From there user space applications can request and use channels using the devfs
|
||||||
|
interface provided for that purpose by the generic STM API:
|
||||||
|
|
||||||
|
root@genericarmv8:~# ls -l /dev/20100000.stm
|
||||||
|
crw------- 1 root root 10, 61 Jan 3 18:11 /dev/20100000.stm
|
||||||
|
root@genericarmv8:~#
|
||||||
|
|
||||||
|
Details on how to use the generic STM API can be found here [2].
|
||||||
|
|
||||||
|
[1]. Documentation/ABI/testing/sysfs-bus-coresight-devices-stm
|
||||||
|
[2]. Documentation/trace/stm.txt
|
||||||
|
[3]. https://github.com/Linaro/perf-opencsd
|
||||||
|
|
Loading…
Reference in a new issue