OSDN Git Service

perf script: Don't force less for non tty output with --xed
authorAndi Kleen <ak@linux.intel.com>
Fri, 22 May 2020 02:09:14 +0000 (19:09 -0700)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 28 May 2020 13:03:28 +0000 (10:03 -0300)
commit8c3e05c827ef687215723680862ebd2d431dee49
tree0335afd20648ba3b393a4813a2d8ac1fa7da80da
parente2ce1059b0b3d032aa07cc51c24d28ec498feb5f
perf script: Don't force less for non tty output with --xed

--xed currently forces less. When piping the output to other scripts
this can waste a lot of CPU time because less is rather slow.
I've seen it using up a full core on its own in a pipeline.
Only force less when the output is actually a terminal.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Link: http://lore.kernel.org/lkml/20200522020914.527564-1-andi@firstfloor.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-script.c