lkml.org 
[lkml]   [2011]   [Oct]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/3] perf top: Fix the 'E' hotkey, select among multiple events
Date
From: Arnaldo Carvalho de Melo <acme@redhat.com>

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>
---
tools/perf/builtin-top.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index bf368f1..7a87171 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -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;
}
--
1.6.2.5


\
 
 \ /
  Last update: 2011-10-17 15:57    [W:0.039 / U:0.432 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site