mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-29 23:53:32 +00:00
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 <ak@linux.intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Link: http://lkml.kernel.org/r/1415844328-4884-8-git-send-email-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
2989ccaac4
commit
2de217688e
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue