aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/util.h
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2010-05-22 10:25:40 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2010-05-22 10:25:40 -0400
commit46e3e055ce69a00d735e458445ab1d24718ff751 (patch)
tree06829420acf27f2deb05ac6ccc230268bf271318 /tools/perf/util/util.h
parent6e78c9fd1bc2c7e04b3d7052e9eb27aa536e4e2c (diff)
perf annotate: Add TUI interface
When annotating multiple entries, for instance, when running simply as: $ perf annotate the right and left keys, as well as TAB can be used to cycle thru the multiple symbols being annotated. If one doesn't like TUI annotate, disable it by editing ~/.perfconfig and adding: [tui] annotate = off Just like it is possible for report. Cc: Frédéric Weisbecker <fweisbec@gmail.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Stephane Eranian <eranian@google.com> Cc: Tom Zanussi <tzanussi@gmail.com> LKML-Reference: <new-submission> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/util.h')
-rw-r--r--tools/perf/util/util.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/tools/perf/util/util.h b/tools/perf/util/util.h
index 45b9655f3a5c..4e8b6b0c551c 100644
--- a/tools/perf/util/util.h
+++ b/tools/perf/util/util.h
@@ -81,7 +81,7 @@
81#include <inttypes.h> 81#include <inttypes.h>
82#include "../../../include/linux/magic.h" 82#include "../../../include/linux/magic.h"
83#include "types.h" 83#include "types.h"
84 84#include <sys/ttydefaults.h>
85 85
86#ifndef NO_ICONV 86#ifndef NO_ICONV
87#include <iconv.h> 87#include <iconv.h>
@@ -263,6 +263,19 @@ bool strglobmatch(const char *str, const char *pat);
263bool strlazymatch(const char *str, const char *pat); 263bool strlazymatch(const char *str, const char *pat);
264unsigned long convert_unit(unsigned long value, char *unit); 264unsigned long convert_unit(unsigned long value, char *unit);
265 265
266#ifndef ESC
267#define ESC 27
268#endif
269
270static inline bool is_exit_key(int key)
271{
272 char up;
273 if (key == CTRL('c') || key == ESC)
274 return true;
275 up = toupper(key);
276 return up == 'Q';
277}
278
266#define _STR(x) #x 279#define _STR(x) #x
267#define STR(x) _STR(x) 280#define STR(x) _STR(x)
268 281