diff options
author | Arnaldo Carvalho de Melo <[email protected]> | 2012-04-20 15:57:15 -0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <[email protected]> | 2012-04-20 15:57:15 -0300 |
commit | c4cceae3ba786c136b0cf568359863d74897a48a (patch) | |
tree | d2871fcd8dfd58ed1a1bfcb1faf4019deb2e6ac9 | |
parent | 4ea08b522071c6c34098b7a880aac3551abecd75 (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 <[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]>
-rw-r--r-- | tools/perf/ui/browsers/annotate.c | 13 |
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: ui_helpline__puts("Huh? No selection. Report to [email protected]"); else if (self->selection->offset == -1) ui_helpline__puts("Actions are only available for assembly lines."); - else if (!self->selection->ins || - !(annotate_browser__jump(self) || - annotate_browser__callq(self, evidx, timer, arg, delay_secs))) - ui_helpline__puts("Actions are only available for the 'callq' and jump instructions."); + else if (!self->selection->ins) { + if (strcmp(self->selection->name, "retq")) + goto show_sup_ins; + goto out; + } else if (!(annotate_browser__jump(self) || + annotate_browser__callq(self, evidx, timer, arg, delay_secs))) { +show_sup_ins: + ui_helpline__puts("Actions are only available for 'callq', 'retq' & jump instructions."); + } continue; case K_LEFT: case K_ESC: |