summaryrefslogtreecommitdiff
path: root/tools/perf/util/top.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2011-01-31 18:19:33 -0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2011-01-31 18:19:33 -0200
commitc0443df1b69b59675fc6790e0ddce87c8ca00abf (patch)
tree8c98a270700f594d0e49246a640a4f725caf9bf1 /tools/perf/util/top.c
parent229ade9ba36341f7369ecb4f134bcec9133520bf (diff)
downloadlinux-rpi-c0443df1b69b59675fc6790e0ddce87c8ca00abf.tar.gz
linux-rpi-c0443df1b69b59675fc6790e0ddce87c8ca00abf.tar.bz2
linux-rpi-c0443df1b69b59675fc6790e0ddce87c8ca00abf.zip
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.c')
-rw-r--r--tools/perf/util/top.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/perf/util/top.c b/tools/perf/util/top.c
index c06cc5386e7e..1d2e2652cd68 100644
--- a/tools/perf/util/top.c
+++ b/tools/perf/util/top.c
@@ -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++)