All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: perf probe issues
Date: Wed, 15 Jun 2016 14:43:38 -0300	[thread overview]
Message-ID: <20160615174338.GB4882@kernel.org> (raw)
In-Reply-To: <20160615110201.c2838ec2291cd9caaaa93ce4@kernel.org>

Em Wed, Jun 15, 2016 at 11:02:01AM +0900, Masami Hiramatsu escreveu:
> On Tue, 14 Jun 2016 14:05:04 -0300
> Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
> > 	While investigating a problem in the annotation code reported by
> > Linus, with "kaslr" on the kernel command line and this in .config:

> > [root@jouet ~]# egrep 'CONFIG_(RANDOMIZE_BASE|DEBUG_INFO)' ~acme/git/build/v4.7.0-rc3/.config
> > CONFIG_RANDOMIZE_BASE=y
> > # CONFIG_DEBUG_INFO is not set
> > [root@jouet ~]#

> > [root@jouet ~]# grep -w vfs_write /proc/kallsyms 
> > ffffffffac2404c0 T vfs_write
> > [root@jouet ~]# perf probe vfs_write
> > vfs_write is out of .text, skip it.
> >   Error: Failed to add events.
> > [root@jouet ~]# perf probe -v vfs_write
> > probe-definition(0): vfs_write 
> > symbol:vfs_write file:(null) line:0 offset:0 return:0 lazy:(null)
> > 0 arguments
> > Looking at the vmlinux_path (8 entries long)
> > Using /lib/modules/4.7.0-rc3/build/vmlinux for symbols
> > Could not open debuginfo. Try to use symbols.
> > vfs_write is out of .text, skip it.
> >   Error: Failed to add events. Reason: No such file or directory (Code: -2)
> > [root@jouet ~]# 

> > Can you try to test with this config to investigate this problem?
 
> Yes, I guess it missed to get start_text because of KASLR...
 
> > We need to improve the error messages, for instance:

> > "Could not open debuginfo. Try to use symbols."

> > I think should be rewritten as: "Trying to use kallsyms", no? I.e. if it
> > doesn't manage to find a vmlinux file, it will try to use kallsyms as a
> > fallback, is that what is happening here?
 
> Let me check that the perf symbol/map object uses kallsyms for kernel.
> Anyway, if the target is not the kernel, do we change the message
> as "trying to use symbols"?

Well, it is _always_ trying to use "symbols" as in "information to map
an address to a symbol", but this information can come from DWARF,
kallsyms, ELF symbol tables, JIT /tmp/ maps, etc :-)

So, if it is going to use kallsyms:

"Trying to use kallsyms"

ELF symtol tables:

"Trying to use the ELF symbol table"

etc.

- Arnaldo

  reply	other threads:[~2016-06-15 17:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-14 17:05 perf probe issues Arnaldo Carvalho de Melo
2016-06-15  2:02 ` Masami Hiramatsu
2016-06-15 17:43   ` Arnaldo Carvalho de Melo [this message]
2016-06-15 21:33     ` Masami Hiramatsu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160615174338.GB4882@kernel.org \
    --to=acme@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.