summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/ui/browser.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2011-10-14 09:31:53 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2011-10-14 12:48:14 -0300
commit437cfe7a37df07e2201036fb0903cadae6b08e74 (patch)
tree8967d5f800d2e5c918933e747b47c98ee85566a4 /tools/perf/util/ui/browser.c
parent18eaf0b8e60a2fa54667b2192197970174f1c061 (diff)
downloadop-kernel-dev-437cfe7a37df07e2201036fb0903cadae6b08e74.zip
op-kernel-dev-437cfe7a37df07e2201036fb0903cadae6b08e74.tar.gz
perf hists browser: Invalidate ui_browser->top after timer calls
With underlying dynamic data structures we need to invalidate pointers to them after a timer, as that entry may have vanished (decayed in top, for instance). I forgot about browser_ui->top. Fix it by resetting it to null after a timer. The seek operation from SEEK_SET will then set it to a valid entry because it starts from rb_first(&hists->entries). Reported-by: Ingo Molnar <mingo@elte.hu> 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-2ssjm0ouh9tsz4dwkcu7c40n@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/ui/browser.c')
-rw-r--r--tools/perf/util/ui/browser.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/perf/util/ui/browser.c b/tools/perf/util/ui/browser.c
index 2923c49..078ceaf 100644
--- a/tools/perf/util/ui/browser.c
+++ b/tools/perf/util/ui/browser.c
@@ -249,6 +249,7 @@ void ui_browser__update_nr_entries(struct ui_browser *browser, u32 nr_entries)
browser->top_idx += offset;
}
+ browser->top = NULL;
browser->seek(browser, browser->top_idx, SEEK_SET);
}
OpenPOWER on IntegriCloud