[tip:perfcounters/urgent] perf list: Fix large list output by using the pager

From: tip-bot for Arnaldo Carvalho de Melo
Date: Thu Aug 13 2009 - 03:28:40 EST


Commit-ID: 8f7a0dc51674ad0dd06155291b0aed60d655943c
Gitweb: http://git.kernel.org/tip/8f7a0dc51674ad0dd06155291b0aed60d655943c
Author: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
AuthorDate: Wed, 12 Aug 2009 14:44:59 -0300
Committer: Ingo Molnar <mingo@xxxxxxx>
CommitDate: Thu, 13 Aug 2009 09:05:48 +0200

perf list: Fix large list output by using the pager

When /sys/kernel/debug is mounted the list can be imense, so
use the pager like the other tools.

Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
Acked-by: Frederic Weisbecker <fweisbec@xxxxxxxxx>
Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
LKML-Reference: <20090812174459.GB3495@xxxxxxxxxxxxxxxxxx>
Signed-off-by: Ingo Molnar <mingo@xxxxxxx>


---
tools/perf/builtin-list.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/tools/perf/builtin-list.c b/tools/perf/builtin-list.c
index f990fa8..d88c696 100644
--- a/tools/perf/builtin-list.c
+++ b/tools/perf/builtin-list.c
@@ -10,11 +10,12 @@

#include "perf.h"

-#include "util/parse-options.h"
#include "util/parse-events.h"
+#include "util/cache.h"

int cmd_list(int argc __used, const char **argv __used, const char *prefix __used)
{
+ setup_pager();
print_events();
return 0;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/