diff options
author | Andi Kleen <[email protected]> | 2014-11-12 18:05:25 -0800 |
---|---|---|
committer | Arnaldo Carvalho de Melo <[email protected]> | 2014-11-19 12:33:47 -0300 |
commit | 2de217688e8f086bf6d920d530401b56fcbc6eff (patch) | |
tree | c7cd0c4ee9e4a8c47f2e918f97768936fa5ce781 | |
parent | 2989ccaac48f8c3da7f77101bbf98e0ea8773d83 (diff) |
perf tools: Only print base source file for srcline
For perf report with --sort srcline only print the base source file
name. This makes the results generally fit much better to the screen.
The path is usually not that useful anyways because it is often from
different systems.
Signed-off-by: Andi Kleen <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Namhyung Kim <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
-rw-r--r-- | tools/perf/util/srcline.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/util/srcline.c b/tools/perf/util/srcline.c index f3e4bc5fe5d2..77c180637138 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; } |