diff options
author | Adrian Hunter <adrian.hunter@intel.com> | 2013-08-07 14:38:46 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-08-07 17:35:31 -0300 |
commit | 5b7ba82a75915e739709d0ace4bb559cb280db09 (patch) | |
tree | cc42fe77866affa6b83dd0945e260427f88761d8 /tools/perf/tests/code-reading.c | |
parent | b55ae0a976f2927ea8f15a85c43bbe6d25a68a41 (diff) | |
download | kernel_goldelico_gta04-5b7ba82a75915e739709d0ace4bb559cb280db09.zip kernel_goldelico_gta04-5b7ba82a75915e739709d0ace4bb559cb280db09.tar.gz kernel_goldelico_gta04-5b7ba82a75915e739709d0ace4bb559cb280db09.tar.bz2 |
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/tests/code-reading.c')
-rw-r--r-- | tools/perf/tests/code-reading.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/tests/code-reading.c b/tools/perf/tests/code-reading.c index 28bee62..0c7b052 100644 --- a/tools/perf/tests/code-reading.c +++ b/tools/perf/tests/code-reading.c @@ -138,7 +138,7 @@ static int read_object_code(u64 addr, size_t len, u8 cpumode, pr_debug("Reading object code for memory address: %#"PRIx64"\n", addr); thread__find_addr_map(thread, machine, cpumode, MAP__FUNCTION, addr, - &al); + &al, NULL); if (!al.map || !al.map->dso) { pr_debug("thread__find_addr_map failed\n"); return -1; |