linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* vmlinux symtab matching kallsyms fails: dso__find_symbol_by_name ---- end ----
@ 2013-06-25  5:33 Prabhat Kumar Ravi
  2013-06-25 18:40 ` Harsh
  0 siblings, 1 reply; 2+ messages in thread
From: Prabhat Kumar Ravi @ 2013-06-25  5:33 UTC (permalink / raw)
  To: linux-kernel

Hi All,

On 3.4-rc49, I got following failure running `perf test`:

/ # perf test -v 1
 1: vmlinux symtab matches kallsyms:
--- start ---
dso__find_symbol_by_name ---- end ----
vmlinux symtab matches kallsyms: FAILED!

Perf test is failing at dsofind_symbol_by_name

where

        kallsyms_map = machine__kernel_map(&kallsyms, type);

     sym = map__find_symbol_by_name(kallsyms_map, ref_reloc_sym.name, NULL);
     if (sym == NULL) {
                pr_debug("dso__find_symbol_by_name ");
                goto out;
        }

Here sym is search for "_stext" which is NULL here so perf test fails
here only.

On investigation found that _stext having same address as asm_do_IRQ
and exception_text_start,

c00081c0 T asm_do_IRQ
c00081c0 T _stext
c00081c0 T __exception_text_start

so being deleted by symbolsfixup_duplicate in

if (choose_best_symbol(curr, next) == SYMBOL_A) {

                        rb_erase(&next->rb_node, symbols); --> symbole
getting erase here.
                        goto again;
                } else {


My doubt is, Is we really need this commit??:

commit 3f5a42722b9e78a434d5a4ee5e607dc33c69ac80
Author: Anton Blanchard <anton@samba.org>
Date:   Wed Aug 24 16:40:15 2011 +1000

    perf symbols: /proc/kallsyms does not sort module symbols

    kallsyms__parse assumes that /proc/kallsyms is sorted and sets the end
    of the previous symbol to the start of the current one.

    Unfortunately module symbols are not sorted, eg:

    ffffffffa0081f30 t e1000_clean_rx_irq   [e1000e]
    ffffffffa00817a0 t e1000_alloc_rx_buffers       [e1000e]

    Some symbols end up with a negative length and others have a length
    larger than they should. This results in confusing perf output.

    We already have a function to fixup the end of zero length symbols so
    use that instead.

Or we can search or other string.??

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: vmlinux symtab matching kallsyms fails: dso__find_symbol_by_name ---- end ----
  2013-06-25  5:33 vmlinux symtab matching kallsyms fails: dso__find_symbol_by_name ---- end ---- Prabhat Kumar Ravi
@ 2013-06-25 18:40 ` Harsh
  0 siblings, 0 replies; 2+ messages in thread
From: Harsh @ 2013-06-25 18:40 UTC (permalink / raw)
  To: linux-kernel

Can you disable symbols_fixup_duplicate and check, I think we need to fix 
it.

- Harsh



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-06-25 18:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-25  5:33 vmlinux symtab matching kallsyms fails: dso__find_symbol_by_name ---- end ---- Prabhat Kumar Ravi
2013-06-25 18:40 ` Harsh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).