aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/ui/browsers/annotate.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/ui/browsers/annotate.c')
-rw-r--r--tools/perf/ui/browsers/annotate.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/perf/ui/browsers/annotate.c b/tools/perf/ui/browsers/annotate.c
index bdbb54fd05a..46ef966ccc5 100644
--- a/tools/perf/ui/browsers/annotate.c
+++ b/tools/perf/ui/browsers/annotate.c
@@ -266,11 +266,10 @@ static bool annotate_browser__callq(struct annotate_browser *browser,
266 struct symbol *target; 266 struct symbol *target;
267 u64 ip; 267 u64 ip;
268 268
269 if (strcmp(dl->name, "callq")) 269 if (!ins__is_call(dl->ins))
270 return false; 270 return false;
271 271
272 ip = strtoull(dl->operands, NULL, 16); 272 ip = ms->map->map_ip(ms->map, dl->target);
273 ip = ms->map->map_ip(ms->map, ip);
274 target = map__find_symbol(ms->map, ip, NULL); 273 target = map__find_symbol(ms->map, ip, NULL);
275 if (target == NULL) { 274 if (target == NULL) {
276 ui_helpline__puts("The called function was not found."); 275 ui_helpline__puts("The called function was not found.");
@@ -318,7 +317,7 @@ static bool annotate_browser__jump(struct annotate_browser *browser)
318 struct disasm_line *dl = browser->selection; 317 struct disasm_line *dl = browser->selection;
319 s64 idx; 318 s64 idx;
320 319
321 if (!dl->ins || !ins__is_jump(dl->ins)) 320 if (!ins__is_jump(dl->ins))
322 return false; 321 return false;
323 322
324 dl = annotate_browser__find_offset(browser, dl->target, &idx); 323 dl = annotate_browser__find_offset(browser, dl->target, &idx);
@@ -556,7 +555,8 @@ show_help:
556 ui_helpline__puts("Huh? No selection. Report to linux-kernel@vger.kernel.org"); 555 ui_helpline__puts("Huh? No selection. Report to linux-kernel@vger.kernel.org");
557 else if (self->selection->offset == -1) 556 else if (self->selection->offset == -1)
558 ui_helpline__puts("Actions are only available for assembly lines."); 557 ui_helpline__puts("Actions are only available for assembly lines.");
559 else if (!(annotate_browser__jump(self) || 558 else if (!self->selection->ins ||
559 !(annotate_browser__jump(self) ||
560 annotate_browser__callq(self, evidx, timer, arg, delay_secs))) 560 annotate_browser__callq(self, evidx, timer, arg, delay_secs)))
561 ui_helpline__puts("Actions are only available for the 'callq' and jump instructions."); 561 ui_helpline__puts("Actions are only available for the 'callq' and jump instructions.");
562 continue; 562 continue;