aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/util/unwind.c
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2013-08-07 14:38:46 +0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2013-08-07 17:35:31 -0300
commit5b7ba82a75915e739709d0ace4bb559cb280db09 (patch)
treecc42fe77866affa6b83dd0945e260427f88761d8 /tools/perf/util/unwind.c
parentb55ae0a976f2927ea8f15a85c43bbe6d25a68a41 (diff)
perf symbols: Load kernel maps before using
In order to use kernel maps to read object code, those maps must be adjusted to map to the dso file offset. Because lazy-initialization is used, that is not done until symbols are loaded. However the maps are first used by thread__find_addr_map() before symbols are loaded. So this patch changes thread__find_addr() to "load" kernel maps before using them. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Namhyung Kim <namhyung@gmail.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/r/1375875537-4509-3-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/unwind.c')
-rw-r--r--tools/perf/util/unwind.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/util/unwind.c b/tools/perf/util/unwind.c
index 958723ba3d2..5bbd4947c27 100644
--- a/tools/perf/util/unwind.c
+++ b/tools/perf/util/unwind.c
@@ -272,7 +272,7 @@ static struct map *find_map(unw_word_t ip, struct unwind_info *ui)
struct addr_location al;
thread__find_addr_map(ui->thread, ui->machine, PERF_RECORD_MISC_USER,
- MAP__FUNCTION, ip, &al);
+ MAP__FUNCTION, ip, &al, NULL);
return al.map;
}
@@ -349,7 +349,7 @@ static int access_dso_mem(struct unwind_info *ui, unw_word_t addr,
ssize_t size;
thread__find_addr_map(ui->thread, ui->machine, PERF_RECORD_MISC_USER,
- MAP__FUNCTION, addr, &al);
+ MAP__FUNCTION, addr, &al, NULL);
if (!al.map) {
pr_debug("unwind: no map for %lx\n", (unsigned long)addr);
return -1;