aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/hist.h
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2010-05-23 21:36:51 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2010-05-23 21:36:51 -0400
commitd67f088e084755bdceb4f15bc6e05e309db1eea7 (patch)
tree6eaae7aed4f990233e73851053f2a36b32ce55b2 /tools/perf/util/hist.h
parent44bf460649a9b91f291176097e9d7e846e8c001e (diff)
perf report: Support multiple events on the TUI
The hists__tty_browse_tree function was created with the loop to print all events, and its equivalent, hists__tui_browse_tree, was created in a similar fashion, where it is possible to switch among the multiple events, if present, using TAB to go the next event, and shift+TAB (UNTAB) to go to the previous. The report TUI now shows as the window title the name of the event and a leak was fixed wrt pstacks. 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/hist.h')
-rw-r--r--tools/perf/util/hist.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/tools/perf/util/hist.h b/tools/perf/util/hist.h
index 2d5203fedb20..83fa33a7b38b 100644
--- a/tools/perf/util/hist.h
+++ b/tools/perf/util/hist.h
@@ -98,10 +98,17 @@ void hists__filter_by_thread(struct hists *self, const struct thread *thread);
98#ifdef NO_NEWT_SUPPORT 98#ifdef NO_NEWT_SUPPORT
99static inline int hists__browse(struct hists *self __used, 99static inline int hists__browse(struct hists *self __used,
100 const char *helpline __used, 100 const char *helpline __used,
101 const char *input_name __used) 101 const char *ev_name __used)
102{ 102{
103 return 0; 103 return 0;
104} 104}
105
106static inline int hists__tui_browse_tree(struct rb_root *self __used,
107 const char *help __used)
108{
109 return 0;
110}
111
105static inline int hist_entry__tui_annotate(struct hist_entry *self __used) 112static inline int hist_entry__tui_annotate(struct hist_entry *self __used)
106{ 113{
107 return 0; 114 return 0;
@@ -111,9 +118,12 @@ static inline int hist_entry__tui_annotate(struct hist_entry *self __used)
111#else 118#else
112#include <newt.h> 119#include <newt.h>
113int hists__browse(struct hists *self, const char *helpline, 120int hists__browse(struct hists *self, const char *helpline,
114 const char *input_name); 121 const char *ev_name);
115int hist_entry__tui_annotate(struct hist_entry *self); 122int hist_entry__tui_annotate(struct hist_entry *self);
123
116#define KEY_LEFT NEWT_KEY_LEFT 124#define KEY_LEFT NEWT_KEY_LEFT
117#define KEY_RIGHT NEWT_KEY_RIGHT 125#define KEY_RIGHT NEWT_KEY_RIGHT
126
127int hists__tui_browse_tree(struct rb_root *self, const char *help);
118#endif 128#endif
119#endif /* __PERF_HIST_H */ 129#endif /* __PERF_HIST_H */