perf tools: Support full source file paths for srcline
[deliverable/linux.git] / tools / perf / util / srcline.c
index c93fb0c5bd0b197190f7fbe6af9cf1840d274c4d..fc08248f08ca703b0a4330169535264854d5478c 100644 (file)
@@ -10,6 +10,8 @@
 
 #include "symbol.h"
 
+bool srcline_full_filename;
+
 #ifdef HAVE_LIBBFD_SUPPORT
 
 /*
@@ -277,7 +279,9 @@ char *get_srcline(struct dso *dso, u64 addr, struct symbol *sym,
        if (!addr2line(dso_name, addr, &file, &line, dso))
                goto out;
 
-       if (asprintf(&srcline, "%s:%u", basename(file), line) < 0) {
+       if (asprintf(&srcline, "%s:%u",
+                               srcline_full_filename ? file : basename(file),
+                               line) < 0) {
                free(file);
                goto out;
        }
This page took 0.026388 seconds and 5 git commands to generate.