diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2009-06-30 10:43:17 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-06-30 11:09:30 -0400 |
commit | f5812a7a336fb952d819e4427b9a2dce02368e82 (patch) | |
tree | 584b8581f68325c8e98a32df51c5155234e0e362 /tools/perf/util/symbol.h | |
parent | 57e7986ed142417498155ebcd5eaf617ac37136d (diff) |
perf_counter tools: Adjust only prelinked symbol's addresses
I.e. we can't handle these two kinds of files in the same way:
1) prelinked system library:
[acme@doppio pahole]$ readelf -s /usr/lib64/libdw-0.141.so | egrep 'FUNC.+GLOBAL.+dwfl_report_elf'
278: 00000030450105a0 261 FUNC GLOBAL DEFAULT 12 dwfl_report_elf@@ELFUTILS_0.122
2) not prelinked library with debug information from a -debuginfo package:
[acme@doppio pahole]$ readelf -s /usr/lib/debug/usr/lib64/libdw-0.141.so.debug | egrep 'FUNC.+GLOBAL.+dwfl_report_elf'
629: 00000000000105a0 261 FUNC GLOBAL DEFAULT 12 dwfl_report_elf
[acme@doppio pahole]$
Now the numbers I got for a pahole perf run are in line with
the numbers I get from oprofile.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <20090630144317.GB12663@ghostprotocols.net>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/util/symbol.h')
-rw-r--r-- | tools/perf/util/symbol.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/perf/util/symbol.h b/tools/perf/util/symbol.h index 940b432db16e..2c48ace8203b 100644 --- a/tools/perf/util/symbol.h +++ b/tools/perf/util/symbol.h | |||
@@ -20,8 +20,9 @@ struct symbol { | |||
20 | struct dso { | 20 | struct dso { |
21 | struct list_head node; | 21 | struct list_head node; |
22 | struct rb_root syms; | 22 | struct rb_root syms; |
23 | unsigned int sym_priv_size; | ||
24 | struct symbol *(*find_symbol)(struct dso *, u64 ip); | 23 | struct symbol *(*find_symbol)(struct dso *, u64 ip); |
24 | unsigned int sym_priv_size; | ||
25 | unsigned char prelinked; | ||
25 | char name[0]; | 26 | char name[0]; |
26 | }; | 27 | }; |
27 | 28 | ||