* address output in 'perf script' does not work for addr2line
@ 2015-03-03 16:07 Yuanfang Chen
2015-03-03 16:23 ` Arnaldo Carvalho de Melo
0 siblings, 1 reply; 7+ messages in thread
From: Yuanfang Chen @ 2015-03-03 16:07 UTC (permalink / raw)
To: linux-perf-users
I'm using perf 3.19.0 on Archlinux
[arch@t440s-arch ~/Trash]$ uname -a
Linux t440s-arch 3.18.6-1-ARCH #1 SMP PREEMPT Sat Feb 7 08:44:05 CET
2015 x86_64 GNU/Linux
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?
a.out 26620 [000] 314643.350007: 6825289 cycles:
57e main (/home/arch/Trash/a.out)
20800 __libc_start_main (/usr/lib/libc-2.21.so)
13d6258d4c544155 [unknown] ([unknown])
thank you,
Yuanfang
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: address output in 'perf script' does not work for addr2line
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
0 siblings, 1 reply; 7+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-03-03 16:23 UTC (permalink / raw)
To: Yuanfang Chen; +Cc: linux-perf-users, David Ahern
Em Tue, Mar 03, 2015 at 11:07:18AM -0500, Yuanfang Chen escreveu:
> I'm using perf 3.19.0 on Archlinux
>
> [arch@t440s-arch ~/Trash]$ uname -a
> Linux t440s-arch 3.18.6-1-ARCH #1 SMP PREEMPT Sat Feb 7 08:44:05 CET
> 2015 x86_64 GNU/Linux
>
> 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?
I would argue that it would be even better if it resolved to file:lineno
by default...
- Arnaldo
> a.out 26620 [000] 314643.350007: 6825289 cycles:
> 57e main (/home/arch/Trash/a.out)
> 20800 __libc_start_main (/usr/lib/libc-2.21.so)
> 13d6258d4c544155 [unknown] ([unknown])
>
> thank you,
> Yuanfang
> --
> To unsubscribe from this list: send the line "unsubscribe linux-perf-users" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: address output in 'perf script' does not work for addr2line
2015-03-03 16:23 ` Arnaldo Carvalho de Melo
@ 2015-03-03 19:27 ` Yuanfang Chen
2015-03-03 19:54 ` David Ahern
0 siblings, 1 reply; 7+ messages in thread
From: Yuanfang Chen @ 2015-03-03 19:27 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo; +Cc: linux-perf-users, David Ahern
On Tue, Mar 3, 2015 at 11:23 AM, Arnaldo Carvalho de Melo
<arnaldo.melo@gmail.com> wrote:
> Em Tue, Mar 03, 2015 at 11:07:18AM -0500, Yuanfang Chen escreveu:
>> I'm using perf 3.19.0 on Archlinux
>>
>> [arch@t440s-arch ~/Trash]$ uname -a
>> Linux t440s-arch 3.18.6-1-ARCH #1 SMP PREEMPT Sat Feb 7 08:44:05 CET
>> 2015 x86_64 GNU/Linux
>>
>> 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.
> I would argue that it would be even better if it resolved to file:lineno
> by default...
Totally agree.
> - Arnaldo
>
>> a.out 26620 [000] 314643.350007: 6825289 cycles:
>> 57e main (/home/arch/Trash/a.out)
>> 20800 __libc_start_main (/usr/lib/libc-2.21.so)
>> 13d6258d4c544155 [unknown] ([unknown])
>>
>> thank you,
>> Yuanfang
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-perf-users" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: address output in 'perf script' does not work for addr2line
2015-03-03 19:27 ` Yuanfang Chen
@ 2015-03-03 19:54 ` David Ahern
2015-03-03 20:50 ` Arnaldo Carvalho de Melo
0 siblings, 1 reply; 7+ messages in thread
From: David Ahern @ 2015-03-03 19:54 UTC (permalink / raw)
To: Yuanfang Chen, Arnaldo Carvalho de Melo; +Cc: linux-perf-users, Andi Kleen
On 3/3/15 12:27 PM, Yuanfang Chen wrote:
> On Tue, Mar 3, 2015 at 11:23 AM, Arnaldo Carvalho de Melo
> <arnaldo.melo@gmail.com> wrote:
>> Em Tue, Mar 03, 2015 at 11:07:18AM -0500, Yuanfang Chen escreveu:
>>> I'm using perf 3.19.0 on Archlinux
>>>
>>> [arch@t440s-arch ~/Trash]$ uname -a
>>> Linux t440s-arch 3.18.6-1-ARCH #1 SMP PREEMPT Sat Feb 7 08:44:05 CET
>>> 2015 x86_64 GNU/Linux
>>>
>>> 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.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: address output in 'perf script' does not work for addr2line
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
2015-03-06 23:19 ` Andi Kleen
0 siblings, 2 replies; 7+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-03-03 20:50 UTC (permalink / raw)
To: David Ahern; +Cc: Yuanfang Chen, linux-perf-users, Andi Kleen
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.
- Arnaldo
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: address output in 'perf script' does not work for addr2line
2015-03-03 20:50 ` Arnaldo Carvalho de Melo
@ 2015-03-03 21:07 ` Arnaldo Carvalho de Melo
2015-03-06 23:19 ` Andi Kleen
1 sibling, 0 replies; 7+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-03-03 21:07 UTC (permalink / raw)
To: David Ahern; +Cc: Yuanfang Chen, linux-perf-users, Andi Kleen
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: address output in 'perf script' does not work for addr2line
2015-03-03 20:50 ` Arnaldo Carvalho de Melo
2015-03-03 21:07 ` Arnaldo Carvalho de Melo
@ 2015-03-06 23:19 ` Andi Kleen
1 sibling, 0 replies; 7+ messages in thread
From: Andi Kleen @ 2015-03-06 23:19 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo; +Cc: David Ahern, Yuanfang Chen, linux-perf-users
> > >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.
Yes fixing perf script is best. Then the addr2line hacks are not needed
anymore. addr2line was never fully complete, as it couldn't handle
shared libraries.
However we should make it a new key to not break anything existing.
I'll take a look.
-Andi
--
ak@linux.intel.com -- Speaking for myself only
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-03-06 23:19 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2015-03-06 23:19 ` Andi Kleen
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).