diff options
author | Andi Kleen <ak@linux.intel.com> | 2014-11-12 21:05:27 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2014-11-24 16:03:47 -0500 |
commit | 85c116a6cb91a5c09b7a6c95ffc6a6cbd32cd237 (patch) | |
tree | ed4727c432cd2cfbd26a7e27cbed070f112d1df5 /tools/perf/util/annotate.c | |
parent | aaba4e12a99cc56fc8614a3f2a3ec6db4fcde76e (diff) |
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/annotate.c')
-rw-r--r-- | tools/perf/util/annotate.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c index e5670f1af737..79999ceaf2be 100644 --- a/tools/perf/util/annotate.c +++ b/tools/perf/util/annotate.c | |||
@@ -1192,7 +1192,7 @@ static int symbol__get_source_line(struct symbol *sym, struct map *map, | |||
1192 | goto next; | 1192 | goto next; |
1193 | 1193 | ||
1194 | offset = start + i; | 1194 | offset = start + i; |
1195 | src_line->path = get_srcline(map->dso, offset); | 1195 | src_line->path = get_srcline(map->dso, offset, NULL, false); |
1196 | insert_source_line(&tmp_root, src_line); | 1196 | insert_source_line(&tmp_root, src_line); |
1197 | 1197 | ||
1198 | next: | 1198 | next: |