aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/top.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2011-01-31 15:19:33 -0500
committerArnaldo Carvalho de Melo <acme@redhat.com>2011-01-31 15:19:33 -0500
commitc0443df1b69b59675fc6790e0ddce87c8ca00abf (patch)
tree8c98a270700f594d0e49246a640a4f725caf9bf1 /tools/perf/util/top.c
parent229ade9ba36341f7369ecb4f134bcec9133520bf (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.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)
158 syme = list_entry(top->active_symbols.next, struct sym_entry, node); 158 syme = list_entry(top->active_symbols.next, struct sym_entry, node);
159 pthread_mutex_unlock(&top->active_symbols_lock); 159 pthread_mutex_unlock(&top->active_symbols_lock);
160 160
161 top->rb_entries = 0;
161 list_for_each_entry_safe_from(syme, n, &top->active_symbols, node) { 162 list_for_each_entry_safe_from(syme, n, &top->active_symbols, node) {
162 syme->snap_count = syme->count[snap]; 163 syme->snap_count = syme->count[snap];
163 if (syme->snap_count != 0) { 164 if (syme->snap_count != 0) {
@@ -170,7 +171,11 @@ float perf_top__decay_samples(struct perf_top *top, struct rb_root *root)
170 continue; 171 continue;
171 } 172 }
172 syme->weight = sym_weight(syme, top); 173 syme->weight = sym_weight(syme, top);
173 rb_insert_active_sym(root, syme); 174
175 if ((int)syme->snap_count >= top->count_filter) {
176 rb_insert_active_sym(root, syme);
177 ++top->rb_entries;
178 }
174 sum_ksamples += syme->snap_count; 179 sum_ksamples += syme->snap_count;
175 180
176 for (j = 0; j < top->evlist->nr_entries; j++) 181 for (j = 0; j < top->evlist->nr_entries; j++)