diff options
author | Adrian Hunter <adrian.hunter@intel.com> | 2020-09-02 13:57:07 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2020-09-04 20:38:15 +0300 |
commit | a8fcbd269b4340c36dbf99b4453bcbfe128d93fb (patch) | |
tree | cae1fe729dd0558552f4956691a529ec21cbab94 /tools/perf/Documentation/perf-stat.txt | |
parent | 1f4390d825cc04e91a276c78f984dd2d7fe01e62 (diff) | |
download | linux-a8fcbd269b4340c36dbf99b4453bcbfe128d93fb.tar.xz |
perf tools: Add FIFO file names as alternative options to --control
Enable the --control option to accept file names as an alternative to
file descriptors.
Example:
$ mkfifo perf.control
$ mkfifo perf.ack
$ cat perf.ack &
[1] 6808
$ perf record --control fifo:perf.control,perf.ack -- sleep 300 &
[2] 6810
$ echo disable > perf.control
$ Events disabled
ack
$ echo enable > perf.control
$ Events enabled
ack
$ echo disable > perf.control
$ Events disabled
ack
$ kill %2
[ perf record: Woken up 4 times to write data ]
$ [ perf record: Captured and wrote 0.018 MB perf.data (7 samples) ]
[1]- Done cat perf.ack
[2]+ Terminated perf record --control fifo:perf.control,perf.ack -- sleep 300
$
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Acked-by: Alexey Budankov <alexey.budankov@linux.intel.com>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: http://lore.kernel.org/lkml/20200902105707.11491-1-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/Documentation/perf-stat.txt')
-rw-r--r-- | tools/perf/Documentation/perf-stat.txt | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/perf/Documentation/perf-stat.txt b/tools/perf/Documentation/perf-stat.txt index 224795e97b1c..7d18694e592a 100644 --- a/tools/perf/Documentation/perf-stat.txt +++ b/tools/perf/Documentation/perf-stat.txt @@ -180,7 +180,9 @@ with it. --append may be used here. Examples: 3>results perf stat --log-fd 3 -- $cmd 3>>results perf stat --log-fd 3 --append -- $cmd +--control=fifo:ctl-fifo[,ack-fifo]:: --control=fd:ctl-fd[,ack-fd]:: +ctl-fifo / ack-fifo are opened and used as ctl-fd / ack-fd as follows. Listen on ctl-fd descriptor for command to control measurement ('enable': enable events, 'disable': disable events). Measurements can be started with events disabled using --delay=-1 option. Optionally send control command completion ('ack\n') to ack-fd descriptor |