Skip to content

Commit

Permalink
perf top: Fix the 'E' hotkey, select among multiple events
Browse files Browse the repository at this point in the history
We were not recognizing 'E' as a hotkey due to a bug introduced when
switching to the new, hist_entry based top. Fix it by returning that 'E'
is mapped if evlist->nr_entries > 1.

Reported-by: Mike Galbraith <efault@gmx.de>
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-zcx055vnhagddvqlaqxvdhtb@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
  • Loading branch information
Arnaldo Carvalho de Melo committed Oct 17, 2011
1 parent b079d4e commit b2b7e9e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tools/perf/builtin-top.c
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,7 @@ static int key_mapped(int c)
case 'S':
return 1;
case 'E':
return top.evlist->nr_entries > 1 ? 1 : 0;
default:
break;
}
Expand Down

0 comments on commit b2b7e9e

Please sign in to comment.