diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-01-31 23:19:33 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-01-31 23:19:33 +0300 |
commit | c0443df1b69b59675fc6790e0ddce87c8ca00abf (patch) | |
tree | 8c98a270700f594d0e49246a640a4f725caf9bf1 /tools/perf/util/top.h | |
parent | 229ade9ba36341f7369ecb4f134bcec9133520bf (diff) | |
download | linux-c0443df1b69b59675fc6790e0ddce87c8ca00abf.tar.xz |
perf top: Introduce slang based TUI
Disabled by default as there are features found in the stdio based one
that aren't implemented, like live annotation, filtering knobs data
entry.
Annotation hopefully will get somehow merged with the 'perf annotate'
code.
To use it:
perf top --tui
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>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/top.h')
-rw-r--r-- | tools/perf/util/top.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/tools/perf/util/top.h b/tools/perf/util/top.h index 0467b26dd8d8..611370fa7df8 100644 --- a/tools/perf/util/top.h +++ b/tools/perf/util/top.h @@ -38,6 +38,11 @@ struct sym_entry { unsigned long count[0]; }; +static inline struct symbol *sym_entry__symbol(struct sym_entry *self) +{ + return ((void *)self) + symbol_conf.priv_size; +} + struct perf_top { struct perf_evlist *evlist; /* @@ -51,7 +56,7 @@ struct perf_top { u64 exact_samples; u64 guest_us_samples, guest_kernel_samples; int print_entries, count_filter, delay_secs; - int display_weighted, freq; + int display_weighted, freq, rb_entries; int sym_counter, target_pid, target_tid; bool hide_kernel_symbols, hide_user_symbols, zero; const char *cpu_list; @@ -64,4 +69,12 @@ float perf_top__decay_samples(struct perf_top *top, struct rb_root *root); void perf_top__find_widths(struct perf_top *top, struct rb_root *root, int *dso_width, int *dso_short_width, int *sym_width); +#ifdef NO_NEWT_SUPPORT +static inline int perf_top__tui_browser(struct perf_top *top __used) +{ + return 0; +} +#else +int perf_top__tui_browser(struct perf_top *top); +#endif #endif /* __PERF_TOP_H */ |