[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1476975876-2522-50-git-send-email-acme@kernel.org>
Date: Thu, 20 Oct 2016 12:04:33 -0300
From: Arnaldo Carvalho de Melo <acme@...nel.org>
To: Ingo Molnar <mingo@...nel.org>
Cc: linux-kernel@...r.kernel.org, Linux Weekly News <lwn@....net>,
Jiri Olsa <jolsa@...nel.org>, Andi Kleen <andi@...stfloor.org>,
David Ahern <dsahern@...il.com>,
Don Zickus <dzickus@...hat.com>, Joe Mario <jmario@...hat.com>,
Namhyung Kim <namhyung@...nel.org>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Arnaldo Carvalho de Melo <acme@...hat.com>
Subject: [PATCH 49/52] perf c2c report: Add help windows
From: Jiri Olsa <jolsa@...nel.org>
Adding help windows to display key/action mappings
for both browsers.
Signed-off-by: Jiri Olsa <jolsa@...nel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@...hat.com>
Cc: Andi Kleen <andi@...stfloor.org>
Cc: David Ahern <dsahern@...il.com>
Cc: Don Zickus <dzickus@...hat.com>
Cc: Joe Mario <jmario@...hat.com>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Link: http://lkml.kernel.org/n/tip-zni4apopx6a9eyxsosm1ebh1@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
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 27eef205a774..3fc18264d4d1 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;
}
--
2.7.4
Powered by blists - more mailing lists