Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758543Ab3G3JTb (ORCPT ); Tue, 30 Jul 2013 05:19:31 -0400 Received: from LGEMRELSE6Q.lge.com ([156.147.1.121]:47887 "EHLO LGEMRELSE6Q.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758478Ab3G3JT2 (ORCPT ); Tue, 30 Jul 2013 05:19:28 -0400 X-AuditID: 9c930179-b7c49ae000000e68-ec-51f78519e387 From: Namhyung Kim To: Arnaldo Carvalho de Melo Cc: Peter Zijlstra , Paul Mackerras , Ingo Molnar , Namhyung Kim , LKML , Steven Rostedt , Frederic Weisbecker , Jiri Olsa , David Ahern , Stephane Eranian , Jeremy Eder Subject: [PATCH 11/17] perf ftrace: Use pager for displaying result Date: Tue, 30 Jul 2013 18:19:08 +0900 Message-Id: <1375175954-798-12-git-send-email-namhyung@kernel.org> X-Mailer: git-send-email 1.7.11.7 In-Reply-To: <1375175954-798-1-git-send-email-namhyung@kernel.org> References: <1375175954-798-1-git-send-email-namhyung@kernel.org> X-Brightmail-Tracker: AAAAAA== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1846 Lines: 61 From: Namhyung Kim 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 Cc: Frederic Weisbecker Signed-off-by: Namhyung Kim --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/