if (!self->ms.map)
goto out_ip;
- if (!strncmp(self->ms.map->dso->long_name, "/tmp/perf-", 10))
- goto out_ip;
-
path = get_srcline(self->ms.map->dso->long_name, self->ip);
self->srcline = path;
{
char *file;
unsigned line;
- char *srcline;
+ char *srcline = SRCLINE_UNKNOWN;
size_t size;
+ if (dso_name[0] == '[')
+ goto out;
+
+ if (!strncmp(dso_name, "/tmp/perf-", 10))
+ goto out;
+
if (!addr2line(dso_name, addr, &file, &line))
- return SRCLINE_UNKNOWN;
+ goto out;
/* just calculate actual length */
size = snprintf(NULL, 0, "%s:%u", file, line) + 1;
srcline = SRCLINE_UNKNOWN;
free(file);
+out:
return srcline;
}