From: Arnaldo Carvalho de Melo Date: Mon, 17 Oct 2011 11:10:24 +0000 (-0200) Subject: perf top: Fix the 'E' hotkey, select among multiple events X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b2b7e9eb2983e24b0296a93171f811d95f044fbc;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git perf top: Fix the 'E' hotkey, select among multiple events 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 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-zcx055vnhagddvqlaqxvdhtb@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c index bf368f1663d1..7a871714d44e 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; }