diff options
author | Namhyung Kim <namhyung.kim@lge.com> | 2013-12-26 00:37:58 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-12-26 09:22:02 -0500 |
commit | e8e684a58b9bddde3fdb1a65cd26eb7a3e1e746e (patch) | |
tree | 4906ff7b1eed0e914a3614dffe8be58288860b64 /tools/perf | |
parent | 5c743cf573e6974befe917ed4a36d42b39ef1ce0 (diff) |
perf ui/tui: Split help message for perf top and report
Some hotkeys don't work for perf top so split help messages for them.
It'll be helpful to a future modification. Also sort the message by
alphabetical order of the hotkey.
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1388036284-32342-3-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf')
-rw-r--r-- | tools/perf/ui/browsers/hists.c | 49 |
1 files changed, 30 insertions, 19 deletions
diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c index a440e03cd8c2..d43ec79ea4e3 100644 --- a/tools/perf/ui/browsers/hists.c +++ b/tools/perf/ui/browsers/hists.c | |||
@@ -1400,6 +1400,35 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events, | |||
1400 | char script_opt[64]; | 1400 | char script_opt[64]; |
1401 | int delay_secs = hbt ? hbt->refresh : 0; | 1401 | int delay_secs = hbt ? hbt->refresh : 0; |
1402 | 1402 | ||
1403 | #define HIST_BROWSER_HELP_COMMON \ | ||
1404 | "h/?/F1 Show this window\n" \ | ||
1405 | "UP/DOWN/PGUP\n" \ | ||
1406 | "PGDN/SPACE Navigate\n" \ | ||
1407 | "q/ESC/CTRL+C Exit browser\n\n" \ | ||
1408 | "For multiple event sessions:\n\n" \ | ||
1409 | "TAB/UNTAB Switch events\n\n" \ | ||
1410 | "For symbolic views (--sort has sym):\n\n" \ | ||
1411 | "-> Zoom into DSO/Threads & Annotate current symbol\n" \ | ||
1412 | "<- Zoom out\n" \ | ||
1413 | "a Annotate current symbol\n" \ | ||
1414 | "C Collapse all callchains\n" \ | ||
1415 | "d Zoom into current DSO\n" \ | ||
1416 | "E Expand all callchains\n" \ | ||
1417 | |||
1418 | /* help messages are sorted by lexical order of the hotkey */ | ||
1419 | const char report_help[] = HIST_BROWSER_HELP_COMMON | ||
1420 | "P Print histograms to perf.hist.N\n" | ||
1421 | "r Run available scripts\n" | ||
1422 | "s Switch to another data file in PWD\n" | ||
1423 | "t Zoom into current Thread\n" | ||
1424 | "V Verbose (DSO names in callchains, etc)\n" | ||
1425 | "/ Filter symbol by name"; | ||
1426 | const char top_help[] = HIST_BROWSER_HELP_COMMON | ||
1427 | "P Print histograms to perf.hist.N\n" | ||
1428 | "t Zoom into current Thread\n" | ||
1429 | "V Verbose (DSO names in callchains, etc)\n" | ||
1430 | "/ Filter symbol by name"; | ||
1431 | |||
1403 | if (browser == NULL) | 1432 | if (browser == NULL) |
1404 | return -1; | 1433 | return -1; |
1405 | 1434 | ||
@@ -1488,25 +1517,7 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events, | |||
1488 | case 'h': | 1517 | case 'h': |
1489 | case '?': | 1518 | case '?': |
1490 | ui_browser__help_window(&browser->b, | 1519 | ui_browser__help_window(&browser->b, |
1491 | "h/?/F1 Show this window\n" | 1520 | is_report_browser(hbt) ? report_help : top_help); |
1492 | "UP/DOWN/PGUP\n" | ||
1493 | "PGDN/SPACE Navigate\n" | ||
1494 | "q/ESC/CTRL+C Exit browser\n\n" | ||
1495 | "For multiple event sessions:\n\n" | ||
1496 | "TAB/UNTAB Switch events\n\n" | ||
1497 | "For symbolic views (--sort has sym):\n\n" | ||
1498 | "-> Zoom into DSO/Threads & Annotate current symbol\n" | ||
1499 | "<- Zoom out\n" | ||
1500 | "a Annotate current symbol\n" | ||
1501 | "C Collapse all callchains\n" | ||
1502 | "E Expand all callchains\n" | ||
1503 | "d Zoom into current DSO\n" | ||
1504 | "t Zoom into current Thread\n" | ||
1505 | "r Run available scripts('perf report' only)\n" | ||
1506 | "s Switch to another data file in PWD ('perf report' only)\n" | ||
1507 | "P Print histograms to perf.hist.N\n" | ||
1508 | "V Verbose (DSO names in callchains, etc)\n" | ||
1509 | "/ Filter symbol by name"); | ||
1510 | continue; | 1521 | continue; |
1511 | case K_ENTER: | 1522 | case K_ENTER: |
1512 | case K_RIGHT: | 1523 | case K_RIGHT: |