diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-01-31 15:19:33 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-01-31 15:19:33 -0500 |
commit | c0443df1b69b59675fc6790e0ddce87c8ca00abf (patch) | |
tree | 8c98a270700f594d0e49246a640a4f725caf9bf1 /tools/perf/util/top.h | |
parent | 229ade9ba36341f7369ecb4f134bcec9133520bf (diff) |
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 { | |||
38 | unsigned long count[0]; | 38 | unsigned long count[0]; |
39 | }; | 39 | }; |
40 | 40 | ||
41 | static inline struct symbol *sym_entry__symbol(struct sym_entry *self) | ||
42 | { | ||
43 | return ((void *)self) + symbol_conf.priv_size; | ||
44 | } | ||
45 | |||
41 | struct perf_top { | 46 | struct perf_top { |
42 | struct perf_evlist *evlist; | 47 | struct perf_evlist *evlist; |
43 | /* | 48 | /* |
@@ -51,7 +56,7 @@ struct perf_top { | |||
51 | u64 exact_samples; | 56 | u64 exact_samples; |
52 | u64 guest_us_samples, guest_kernel_samples; | 57 | u64 guest_us_samples, guest_kernel_samples; |
53 | int print_entries, count_filter, delay_secs; | 58 | int print_entries, count_filter, delay_secs; |
54 | int display_weighted, freq; | 59 | int display_weighted, freq, rb_entries; |
55 | int sym_counter, target_pid, target_tid; | 60 | int sym_counter, target_pid, target_tid; |
56 | bool hide_kernel_symbols, hide_user_symbols, zero; | 61 | bool hide_kernel_symbols, hide_user_symbols, zero; |
57 | const char *cpu_list; | 62 | const char *cpu_list; |
@@ -64,4 +69,12 @@ float perf_top__decay_samples(struct perf_top *top, struct rb_root *root); | |||
64 | void perf_top__find_widths(struct perf_top *top, struct rb_root *root, | 69 | void perf_top__find_widths(struct perf_top *top, struct rb_root *root, |
65 | int *dso_width, int *dso_short_width, int *sym_width); | 70 | int *dso_width, int *dso_short_width, int *sym_width); |
66 | 71 | ||
72 | #ifdef NO_NEWT_SUPPORT | ||
73 | static inline int perf_top__tui_browser(struct perf_top *top __used) | ||
74 | { | ||
75 | return 0; | ||
76 | } | ||
77 | #else | ||
78 | int perf_top__tui_browser(struct perf_top *top); | ||
79 | #endif | ||
67 | #endif /* __PERF_TOP_H */ | 80 | #endif /* __PERF_TOP_H */ |