perf report tui: Improve multi event session support
When multiple events were used in 'perf record', allow the user to
choose which one is wanted before showing the per event histograms.
Annotations will be performed on the chosen event.
Allow going back and forth from event to event quickly using just the
arrow keys and enter.
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Tom Zanussi <tzanussi@gmail.com>
Cc: William Cohen <wcohen@redhat.com>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
diff --git a/tools/perf/util/hist.h b/tools/perf/util/hist.h
index 0d38b43..cb6858a 100644
--- a/tools/perf/util/hist.h
+++ b/tools/perf/util/hist.h
@@ -87,15 +87,9 @@
struct perf_evlist;
#ifdef NO_NEWT_SUPPORT
-static inline int hists__browse(struct hists *self __used,
- const char *helpline __used,
- const char *ev_name __used, int evidx __used)
-{
- return 0;
-}
-
-static inline int hists__tui_browse_tree(struct perf_evlist *evlist __used,
- const char *help __used)
+static inline
+int perf_evlist__tui_browse_hists(struct perf_evlist *evlist __used,
+ const char *help __used)
{
return 0;
}
@@ -109,14 +103,12 @@
#define KEY_RIGHT -2
#else
#include <newt.h>
-int hists__browse(struct hists *self, const char *helpline,
- const char *ev_name, int evidx);
int hist_entry__tui_annotate(struct hist_entry *self, int evidx);
#define KEY_LEFT NEWT_KEY_LEFT
#define KEY_RIGHT NEWT_KEY_RIGHT
-int hists__tui_browse_tree(struct perf_evlist *evlist, const char *help);
+int perf_evlist__tui_browse_hists(struct perf_evlist *evlist, const char *help);
#endif
unsigned int hists__sort_list_width(struct hists *self);