From: Namhyung Kim <namhyung@kernel.org>
To: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
Paul Mackerras <paulus@samba.org>, Ingo Molnar <mingo@kernel.org>,
Namhyung Kim <namhyung.kim@lge.com>,
LKML <linux-kernel@vger.kernel.org>,
Steven Rostedt <rostedt@goodmis.org>,
Frederic Weisbecker <fweisbec@gmail.com>,
Jiri Olsa <jolsa@redhat.com>,
Stephane Eranian <eranian@google.com>,
Jeremy Eder <jeder@redhat.com>
Subject: [PATCH 11/18] perf ftrace: Use pager for displaying result
Date: Wed, 16 Oct 2013 14:00:14 +0900 [thread overview]
Message-ID: <1381899621-14638-12-git-send-email-namhyung@kernel.org> (raw)
In-Reply-To: <1381899621-14638-1-git-send-email-namhyung@kernel.org>
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 676b2aa7590f..83ed6d797087 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;
@@ -1465,6 +1466,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:
@@ -1586,6 +1589,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);
@@ -1646,6 +1651,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
next prev parent reply other threads:[~2013-10-16 5:03 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-16 5:00 [PATCHSET 00/18] perf tools: Introduce new 'ftrace' command (5) Namhyung Kim
2013-10-16 5:00 ` [PATCH 01/18] perf util: Save pid-cmdline mapping into tracing header Namhyung Kim
2013-10-16 5:00 ` [PATCH 02/18] perf util: Add more debug message on failure path Namhyung Kim
2013-10-16 5:00 ` [PATCH 03/18] perf tools: Introduce new 'ftrace' tool Namhyung Kim
2013-10-16 5:00 ` [PATCH 04/18] perf ftrace: Add support for --pid option Namhyung Kim
2013-10-16 5:00 ` [PATCH 05/18] perf ftrace: Add support for -a and -C option Namhyung Kim
2013-10-16 5:00 ` [PATCH 06/18] perf ftrace: Split "live" sub-command Namhyung Kim
2013-10-16 5:00 ` [PATCH 07/18] perf ftrace: Add 'record' sub-command Namhyung Kim
2013-10-16 5:00 ` [PATCH 08/18] perf ftrace: Add 'show' sub-command Namhyung Kim
2013-10-16 5:00 ` [PATCH 09/18] perf ftrace: Add 'report' sub-command Namhyung Kim
2013-10-16 5:00 ` [PATCH 10/18] perf ftrace: Add dump_printf() for low-level debugging Namhyung Kim
2013-10-16 5:00 ` Namhyung Kim [this message]
2013-10-16 5:00 ` [PATCH 12/18] perf ftrace: Cleanup using ftrace_setup/teardown() Namhyung Kim
2013-10-16 5:00 ` [PATCH 13/18] perf tools: Add document for perf-ftrace command Namhyung Kim
2013-10-16 5:00 ` [PATCH 14/18] perf ftrace: Add a signal handler for SIGSEGV Namhyung Kim
2013-10-16 5:00 ` [PATCH 15/18] perf ftrace: Add --clock option Namhyung Kim
2013-10-16 5:00 ` [PATCH 16/18] perf ftrace: Show leaf-functions as oneliner Namhyung Kim
2013-10-16 5:00 ` [PATCH 17/18] perf ftrace: Tidy up the function graph output of 'show' subcommand Namhyung Kim
2013-10-16 5:00 ` [PATCH 18/18] perf ftrace: Add --filter option Namhyung Kim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1381899621-14638-12-git-send-email-namhyung@kernel.org \
--to=namhyung@kernel.org \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@ghostprotocols.net \
--cc=eranian@google.com \
--cc=fweisbec@gmail.com \
--cc=jeder@redhat.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung.kim@lge.com \
--cc=paulus@samba.org \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®