summaryrefslogtreecommitdiff
path: root/tools/perf/util/util.h
diff options
context:
space:
mode:
authorAndi Kleen <ak@linux.intel.com>2014-11-13 05:05:27 +0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2014-11-25 00:03:47 +0300
commit85c116a6cb91a5c09b7a6c95ffc6a6cbd32cd237 (patch)
treeed4727c432cd2cfbd26a7e27cbed070f112d1df5 /tools/perf/util/util.h
parentaaba4e12a99cc56fc8614a3f2a3ec6db4fcde76e (diff)
downloadlinux-85c116a6cb91a5c09b7a6c95ffc6a6cbd32cd237.tar.xz
perf callchain: Make get_srcline fall back to sym+offset
When the source line is not found fall back to sym + offset. This is generally much more useful than a raw address. For this we need to pass in the symbol from the caller. For some callers it's awkward to compute, so we stay at the old behaviour. 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-10-git-send-email-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/util.h')
-rw-r--r--tools/perf/util/util.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/perf/util/util.h b/tools/perf/util/util.h
index 76d23d83eae5..419bee030f83 100644
--- a/tools/perf/util/util.h
+++ b/tools/perf/util/util.h
@@ -337,8 +337,10 @@ static inline int path__join3(char *bf, size_t size,
}
struct dso;
+struct symbol;
-char *get_srcline(struct dso *dso, unsigned long addr);
+char *get_srcline(struct dso *dso, unsigned long addr, struct symbol *sym,
+ bool show_sym);
void free_srcline(char *srcline);
int filename__read_int(const char *filename, int *value);