lkml.org 
[lkml]   [2013]   [Jul]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 11/17] perf ftrace: Use pager for displaying result
Date
From: Namhyung Kim <namhyung.kim@lge.com>

It's convenient to use pager when seeing many lines of result.

Note that setup_pager() should be called after perf_evlist__
prepare_workload() since they can interfere each other regarding
shared stdio streams.

Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
tools/perf/builtin-ftrace.c | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/tools/perf/builtin-ftrace.c b/tools/perf/builtin-ftrace.c
index bb0a238b8509..f8e363b3c06d 100644
--- a/tools/perf/builtin-ftrace.c
+++ b/tools/perf/builtin-ftrace.c
@@ -227,6 +227,7 @@ static int do_ftrace_live(struct perf_ftrace *ftrace)
signal(SIGINT, sig_handler);
signal(SIGUSR1, sig_handler);
signal(SIGCHLD, sig_handler);
+ signal(SIGPIPE, sig_handler);

if (setup_tracing_files(ftrace) < 0)
goto out_reset;
@@ -1445,6 +1446,8 @@ __cmd_ftrace_live(struct perf_ftrace *ftrace, int argc, const char **argv)
argv, false, true) < 0)
goto out_maps;

+ setup_pager();
+
ret = do_ftrace_live(ftrace);

out_maps:
@@ -1566,6 +1569,8 @@ __cmd_ftrace_show(struct perf_ftrace *ftrace, int argc, const char **argv)
if (ftrace->dirname == NULL)
ftrace->dirname = DEFAULT_DIRNAME;

+ setup_pager();
+
ret = do_ftrace_show(ftrace);

perf_evlist__delete_maps(ftrace->evlist);
@@ -1626,6 +1631,7 @@ __cmd_ftrace_report(struct perf_ftrace *ftrace, int argc, const char **argv)

perf_hpp__init();

+ setup_pager();
setup_sorting();

symbol_conf.exclude_other = false;
--
1.7.11.7


\
 
 \ /
  Last update: 2013-07-30 11:41    [W:0.159 / U:0.844 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site