Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Documentation: coresight: Document AUX pause and resume

This adds description for AUX pause and resume. It gives introduction
for what's AUX pause and resume and records usage examples.

Signed-off-by: Leo Yan <leo.yan@arm.com>
Reviewed-by: James Clark <james.clark@linaro.org>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/20250401180708.385396-8-leo.yan@arm.com

authored by

Leo Yan and committed by
Suzuki K Poulose
5161890f 973f47a9

+31
+31
Documentation/trace/coresight/coresight-perf.rst
··· 78 78 79 79 Please refer to the kernel configuration help for more information. 80 80 81 + Fine-grained tracing with AUX pause and resume 82 + ---------------------------------------------- 83 + 84 + Arm CoreSight may generate a large amount of hardware trace data, which 85 + will lead to overhead in recording and distract users when reviewing 86 + profiling result. To mitigate the issue of excessive trace data, Perf 87 + provides AUX pause and resume functionality for fine-grained tracing. 88 + 89 + The AUX pause and resume can be triggered by associated events. These 90 + events can be ftrace tracepoints (including static and dynamic 91 + tracepoints) or PMU events (e.g. CPU PMU cycle event). To create a perf 92 + session with AUX pause / resume, three configuration terms are 93 + introduced: 94 + 95 + - "aux-action=start-paused": it is specified for the cs_etm PMU event to 96 + launch in a paused state. 97 + - "aux-action=pause": an associated event is specified with this term 98 + to pause AUX trace. 99 + - "aux-action=resume": an associated event is specified with this term 100 + to resume AUX trace. 101 + 102 + Example for triggering AUX pause and resume with ftrace tracepoints:: 103 + 104 + perf record -e cs_etm/aux-action=start-paused/k,syscalls:sys_enter_openat/aux-action=resume/,syscalls:sys_exit_openat/aux-action=pause/ ls 105 + 106 + Example for triggering AUX pause and resume with PMU event:: 107 + 108 + perf record -a -e cs_etm/aux-action=start-paused/k \ 109 + -e cycles/aux-action=pause,period=10000000/ \ 110 + -e cycles/aux-action=resume,period=1050000/ -- sleep 1 111 + 81 112 Perf test - Verify kernel and userspace perf CoreSight work 82 113 ----------------------------------------------------------- 83 114