]> git.baikalelectronics.ru Git - kernel.git/commit
perf symbols: Improve kallsyms symbol end addr calculation
authorArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 22 Dec 2010 03:08:36 +0000 (01:08 -0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 22 Dec 2010 22:31:45 +0000 (20:31 -0200)
commitd7291137178e87075dd0f84191f9103c88a79120
treeea6888c58add31852a641c0a4e37840ac2197676
parentd30c054126223bfc507c9977300ca7b84adb7956
perf symbols: Improve kallsyms symbol end addr calculation

For kallsyms we don't have the symbol address end, so we do an extra pass and
set the symbol end addr as being the start of the next minus one.

But this was being done just after we filtered the symbols of a
particular type (functions, variables), so the symbol end was sometimes
after what it really is.

Fixing up symbol end also was falling apart when we have symbol aliases,
then the end address of all but the last alias was being set to be
before its start.

Fix it up by checking for symbol aliases and making the kallsyms__parse
routine use the next symbol, whatever its type, as the limit for the
previous symbol, passing that end address to the callback.

This was detected by the 'perf test' synthetic paranoid regression
tests, fix it up so that even that case doesn't mislead us.

Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Stephane Eranian <eranian@google.com>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/event.c
tools/perf/util/symbol.c
tools/perf/util/symbol.h