diff --git a/tools/perf/util/srcline.c b/tools/perf/util/srcline.c index f3e4bc5fe5d214444594193197509fe161bf7104..77c180637138b6c00703e7bd5bcf2600d501adda 100644 --- a/tools/perf/util/srcline.c +++ b/tools/perf/util/srcline.c @@ -274,7 +274,7 @@ char *get_srcline(struct dso *dso, unsigned long addr) if (!addr2line(dso_name, addr, &file, &line, dso)) goto out; - if (asprintf(&srcline, "%s:%u", file, line) < 0) { + if (asprintf(&srcline, "%s:%u", basename(file), line) < 0) { free(file); goto out; }