diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c index aef841706dff..aeb5a441bd74 100644 --- a/tools/perf/util/annotate.c +++ b/tools/perf/util/annotate.c @@ -54,7 +54,7 @@ int ins__scnprintf(struct ins *ins, char *bf, size_t size, return ins__raw_scnprintf(ins, bf, size, ops); } -static int call__parse(struct ins_operands *ops, struct map *map __maybe_unused) +static int call__parse(struct ins_operands *ops, struct map *map) { char *endptr, *tok, *name; @@ -84,7 +84,11 @@ static int call__parse(struct ins_operands *ops, struct map *map __maybe_unused) indirect_call: tok = strchr(endptr, '*'); if (tok == NULL) { - ops->target.addr = 0; + struct symbol *sym = map__find_symbol(map, map->map_ip(map, ops->target.addr)); + if (sym != NULL) + ops->target.name = strdup(sym->name); + else + ops->target.addr = 0; return 0; }