Skip to content

Commit c4cceae

Browse files
committed
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]>
1 parent 4ea08b5 commit c4cceae

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

tools/perf/ui/browsers/annotate.c

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -599,10 +599,15 @@ static int annotate_browser__run(struct annotate_browser *self, int evidx,
599599
ui_helpline__puts("Huh? No selection. Report to [email protected]");
600600
else if (self->selection->offset == -1)
601601
ui_helpline__puts("Actions are only available for assembly lines.");
602-
else if (!self->selection->ins ||
603-
!(annotate_browser__jump(self) ||
604-
annotate_browser__callq(self, evidx, timer, arg, delay_secs)))
605-
ui_helpline__puts("Actions are only available for the 'callq' and jump instructions.");
602+
else if (!self->selection->ins) {
603+
if (strcmp(self->selection->name, "retq"))
604+
goto show_sup_ins;
605+
goto out;
606+
} else if (!(annotate_browser__jump(self) ||
607+
annotate_browser__callq(self, evidx, timer, arg, delay_secs))) {
608+
show_sup_ins:
609+
ui_helpline__puts("Actions are only available for 'callq', 'retq' & jump instructions.");
610+
}
606611
continue;
607612
case K_LEFT:
608613
case K_ESC:

0 commit comments

Comments
 (0)