lkml.org 
[lkml]   [2010]   [May]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
Subject[PATCH v4 12/13] perf: Dont adjust symbols on name lookup

Adjusting symbols is not needed if we are searching by name.
Infact if we adjust and search symbols by name, we get incorrect
results.

Signed-off-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
---

tools/perf/util/symbol.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)


diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index c458c4a..7267050 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -958,12 +958,14 @@ static int dso__load_sym(struct dso *self, struct map *map, const char *name,
nr_syms = shdr.sh_size / shdr.sh_entsize;

memset(&sym, 0, sizeof(sym));
- if (!self->kernel) {
+ if (self->kernel || symbol_conf.sort_by_name)
+ self->adjust_symbols = 0;
+ else {
self->adjust_symbols = (ehdr.e_type == ET_EXEC ||
elf_section_by_name(elf, &ehdr, &shdr,
".gnu.prelink_undo",
NULL) != NULL);
- } else self->adjust_symbols = 0;
+ }

elf_symtab__for_each_symbol(syms, nr_syms, idx, sym) {
struct symbol *f;

\
 
 \ /
  Last update: 2010-05-18 19:07    [W:0.115 / U:8.316 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site