diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-10-06 09:56:05 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-10-07 16:01:11 -0400 |
commit | be83f5ed6bc46cd89b4a102b6e341ecddf7abf91 (patch) | |
tree | 9fcf1157f7fbdc5c11bc87f621f400acb4142e54 /tools/perf | |
parent | 7d16320e2315db434b28854c08677e0d15b604f1 (diff) |
perf hists browser: Update the browser.nr_entries after the timer
Previously the hist_browser dealt with a static tree of entries, now it
needs to update the nr_entries in the browser after the timer runs.
A better solution will come when moving using another thread for the
collapse_resort, etc, but for now this is ok.
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-9eno2iq55sjr4iyo899buzaw@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf')
-rw-r--r-- | tools/perf/util/ui/browsers/hists.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/perf/util/ui/browsers/hists.c b/tools/perf/util/ui/browsers/hists.c index ef6ccefad432..e64d9527f14e 100644 --- a/tools/perf/util/ui/browsers/hists.c +++ b/tools/perf/util/ui/browsers/hists.c | |||
@@ -332,6 +332,13 @@ static int hist_browser__run(struct hist_browser *self, const char *ev_name, | |||
332 | case -1: | 332 | case -1: |
333 | /* FIXME we need to check if it was es.reason == NEWT_EXIT_TIMER */ | 333 | /* FIXME we need to check if it was es.reason == NEWT_EXIT_TIMER */ |
334 | timer(arg); | 334 | timer(arg); |
335 | /* | ||
336 | * The timer may have changed the number of entries. | ||
337 | * XXX: Find better way to keep this in synch, probably | ||
338 | * removing this timer function altogether and just sync | ||
339 | * using the hists->lock... | ||
340 | */ | ||
341 | self->b.nr_entries = self->hists->nr_entries; | ||
335 | hists__browser_title(self->hists, title, sizeof(title), | 342 | hists__browser_title(self->hists, title, sizeof(title), |
336 | ev_name, self->dso_filter, | 343 | ev_name, self->dso_filter, |
337 | self->thread_filter); | 344 | self->thread_filter); |