aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/ui/browsers/annotate.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2012-05-12 15:36:55 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2012-05-12 15:36:55 -0400
commit54e7a4e88eed9ac423e22a259ec51a973fd59bab (patch)
treea15295eb3489e9ace0b6c55c595366665e939084 /tools/perf/ui/browsers/annotate.c
parent2402e4a936a02a24772c9823e1fd2085f0e8ec93 (diff)
perf annotate browser: Add key bindings help window
Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Namhyung Kim <namhyung@gmail.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/n/tip-1txmtzf71eqie5xcukbfxors@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/ui/browsers/annotate.c')
-rw-r--r--tools/perf/ui/browsers/annotate.c25
1 files changed, 18 insertions, 7 deletions
diff --git a/tools/perf/ui/browsers/annotate.c b/tools/perf/ui/browsers/annotate.c
index 547bd352118d..6e0ef79be169 100644
--- a/tools/perf/ui/browsers/annotate.c
+++ b/tools/perf/ui/browsers/annotate.c
@@ -581,10 +581,7 @@ static int annotate_browser__run(struct annotate_browser *self, int evidx,
581 struct rb_node *nd = NULL; 581 struct rb_node *nd = NULL;
582 struct map_symbol *ms = self->b.priv; 582 struct map_symbol *ms = self->b.priv;
583 struct symbol *sym = ms->sym; 583 struct symbol *sym = ms->sym;
584 const char *help = "<-/ESC: Exit, TAB/shift+TAB: Cycle hot lines, " 584 const char *help = "Press 'h' for help on key bindings";
585 "H: Hottest line, ->/ENTER: Line action, "
586 "O: Offset view, "
587 "S: Source view";
588 int key; 585 int key;
589 586
590 if (ui_browser__show(&self->b, sym->name, help) < 0) 587 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,
637 else 634 else
638 nd = self->curr_hot; 635 nd = self->curr_hot;
639 break; 636 break;
640 case 'H': 637 case K_F1:
641 case 'h': 638 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':
642 nd = self->curr_hot; 655 nd = self->curr_hot;
643 break; 656 break;
644 case 'S':
645 case 's': 657 case 's':
646 if (annotate_browser__toggle_source(self)) 658 if (annotate_browser__toggle_source(self))
647 ui_helpline__puts(help); 659 ui_helpline__puts(help);
648 continue; 660 continue;
649 case 'O':
650 case 'o': 661 case 'o':
651 self->use_offset = !self->use_offset; 662 self->use_offset = !self->use_offset;
652 if (self->use_offset) 663 if (self->use_offset)