diff mbox

[v2] perf: libdw support for powerpc [ping]

Message ID 1497525392.3755.307.camel@klomp.org (mailing list archive)
State Not Applicable
Headers show

Commit Message

Mark Wielaard June 15, 2017, 11:16 a.m. UTC
On Thu, 2017-06-15 at 10:46 +0200, Milian Wolff wrote:
> Just a quick question: Have you guys applied my recent patch:
> 
> commit 5ea0416f51cc93436bbe497c62ab49fd9cb245b6
> Author: Milian Wolff <milian.wolff@kdab.com>
> Date:   Thu Jun 1 23:00:21 2017 +0200
> 
>     perf report: Include partial stacks unwound with libdw
>     
>     So far the whole stack was thrown away when any error occurred before
>     the maximum stack depth was unwound. This is actually a very common
>     scenario though. The stacks that got unwound so far are still
>     interesting. This removes a large chunk of differences when comparing
>     perf script output for libunwind and libdw perf unwinding.
> 
> If not, then this could explain the issue you are seeing.

Thanks! No, I didn't have that patch (*) yet. It makes a huge
difference. With that, Paolo's patch and the elfutils libdw powerpc64
fallback unwinder patch, it looks like I get user stack traces for
everything now on ppc64le.

Cheers,

Mark

(*) It just this one-liner, but what a difference that makes:

Comments

Ravi Bangoria June 16, 2017, 4:21 a.m. UTC | #1
Works like a charm with Milian's patch.

Acked-by: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>

Note:
I still see very minor differences between libunwind and libdw. Also, second last
function gets repeated two times in every callchain but it can be fixed later on.
Otherwise all looks good!

Thanks,
-Ravi

On Thursday 15 June 2017 04:46 PM, Mark Wielaard wrote:
> On Thu, 2017-06-15 at 10:46 +0200, Milian Wolff wrote:
>> Just a quick question: Have you guys applied my recent patch:
>>
>> commit 5ea0416f51cc93436bbe497c62ab49fd9cb245b6
>> Author: Milian Wolff <milian.wolff@kdab.com>
>> Date:   Thu Jun 1 23:00:21 2017 +0200
>>
>>     perf report: Include partial stacks unwound with libdw
>>     
>>     So far the whole stack was thrown away when any error occurred before
>>     the maximum stack depth was unwound. This is actually a very common
>>     scenario though. The stacks that got unwound so far are still
>>     interesting. This removes a large chunk of differences when comparing
>>     perf script output for libunwind and libdw perf unwinding.
>>
>> If not, then this could explain the issue you are seeing.
> Thanks! No, I didn't have that patch (*) yet. It makes a huge
> difference. With that, Paolo's patch and the elfutils libdw powerpc64
> fallback unwinder patch, it looks like I get user stack traces for
> everything now on ppc64le.
>
> Cheers,
>
> Mark
>
> (*) It just this one-liner, but what a difference that makes:
>
> --- a/tools/perf/util/unwind-libdw.c
> +++ b/tools/perf/util/unwind-libdw.c
> @@ -224,7 +224,7 @@ int unwind__get_entries(unwind_entry_cb_t cb, void *arg,
>  
>         err = dwfl_getthread_frames(ui->dwfl, thread->tid, frame_callback, ui);
>  
> -       if (err && !ui->max_stack)
> +       if (err && ui->max_stack != max_stack)
>                 err = 0;
>  
>         /*
>
Arnaldo Carvalho de Melo June 21, 2017, 1:06 a.m. UTC | #2
Em Thu, Jun 15, 2017 at 01:16:32PM +0200, Mark Wielaard escreveu:
> On Thu, 2017-06-15 at 10:46 +0200, Milian Wolff wrote:
> > Just a quick question: Have you guys applied my recent patch:
> > 
> > commit 5ea0416f51cc93436bbe497c62ab49fd9cb245b6
> > Author: Milian Wolff <milian.wolff@kdab.com>
> > Date:   Thu Jun 1 23:00:21 2017 +0200
> > 
> >     perf report: Include partial stacks unwound with libdw
> >     
> >     So far the whole stack was thrown away when any error occurred before
> >     the maximum stack depth was unwound. This is actually a very common
> >     scenario though. The stacks that got unwound so far are still
> >     interesting. This removes a large chunk of differences when comparing
> >     perf script output for libunwind and libdw perf unwinding.
> > 
> > If not, then this could explain the issue you are seeing.
> 
> Thanks! No, I didn't have that patch (*) yet. It makes a huge
> difference. With that, Paolo's patch and the elfutils libdw powerpc64
> fallback unwinder patch, it looks like I get user stack traces for
> everything now on ppc64le.

Can I take that as a Tested-by: you?

- Arnaldo
 
> Cheers,
> 
> Mark
> 
> (*) It just this one-liner, but what a difference that makes:
> 
> --- a/tools/perf/util/unwind-libdw.c
> +++ b/tools/perf/util/unwind-libdw.c
> @@ -224,7 +224,7 @@ int unwind__get_entries(unwind_entry_cb_t cb, void *arg,
>  
>         err = dwfl_getthread_frames(ui->dwfl, thread->tid, frame_callback, ui);
>  
> -       if (err && !ui->max_stack)
> +       if (err && ui->max_stack != max_stack)
>                 err = 0;
>  
>         /*
Mark Wielaard June 21, 2017, 1:31 a.m. UTC | #3
On Tue, Jun 20, 2017 at 10:06:35PM -0300, Arnaldo Carvalho de Melo wrote:
> Em Thu, Jun 15, 2017 at 01:16:32PM +0200, Mark Wielaard escreveu:
> > On Thu, 2017-06-15 at 10:46 +0200, Milian Wolff wrote:
> > > Just a quick question: Have you guys applied my recent patch:
> > > 
> > > commit 5ea0416f51cc93436bbe497c62ab49fd9cb245b6
> > > Author: Milian Wolff <milian.wolff@kdab.com>
> > > Date:   Thu Jun 1 23:00:21 2017 +0200
> > > 
> > >     perf report: Include partial stacks unwound with libdw
> > >     
> > >     So far the whole stack was thrown away when any error occurred before
> > >     the maximum stack depth was unwound. This is actually a very common
> > >     scenario though. The stacks that got unwound so far are still
> > >     interesting. This removes a large chunk of differences when comparing
> > >     perf script output for libunwind and libdw perf unwinding.
> > > 
> > > If not, then this could explain the issue you are seeing.
> > 
> > Thanks! No, I didn't have that patch (*) yet. It makes a huge
> > difference. With that, Paolo's patch and the elfutils libdw powerpc64
> > fallback unwinder patch, it looks like I get user stack traces for
> > everything now on ppc64le.
> 
> Can I take that as a Tested-by: you?

Sure.
Tested-by: Mark Wielaard <mark@klomp.org>

Thanks,

Mark
diff mbox

Patch

--- a/tools/perf/util/unwind-libdw.c
+++ b/tools/perf/util/unwind-libdw.c
@@ -224,7 +224,7 @@  int unwind__get_entries(unwind_entry_cb_t cb, void *arg,
 
        err = dwfl_getthread_frames(ui->dwfl, thread->tid, frame_callback, ui);
 
-       if (err && !ui->max_stack)
+       if (err && ui->max_stack != max_stack)
                err = 0;
 
        /*