summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2011-10-06 10:46:45 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2011-10-07 17:01:04 -0300
commit7d16320e2315db434b28854c08677e0d15b604f1 (patch)
tree4d66882be91241d541dd97f7ee5080983b141230 /tools
parent724c9c9f20c7a0ebd9a728391f5adcfd4a76628b (diff)
perf hists browser: Fix TAB/UNTAB use with multiple events
When requesting multiple events, say: # perf top -e instructions -e cycles -e cache-misses The first screen lets the user chose what to see first, then to switch one can either use the left key to get back to the event menu or simply use TAB to go the next and shift+TAB to go the prev. When using TAB/UNTAB the call to perf_evlist__set_selected(event) was missing, fix it. 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-3xqqh3fwmt914gg43frey14y@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/util/ui/browsers/hists.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/perf/util/ui/browsers/hists.c b/tools/perf/util/ui/browsers/hists.c
index b7901099eedb..ef6ccefad432 100644
--- a/tools/perf/util/ui/browsers/hists.c
+++ b/tools/perf/util/ui/browsers/hists.c
@@ -1107,12 +1107,14 @@ browse_hists:
pos = list_entry(evlist->entries.next, struct perf_evsel, node);
else
pos = list_entry(pos->node.next, struct perf_evsel, node);
+ perf_evlist__set_selected(evlist, pos);
goto browse_hists;
case NEWT_KEY_UNTAB:
if (pos->node.prev == &evlist->entries)
pos = list_entry(evlist->entries.prev, struct perf_evsel, node);
else
pos = list_entry(pos->node.prev, struct perf_evsel, node);
+ perf_evlist__set_selected(evlist, pos);
goto browse_hists;
case 'q':
case CTRL('c'):