Prev: i2c/nuc900: add i2c driver support for nuc900
Next: [PATCHv6 2.6.35-rc3-tip 1/12] mm: Move replace_page() / write_protect_page() to mm/memory.c
From: Srikar Dronamraju on 28 Jun 2010 02:10 perf: Dont adjust symbols on name lookup Adjusting symbols is not needed if we are searching by name even if the symbols correspond to user space objects. Infact if we adjust and search symbols by name, we get incorrect results. Signed-off-by: Srikar Dronamraju <srikar(a)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 971d0a0..e5cb705 100644 --- a/tools/perf/util/symbol.c +++ b/tools/perf/util/symbol.c @@ -1016,12 +1016,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 == DSO_TYPE_USER) { + if (self->kernel != DSO_TYPE_USER || 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; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |