lkml.org 
[lkml]   [2016]   [Sep]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 56/57] perf c2c report: Add help windows
Date
Adding help windows to display key/action mappings
for both browsers.

Link: http://lkml.kernel.org/n/tip-zni4apopx6a9eyxsosm1ebh1@git.kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
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 3728e6c7d0cd..dce3e32cef75 100644
--- a/tools/perf/builtin-c2c.c
+++ b/tools/perf/builtin-c2c.c
@@ -2175,6 +2175,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;
@@ -2195,7 +2200,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':
@@ -2207,6 +2212,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;
}
@@ -2245,6 +2253,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)
@@ -2257,7 +2269,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':
@@ -2265,6 +2277,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
\
 
 \ /
  Last update: 2016-09-23 00:03    [W:0.529 / U:0.492 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site