aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2012-04-20 14:57:15 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2012-04-20 14:57:15 -0400
commitc4cceae3ba786c136b0cf568359863d74897a48a (patch)
treed2871fcd8dfd58ed1a1bfcb1faf4019deb2e6ac9 /tools
parent4ea08b522071c6c34098b7a880aac3551abecd75 (diff)
perf annotate browser: Handle retq instructions
By just returning to the previous function being annotated or to the top main screen when popping out the base of the annotation stack. 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-x1dlc4d5aukj72g45o15s75k@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/ui/browsers/annotate.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/tools/perf/ui/browsers/annotate.c b/tools/perf/ui/browsers/annotate.c
index d0c606ecda05..38f4c6f821c2 100644
--- a/tools/perf/ui/browsers/annotate.c
+++ b/tools/perf/ui/browsers/annotate.c
@@ -599,10 +599,15 @@ show_help:
599 ui_helpline__puts("Huh? No selection. Report to linux-kernel@vger.kernel.org"); 599 ui_helpline__puts("Huh? No selection. Report to linux-kernel@vger.kernel.org");
600 else if (self->selection->offset == -1) 600 else if (self->selection->offset == -1)
601 ui_helpline__puts("Actions are only available for assembly lines."); 601 ui_helpline__puts("Actions are only available for assembly lines.");
602 else if (!self->selection->ins || 602 else if (!self->selection->ins) {
603 !(annotate_browser__jump(self) || 603 if (strcmp(self->selection->name, "retq"))
604 annotate_browser__callq(self, evidx, timer, arg, delay_secs))) 604 goto show_sup_ins;
605 ui_helpline__puts("Actions are only available for the 'callq' and jump instructions."); 605 goto out;
606 } else if (!(annotate_browser__jump(self) ||
607 annotate_browser__callq(self, evidx, timer, arg, delay_secs))) {
608show_sup_ins:
609 ui_helpline__puts("Actions are only available for 'callq', 'retq' & jump instructions.");
610 }
606 continue; 611 continue;
607 case K_LEFT: 612 case K_LEFT:
608 case K_ESC: 613 case K_ESC: