summaryrefslogtreecommitdiff
path: root/tools/perf/util/srcline.c
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung.kim@lge.com>2013-09-11 09:09:30 +0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2013-10-09 23:01:44 +0400
commit86c98cab5a3137376ea7df5ffa5bd52e545fee95 (patch)
tree35e8a5fe7d0e1df6f1b00d4d9b5eaf63dc38299f /tools/perf/util/srcline.c
parent58d91a0068694a5ba3efc99e88ce6b4b0dd0d085 (diff)
downloadlinux-86c98cab5a3137376ea7df5ffa5bd52e545fee95.tar.xz
perf annotate: Pass dso instead of dso_name to get_srcline()
This is a preparation of next change. No functional changes are intended. Signed-off-by: Namhyung Kim <namhyung@kernel.org> Reviewed-by: Jiri Olsa <jolsa@redhat.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1378876173-13363-7-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/srcline.c')
-rw-r--r--tools/perf/util/srcline.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/perf/util/srcline.c b/tools/perf/util/srcline.c
index 777f91880cdb..c736d9428cf2 100644
--- a/tools/perf/util/srcline.c
+++ b/tools/perf/util/srcline.c
@@ -4,6 +4,7 @@
#include <linux/kernel.h>
+#include "util/dso.h"
#include "util/util.h"
#include "util/debug.h"
@@ -53,11 +54,12 @@ out:
return ret;
}
-char *get_srcline(const char *dso_name, unsigned long addr)
+char *get_srcline(struct dso *dso, unsigned long addr)
{
char *file;
unsigned line;
char *srcline = SRCLINE_UNKNOWN;
+ char *dso_name = dso->long_name;
size_t size;
if (dso_name[0] == '[')