perf symbols: Load kernel maps before using
authorAdrian Hunter <adrian.hunter@intel.com>
Wed, 7 Aug 2013 11:38:46 +0000 (14:38 +0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 7 Aug 2013 20:35:31 +0000 (17:35 -0300)
commit5b7ba82a75915e739709d0ace4bb559cb280db09
treecc42fe77866affa6b83dd0945e260427f88761d8
parentb55ae0a976f2927ea8f15a85c43bbe6d25a68a41
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>
tools/perf/builtin-inject.c
tools/perf/builtin-script.c
tools/perf/tests/code-reading.c
tools/perf/util/build-id.c
tools/perf/util/event.c
tools/perf/util/thread.h
tools/perf/util/unwind.c