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>
Showing
- tools/perf/Documentation/perf-record.txt 2 additions, 0 deletionstools/perf/Documentation/perf-record.txt
- tools/perf/Documentation/perf-stat.txt 2 additions, 0 deletionstools/perf/Documentation/perf-stat.txt
- tools/perf/builtin-record.c 26 additions, 8 deletionstools/perf/builtin-record.c
- tools/perf/builtin-stat.c 15 additions, 3 deletionstools/perf/builtin-stat.c
- tools/perf/util/evlist.c 53 additions, 2 deletionstools/perf/util/evlist.c
- tools/perf/util/evlist.h 1 addition, 1 deletiontools/perf/util/evlist.h
- tools/perf/util/record.h 1 addition, 0 deletionstools/perf/util/record.h
- tools/perf/util/stat.h 1 addition, 0 deletionstools/perf/util/stat.h
Loading
Please register or sign in to comment