perf_counter tools: Add built-in pager support
Add Git's pager.c (and sigchain) code. A command only
has to call setup_pager() to get paged interactive
output.
Non-interactive (redirected, command-piped, etc.) uses
are not affected.
Update perf-report to make use of this.
[ Impact: new feature ]
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: John Kacur <jkacur@redhat.com>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
diff --git a/Documentation/perf_counter/builtin-report.c b/Documentation/perf_counter/builtin-report.c
index e2712cd..9aef7c5 100644
--- a/Documentation/perf_counter/builtin-report.c
+++ b/Documentation/perf_counter/builtin-report.c
@@ -7,6 +7,7 @@
#include <ctype.h>
#include "util/list.h"
+#include "util/cache.h"
#include "util/rbtree.h"
#include "perf.h"
@@ -992,5 +993,7 @@
parse_options(argc, argv, options, report_usage, 0);
+ setup_pager();
+
return __cmd_report();
}