diff options
| author | Mathieu Poirier <mathieu.poirier@linaro.org> | 2018-04-17 12:08:07 -0400 |
|---|---|---|
| committer | Jonathan Corbet <corbet@lwn.net> | 2018-04-27 19:00:28 -0400 |
| commit | 87bf4d68a4f2db9fa1664d888ebe4567ca487ea0 (patch) | |
| tree | a51e9a84fa9d1b0fea5e34ac4080ae61911bd12d /Documentation/trace | |
| parent | f29816b496f1024ec491203e9f3f6c6c924faf39 (diff) | |
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>
Diffstat (limited to 'Documentation/trace')
| -rw-r--r-- | Documentation/trace/coresight.txt | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/Documentation/trace/coresight.txt b/Documentation/trace/coresight.txt index ab0d0f2d5cec..1d74ad0202b6 100644 --- a/Documentation/trace/coresight.txt +++ b/Documentation/trace/coresight.txt | |||
| @@ -345,42 +345,7 @@ More information on the above and other example on how to use Coresight with | |||
| 345 | the perf tools can be found in the "HOWTO.md" file of the openCSD gitHub | 345 | the perf tools can be found in the "HOWTO.md" file of the openCSD gitHub |
| 346 | repository [3]. | 346 | repository [3]. |
| 347 | 347 | ||
| 348 | How to use the STM module | 348 | 2.1) AutoFDO analysis using the perf tools: |
| 349 | ------------------------- | ||
| 350 | |||
| 351 | Using the System Trace Macrocell module is the same as the tracers - the only | ||
| 352 | difference is that clients are driving the trace capture rather | ||
| 353 | than the program flow through the code. | ||
| 354 | |||
| 355 | As with any other CoreSight component, specifics about the STM tracer can be | ||
| 356 | found in sysfs with more information on each entry being found in [1]: | ||
| 357 | |||
| 358 | root@genericarmv8:~# ls /sys/bus/coresight/devices/20100000.stm | ||
| 359 | enable_source hwevent_select port_enable subsystem uevent | ||
| 360 | hwevent_enable mgmt port_select traceid | ||
| 361 | root@genericarmv8:~# | ||
| 362 | |||
| 363 | Like any other source a sink needs to be identified and the STM enabled before | ||
| 364 | being used: | ||
| 365 | |||
| 366 | root@genericarmv8:~# echo 1 > /sys/bus/coresight/devices/20010000.etf/enable_sink | ||
| 367 | root@genericarmv8:~# echo 1 > /sys/bus/coresight/devices/20100000.stm/enable_source | ||
| 368 | |||
| 369 | From there user space applications can request and use channels using the devfs | ||
| 370 | interface provided for that purpose by the generic STM API: | ||
| 371 | |||
| 372 | root@genericarmv8:~# ls -l /dev/20100000.stm | ||
| 373 | crw------- 1 root root 10, 61 Jan 3 18:11 /dev/20100000.stm | ||
| 374 | root@genericarmv8:~# | ||
| 375 | |||
| 376 | Details on how to use the generic STM API can be found here [2]. | ||
| 377 | |||
| 378 | [1]. Documentation/ABI/testing/sysfs-bus-coresight-devices-stm | ||
| 379 | [2]. Documentation/trace/stm.txt | ||
| 380 | |||
| 381 | |||
| 382 | Using perf tools | ||
| 383 | ---------------- | ||
| 384 | 349 | ||
| 385 | perf can be used to record and analyze trace of programs. | 350 | perf can be used to record and analyze trace of programs. |
| 386 | 351 | ||
| @@ -428,3 +393,38 @@ sort example is from the AutoFDO tutorial (https://gcc.gnu.org/wiki/AutoFDO/Tuto | |||
| 428 | $ taskset -c 2 ./sort_autofdo | 393 | $ taskset -c 2 ./sort_autofdo |
| 429 | Bubble sorting array of 30000 elements | 394 | Bubble sorting array of 30000 elements |
| 430 | 5806 ms | 395 | 5806 ms |
| 396 | |||
| 397 | |||
| 398 | How to use the STM module | ||
| 399 | ------------------------- | ||
| 400 | |||
| 401 | Using the System Trace Macrocell module is the same as the tracers - the only | ||
| 402 | difference is that clients are driving the trace capture rather | ||
| 403 | than the program flow through the code. | ||
| 404 | |||
| 405 | As with any other CoreSight component, specifics about the STM tracer can be | ||
| 406 | found in sysfs with more information on each entry being found in [1]: | ||
| 407 | |||
| 408 | root@genericarmv8:~# ls /sys/bus/coresight/devices/20100000.stm | ||
| 409 | enable_source hwevent_select port_enable subsystem uevent | ||
| 410 | hwevent_enable mgmt port_select traceid | ||
| 411 | root@genericarmv8:~# | ||
| 412 | |||
| 413 | Like any other source a sink needs to be identified and the STM enabled before | ||
| 414 | being used: | ||
| 415 | |||
| 416 | root@genericarmv8:~# echo 1 > /sys/bus/coresight/devices/20010000.etf/enable_sink | ||
| 417 | root@genericarmv8:~# echo 1 > /sys/bus/coresight/devices/20100000.stm/enable_source | ||
| 418 | |||
| 419 | From there user space applications can request and use channels using the devfs | ||
| 420 | interface provided for that purpose by the generic STM API: | ||
| 421 | |||
| 422 | root@genericarmv8:~# ls -l /dev/20100000.stm | ||
| 423 | crw------- 1 root root 10, 61 Jan 3 18:11 /dev/20100000.stm | ||
| 424 | root@genericarmv8:~# | ||
| 425 | |||
| 426 | Details on how to use the generic STM API can be found here [2]. | ||
| 427 | |||
| 428 | [1]. Documentation/ABI/testing/sysfs-bus-coresight-devices-stm | ||
| 429 | [2]. Documentation/trace/stm.txt | ||
| 430 | [3]. https://github.com/Linaro/perf-opencsd | ||
