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.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 4ea08b52
...@@ -599,10 +599,15 @@ static int annotate_browser__run(struct annotate_browser *self, int evidx, ...@@ -599,10 +599,15 @@ static int annotate_browser__run(struct annotate_browser *self, int evidx,
ui_helpline__puts("Huh? No selection. Report to linux-kernel@vger.kernel.org"); ui_helpline__puts("Huh? No selection. Report to linux-kernel@vger.kernel.org");
else if (self->selection->offset == -1) else if (self->selection->offset == -1)
ui_helpline__puts("Actions are only available for assembly lines."); ui_helpline__puts("Actions are only available for assembly lines.");
else if (!self->selection->ins || else if (!self->selection->ins) {
!(annotate_browser__jump(self) || if (strcmp(self->selection->name, "retq"))
annotate_browser__callq(self, evidx, timer, arg, delay_secs))) goto show_sup_ins;
ui_helpline__puts("Actions are only available for the 'callq' and jump instructions."); 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; continue;
case K_LEFT: case K_LEFT:
case K_ESC: case K_ESC:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment