Skip to content

Commit 54e7a4e

Browse files
committed
perf annotate browser: Add key bindings help window
Cc: David Ahern <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: Mike Galbraith <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Stephane Eranian <[email protected]> Link: http://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent 2402e4a commit 54e7a4e

File tree

1 file changed

+18
-7
lines changed

1 file changed

+18
-7
lines changed

tools/perf/ui/browsers/annotate.c

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -581,10 +581,7 @@ static int annotate_browser__run(struct annotate_browser *self, int evidx,
581581
struct rb_node *nd = NULL;
582582
struct map_symbol *ms = self->b.priv;
583583
struct symbol *sym = ms->sym;
584-
const char *help = "<-/ESC: Exit, TAB/shift+TAB: Cycle hot lines, "
585-
"H: Hottest line, ->/ENTER: Line action, "
586-
"O: Offset view, "
587-
"S: Source view";
584+
const char *help = "Press 'h' for help on key bindings";
588585
int key;
589586

590587
if (ui_browser__show(&self->b, sym->name, help) < 0)
@@ -637,16 +634,30 @@ static int annotate_browser__run(struct annotate_browser *self, int evidx,
637634
else
638635
nd = self->curr_hot;
639636
break;
640-
case 'H':
637+
case K_F1:
641638
case 'h':
639+
ui_browser__help_window(&self->b,
640+
"UP/DOWN/PGUP\n"
641+
"PGDN/SPACE Navigate\n"
642+
"q/ESC/CTRL+C Exit\n\n"
643+
"-> Go to target\n"
644+
"<- Exit\n"
645+
"h Cycle thru hottest instructions\n"
646+
"j Toggle showing jump to target arrows\n"
647+
"J Toggle showing number of jump sources on targets\n"
648+
"n Search next string\n"
649+
"o Toggle disassembler output/simplified view\n"
650+
"s Toggle source code view\n"
651+
"/ Search string\n"
652+
"? Search previous string\n");
653+
continue;
654+
case 'H':
642655
nd = self->curr_hot;
643656
break;
644-
case 'S':
645657
case 's':
646658
if (annotate_browser__toggle_source(self))
647659
ui_helpline__puts(help);
648660
continue;
649-
case 'O':
650661
case 'o':
651662
self->use_offset = !self->use_offset;
652663
if (self->use_offset)

0 commit comments

Comments
 (0)