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>
This commit is contained in:
Arnaldo Carvalho de Melo
2011-01-31 18:19:33 -02:00
parent 229ade9ba3
commit c0443df1b6
5 changed files with 189 additions and 8 deletions

View File

@@ -158,6 +158,7 @@ float perf_top__decay_samples(struct perf_top *top, struct rb_root *root)
syme = list_entry(top->active_symbols.next, struct sym_entry, node);
pthread_mutex_unlock(&top->active_symbols_lock);
top->rb_entries = 0;
list_for_each_entry_safe_from(syme, n, &top->active_symbols, node) {
syme->snap_count = syme->count[snap];
if (syme->snap_count != 0) {
@@ -170,7 +171,11 @@ float perf_top__decay_samples(struct perf_top *top, struct rb_root *root)
continue;
}
syme->weight = sym_weight(syme, top);
rb_insert_active_sym(root, syme);
if ((int)syme->snap_count >= top->count_filter) {
rb_insert_active_sym(root, syme);
++top->rb_entries;
}
sum_ksamples += syme->snap_count;
for (j = 0; j < top->evlist->nr_entries; j++)