linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>
To: David Ahern <dsahern@gmail.com>
Cc: Yuanfang Chen <cyfmxc@gmail.com>,
	linux-perf-users@vger.kernel.org, Andi Kleen <ak@linux.intel.com>
Subject: Re: address output in 'perf script' does not work for addr2line
Date: Tue, 3 Mar 2015 18:07:48 -0300	[thread overview]
Message-ID: <20150303210748.GO5187@kernel.org> (raw)
In-Reply-To: <20150303205026.GN5187@kernel.org>

Em Tue, Mar 03, 2015 at 05:50:26PM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Tue, Mar 03, 2015 at 12:54:26PM -0700, David Ahern escreveu:
> > On 3/3/15 12:27 PM, Yuanfang Chen wrote:
> > >On Tue, Mar 3, 2015 at 11:23 AM, Arnaldo Carvalho de Melo wrote:
> > >>Em Tue, Mar 03, 2015 at 11:07:18AM -0500, Yuanfang Chen escreveu:
> > >>>Recently after updating perf package, I found the 'ip' in 'perf
> > >>>script' like below is shorter than before. Also feeding that address
> > >>>(like 57e below) to addr2line does not output filename:lineno
> > >>>information anymore.  How do I fix this issue? Is this a bug?
> 
> > >>Yeah, I tried using it with addr2line and it didn't work :-\ So what
> > >>you're saying is that in the past it worked like that?
> 
> > >>If so, could you please 'git bisect' it to find out when it got broken?
> 
> > >Yeah, it worked in the past.
> > >commit 5550171b2a9f8df26ff483051d060db06376b26d  change ip into
> > >relative address ( not sure relative to which address), which makes
> > >addr2line unable to parse.
> 
> > That's Andi's commit.
> 
> Oh well, that, IIRC, was done to make the srcline sort key to work, but
> broke the perf script output, so perhaps its time to change the perf
> script output to use that code and show srcline:lineno, will see.

So 'perf script' allows one to ask for a srcline as one of its fields,
it is in the man page, not in the OPTION help, and it is broken,
possibly by Andi's commit as well, unsure:


[acme@zoo linux]$ perf script -f comm,tid,time,ip,sym,srcline
          :29199 29199 59715.176367:  ffffffff8109fe42 ttwu_do_wakeupaddr2line_init failed for /home/acme/.debug/.build-id/9c/657619efb47cd8eb1a825865ba3a26cf709e98

  [kernel.vmlinux][ffffffff8109fe42]
          :29199 29199 59715.176368:  ffffffff8109fe42 ttwu_do_wakeupaddr2line_init failed for /home/acme/.debug/.build-id/9c/657619efb47cd8eb1a825865ba3a26cf709e98

  [kernel.vmlinux][ffffffff8109fe42]
          :29199 29199 59715.176368:  ffffffff8109fe42 ttwu_do_wakeupaddr2line_init failed for /home/acme/.debug/.build-id/9c/657619efb47cd8eb1a825865ba3a26cf709e98

  [kernel.vmlinux][ffffffff8109fe42]
          :29199 29199 59715.176369:  ffffffff8109fe42 ttwu_do_wakeupaddr2line_init failed for /home/acme/.debug/.build-id/9c/657619efb47cd8eb1a825865ba3a26cf709e98

  [kernel.vmlinux][ffffffff8109fe42]
          usleep 29200 59715.176897:  ffffffff8109fe42 ttwu_do_wakeupaddr2line_init failed for /home/acme/.debug/.build-id/9c/657619efb47cd8eb1a825865ba3a26cf709e98

  [kernel.vmlinux][ffffffff8109fe42]
         swapper     0 59715.177306:  ffffffff8109fe42 ttwu_do_wakeupaddr2line_init failed for /home/acme/.debug/.build-id/9c/657619efb47cd8eb1a825865ba3a26cf709e98

  [kernel.vmlinux][ffffffff8109fe42]
         swapper     0 59715.177307:  ffffffff8109fe42 ttwu_do_wakeupaddr2line_init failed for /home/acme/.debug/.build-id/9c/657619efb47cd8eb1a825865ba3a26cf709e98

  [kernel.vmlinux][ffffffff8109fe42]
         swapper     0 59715.177308:  ffffffff8109fe42 ttwu_do_wakeupaddr2line_init failed for /home/acme/.debug/.build-id/9c/657619efb47cd8eb1a825865ba3a26cf709e98

  [kernel.vmlinux][ffffffff8109fe42]
         swapper     0 59715.177308:  ffffffff8109fe42 ttwu_do_wakeupaddr2line_init failed for /home/acme/.debug/.build-id/9c/657619efb47cd8eb1a825865ba3a26cf709e98

  [kernel.vmlinux][ffffffff8109fe42]
[acme@zoo linux]$ 

[acme@zoo linux]$ readlink -f /home/acme/.debug/.build-id/9c/657619efb47cd8eb1a825865ba3a26cf709e98
/home/acme/.debug/home/git/build/v3.19-rc6+/vmlinux/9c657619efb47cd8eb1a825865ba3a26cf709e98
[acme@zoo linux]$ file /home/acme/.debug/home/git/build/v3.19-rc6+/vmlinux/9c657619efb47cd8eb1a825865ba3a26cf709e98 
/home/acme/.debug/home/git/build/v3.19-rc6+/vmlinux/9c657619efb47cd8eb1a825865ba3a26cf709e98: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, BuildID[sha1]=9c657619efb47cd8eb1a825865ba3a26cf709e98, not stripped


It works if using addr2line directly:

[acme@zoo linux]$ addr2line -f -e /home/acme/.debug/home/git/build/v3.19-rc6+/vmlinux/9c657619efb47cd8eb1a825865ba3a26cf709e98 ffffffff8109fe42
trace_sched_wakeup
/home/git/linux/include/trace/events/sched.h:83
[acme@zoo linux]$ 

- Arnaldo

  reply	other threads:[~2015-03-03 21:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-03 16:07 address output in 'perf script' does not work for addr2line Yuanfang Chen
2015-03-03 16:23 ` Arnaldo Carvalho de Melo
2015-03-03 19:27   ` Yuanfang Chen
2015-03-03 19:54     ` David Ahern
2015-03-03 20:50       ` Arnaldo Carvalho de Melo
2015-03-03 21:07         ` Arnaldo Carvalho de Melo [this message]
2015-03-06 23:19         ` Andi Kleen

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=20150303210748.GO5187@kernel.org \
    --to=arnaldo.melo@gmail.com \
    --cc=ak@linux.intel.com \
    --cc=cyfmxc@gmail.com \
    --cc=dsahern@gmail.com \
    --cc=linux-perf-users@vger.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 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).