diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-10-05 19:11:32 -0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-10-07 12:12:51 -0300 |
commit | 81cce8de9437be9234f651be1f03e596c1b1a79a (patch) | |
tree | 0837eb23c9d74b3d54999ffaead67317cc8ab4d5 /tools/perf/util/hist.h | |
parent | 1980c2ebd7020d82c024b8c4046849b38e78e7da (diff) | |
download | op-kernel-dev-81cce8de9437be9234f651be1f03e596c1b1a79a.zip op-kernel-dev-81cce8de9437be9234f651be1f03e596c1b1a79a.tar.gz |
perf browsers: Add live mode to the hists, annotate browsers
This allows passing a timer to be run periodically, which will update
the hists tree that then gers refreshed on the screen, just like the
Live mode (symbol entries, annotation) we already have in 'perf top
--tui'.
Will be used by the new hist_entry/hists based 'top' tool.
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-2r44qd8oe4sagzcgoikl8qzc@git.kernel.org
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.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/tools/perf/util/hist.h b/tools/perf/util/hist.h index d3f976c..424f9eb 100644 --- a/tools/perf/util/hist.h +++ b/tools/perf/util/hist.h @@ -100,13 +100,16 @@ struct perf_evlist; #ifdef NO_NEWT_SUPPORT static inline int perf_evlist__tui_browse_hists(struct perf_evlist *evlist __used, - const char *help __used) + const char *help __used, void(*timer)(void *arg) __used, void *arg, + int refresh __used) { return 0; } static inline int hist_entry__tui_annotate(struct hist_entry *self __used, - int evidx __used) + int evidx __used, + void(*timer)(void *arg) __used, + void *arg __used, int delay_secs __used); { return 0; } @@ -114,12 +117,15 @@ static inline int hist_entry__tui_annotate(struct hist_entry *self __used, #define KEY_RIGHT -2 #else #include <newt.h> -int hist_entry__tui_annotate(struct hist_entry *self, int evidx); +int hist_entry__tui_annotate(struct hist_entry *he, int evidx, + void(*timer)(void *arg), void *arg, int delay_secs); #define KEY_LEFT NEWT_KEY_LEFT #define KEY_RIGHT NEWT_KEY_RIGHT -int perf_evlist__tui_browse_hists(struct perf_evlist *evlist, const char *help); +int perf_evlist__tui_browse_hists(struct perf_evlist *evlist, const char *help, + void(*timer)(void *arg), void *arg, + int refresh); #endif unsigned int hists__sort_list_width(struct hists *self); |