summaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-c2c.c
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@kernel.org>2016-08-17 15:54:58 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2016-10-21 10:32:00 -0300
commit9a406eb610e3676611ce3e32d2e6c55ccc7e5d61 (patch)
tree77cbb290ed8f3aab1e05bbfdbc837e02932cdcab /tools/perf/builtin-c2c.c
parent1a56a42534da8f1d2faf8df99787833ce67e8fdb (diff)
downloadlinux-9a406eb610e3676611ce3e32d2e6c55ccc7e5d61.tar.bz2
perf c2c report: Add help windows
Adding help windows to display key/action mappings for both browsers. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Andi Kleen <andi@firstfloor.org> Cc: David Ahern <dsahern@gmail.com> Cc: Don Zickus <dzickus@redhat.com> Cc: Joe Mario <jmario@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/n/tip-zni4apopx6a9eyxsosm1ebh1@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-c2c.c')
-rw-r--r--tools/perf/builtin-c2c.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c
index 205939527945..4af66835bcb7 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;
}