From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964803AbcJVI5K (ORCPT ); Sat, 22 Oct 2016 04:57:10 -0400 Received: from terminus.zytor.com ([198.137.202.10]:57962 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936456AbcJVI5I (ORCPT ); Sat, 22 Oct 2016 04:57:08 -0400 Date: Sat, 22 Oct 2016 01:56:54 -0700 From: tip-bot for Jiri Olsa Message-ID: Cc: jolsa@kernel.org, dzickus@redhat.com, hpa@zytor.com, tglx@linutronix.de, jmario@redhat.com, mingo@kernel.org, andi@firstfloor.org, dsahern@gmail.com, linux-kernel@vger.kernel.org, acme@redhat.com, a.p.zijlstra@chello.nl, namhyung@kernel.org Reply-To: tglx@linutronix.de, hpa@zytor.com, mingo@kernel.org, andi@firstfloor.org, jmario@redhat.com, jolsa@kernel.org, dzickus@redhat.com, acme@redhat.com, a.p.zijlstra@chello.nl, namhyung@kernel.org, dsahern@gmail.com, linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf c2c report: Add help windows Git-Commit-ID: 9a406eb610e3676611ce3e32d2e6c55ccc7e5d61 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 9a406eb610e3676611ce3e32d2e6c55ccc7e5d61 Gitweb: http://git.kernel.org/tip/9a406eb610e3676611ce3e32d2e6c55ccc7e5d61 Author: Jiri Olsa AuthorDate: Wed, 17 Aug 2016 15:54:58 +0200 Committer: Arnaldo Carvalho de Melo CommitDate: Fri, 21 Oct 2016 10:32:00 -0300 perf c2c report: Add help windows Adding help windows to display key/action mappings for both browsers. Signed-off-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: Andi Kleen Cc: David Ahern Cc: Don Zickus Cc: Joe Mario Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/n/tip-zni4apopx6a9eyxsosm1ebh1@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/builtin-c2c.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c index 2059395..4af6683 100644 --- a/tools/perf/builtin-c2c.c +++ b/tools/perf/builtin-c2c.c @@ -2181,6 +2181,11 @@ static int perf_c2c__browse_cacheline(struct hist_entry *he) struct c2c_cacheline_browser *cl_browser; struct hist_browser *browser; int key = -1; + const char help[] = + " ENTER Togle callchains (if present) \n" + " n Togle Node details info \n" + " s Togle full lenght of symbol and source line columns \n" + " q Return back to cacheline list \n"; /* Display compact version first. */ c2c.symbol_full = false; @@ -2201,7 +2206,7 @@ static int perf_c2c__browse_cacheline(struct hist_entry *he) c2c_browser__update_nr_entries(browser); while (1) { - key = hist_browser__run(browser, "help"); + key = hist_browser__run(browser, "? - help"); switch (key) { case 's': @@ -2213,6 +2218,9 @@ static int perf_c2c__browse_cacheline(struct hist_entry *he) break; case 'q': goto out; + case '?': + ui_browser__help_window(&browser->b, help); + break; default: break; } @@ -2251,6 +2259,10 @@ static int perf_c2c__hists_browse(struct hists *hists) { struct hist_browser *browser; int key = -1; + const char help[] = + " d Display cacheline details \n" + " ENTER Togle callchains (if present) \n" + " q Quit \n"; browser = perf_c2c_browser__new(hists); if (browser == NULL) @@ -2263,7 +2275,7 @@ static int perf_c2c__hists_browse(struct hists *hists) c2c_browser__update_nr_entries(browser); while (1) { - key = hist_browser__run(browser, "help"); + key = hist_browser__run(browser, "? - help"); switch (key) { case 'q': @@ -2271,6 +2283,9 @@ static int perf_c2c__hists_browse(struct hists *hists) case 'd': perf_c2c__browse_cacheline(browser->he_selection); break; + case '?': + ui_browser__help_window(&browser->b, help); + break; default: break; }