Commit 9a406eb6 authored by Jiri Olsa's avatar Jiri Olsa Committed by Arnaldo Carvalho de Melo

perf c2c report: Add help windows

Adding help windows to display key/action mappings
for both browsers.
Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
Tested-by: default avatarArnaldo 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.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 1a56a425
...@@ -2181,6 +2181,11 @@ static int perf_c2c__browse_cacheline(struct hist_entry *he) ...@@ -2181,6 +2181,11 @@ static int perf_c2c__browse_cacheline(struct hist_entry *he)
struct c2c_cacheline_browser *cl_browser; struct c2c_cacheline_browser *cl_browser;
struct hist_browser *browser; struct hist_browser *browser;
int key = -1; 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. */ /* Display compact version first. */
c2c.symbol_full = false; c2c.symbol_full = false;
...@@ -2201,7 +2206,7 @@ static int perf_c2c__browse_cacheline(struct hist_entry *he) ...@@ -2201,7 +2206,7 @@ static int perf_c2c__browse_cacheline(struct hist_entry *he)
c2c_browser__update_nr_entries(browser); c2c_browser__update_nr_entries(browser);
while (1) { while (1) {
key = hist_browser__run(browser, "help"); key = hist_browser__run(browser, "? - help");
switch (key) { switch (key) {
case 's': case 's':
...@@ -2213,6 +2218,9 @@ static int perf_c2c__browse_cacheline(struct hist_entry *he) ...@@ -2213,6 +2218,9 @@ static int perf_c2c__browse_cacheline(struct hist_entry *he)
break; break;
case 'q': case 'q':
goto out; goto out;
case '?':
ui_browser__help_window(&browser->b, help);
break;
default: default:
break; break;
} }
...@@ -2251,6 +2259,10 @@ static int perf_c2c__hists_browse(struct hists *hists) ...@@ -2251,6 +2259,10 @@ static int perf_c2c__hists_browse(struct hists *hists)
{ {
struct hist_browser *browser; struct hist_browser *browser;
int key = -1; 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); browser = perf_c2c_browser__new(hists);
if (browser == NULL) if (browser == NULL)
...@@ -2263,7 +2275,7 @@ static int perf_c2c__hists_browse(struct hists *hists) ...@@ -2263,7 +2275,7 @@ static int perf_c2c__hists_browse(struct hists *hists)
c2c_browser__update_nr_entries(browser); c2c_browser__update_nr_entries(browser);
while (1) { while (1) {
key = hist_browser__run(browser, "help"); key = hist_browser__run(browser, "? - help");
switch (key) { switch (key) {
case 'q': case 'q':
...@@ -2271,6 +2283,9 @@ static int perf_c2c__hists_browse(struct hists *hists) ...@@ -2271,6 +2283,9 @@ static int perf_c2c__hists_browse(struct hists *hists)
case 'd': case 'd':
perf_c2c__browse_cacheline(browser->he_selection); perf_c2c__browse_cacheline(browser->he_selection);
break; break;
case '?':
ui_browser__help_window(&browser->b, help);
break;
default: default:
break; break;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment