path: root/tools/perf/builtin-list.c
diff options
authorArnaldo Carvalho de Melo <>2015-09-30 17:13:26 -0300
committerArnaldo Carvalho de Melo <>2015-09-30 18:34:38 -0300
commitdfc431cbdc3a3c0556f1cd462d724d107cc15a9e (patch)
treea3d232e0e2d81a03e0a6c1225d3e2b4d889df996 /tools/perf/builtin-list.c
parent6cca13bdf5a5d561a855259689874e0c7266eec3 (diff)
perf list: Remove blank lines, headers when piping output
So that one can, for instance, use it with wc -l: # perf list *:*write* | wc -l 60 Or to look for the "bio" tracepoints, without 'perf list' headers: # perf list *:*bio* | head block:block_bio_backmerge [Tracepoint event] block:block_bio_bounce [Tracepoint event] block:block_bio_complete [Tracepoint event] block:block_bio_frontmerge [Tracepoint event] block:block_bio_queue [Tracepoint event] block:block_bio_remap [Tracepoint event] # Cc: Adrian Hunter <> Cc: Borislav Petkov <> Cc: David Ahern <> Cc: Frederic Weisbecker <> Cc: Jiri Olsa <> Cc: Namhyung Kim <> Cc: Stephane Eranian <> Cc: Wang Nan <> Link: Signed-off-by: Arnaldo Carvalho de Melo <>
Diffstat (limited to 'tools/perf/builtin-list.c')
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/builtin-list.c b/tools/perf/builtin-list.c
index af5bd0514108..602414040344 100644
--- a/tools/perf/builtin-list.c
+++ b/tools/perf/builtin-list.c
@@ -36,7 +36,7 @@ int cmd_list(int argc, const char **argv, const char *prefix __maybe_unused)
- if (!raw_dump)
+ if (!raw_dump && pager_in_use())
printf("\nList of pre-defined events (to be used in -e):\n\n");
if (argc == 0) {