From: Arnaldo Carvalho de Melo Date: Thu, 6 Oct 2011 13:46:45 +0000 (-0300) Subject: perf hists browser: Fix TAB/UNTAB use with multiple events X-Git-Tag: v5.15~23925^2~30^2~3 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=7d16320e2315db434b28854c08677e0d15b604f1;p=mirror_ubuntu-kernels.git 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 Cc: Frederic Weisbecker Cc: Mike Galbraith Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lkml.kernel.org/n/tip-3xqqh3fwmt914gg43frey14y@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- 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'):