]> git.baikalelectronics.ru Git - kernel.git/commit
perf tools: Fix module symbol loading bug
authorMike Galbraith <efault@gmx.de>
Wed, 23 Sep 2009 09:20:58 +0000 (11:20 +0200)
committerIngo Molnar <mingo@elte.hu>
Wed, 23 Sep 2009 11:45:48 +0000 (13:45 +0200)
commit7f93b7244488fb3ba93b8ef007a42be1095f1b43
tree31af0531c1c74d4d64ad3ed6a6527db5458feceb
parent945a229f298639d6f2af6c5aa95a015168855655
perf tools: Fix module symbol loading bug

Avi Kivity reported 'perf annotate' failures with modules, the
requested function was not annotated.

If there are no modules currently loaded, or the last module
scanned is not loaded, dso__load_modules() steps on the value from
dso__load_vmlinux(), so we happily load the kallsyms symbols on top
of what we've already loaded.

Fix that such that the total count of symbols loaded is returned.
Should module symbol load fail after parsing of vmlinux, is's a
hard failure, so do not silently fall-back to kallsyms.

Reported-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Mike Galbraith <efault@gmx.de>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: rostedt@goodmis.org
Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Masami Hiramatsu <mhiramat@redhat.com>
LKML-Reference: <1253697658.11461.36.camel@marge.simson.net>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
tools/perf/util/symbol.c