Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1645348

Re: [PATCH] perf: libdw support for powerpc

From Paolo Bonzini <pbonzini@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH] perf: libdw support for powerpc
Date 2017-05-19 10:30 +0200
Message-ID <tILsm-7S6-23@gated-at.bofh.it> (permalink)
References <tIx62-5FV-19@gated-at.bofh.it> <tIyls-6r1-21@gated-at.bofh.it> <tIyEN-6zR-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw



On 18/05/2017 20:48, Paolo Bonzini wrote:
> 
> 
> On 18/05/2017 20:19, Naveen N. Rao wrote:
>> Paolo Bonzini wrote:
>>> The ARM and x86 architectures already use libdw, and it is useful to
>>> have as much common code for the unwinder as possible.  Porting PPC
>>> to libdw only needs an architecture-specific hook to move the register
>>> state from perf to libdw.
>>
>> Thanks. Ravi has had a similar patch locally, but from what I
>> understand, there are issues with libdw based unwinding on powerpc64. I
>> gave this a quick test and I don't see the user-space call trace being
>> unwinded properly with libdw.
> 
> I don't see that problem:
> 
> -   99,98%     0,00%  dd       libc-2.17.so                    [.] generic_start_main.isra.0
>      generic_start_main.isra.0
>    - main
>       - 99,97% iread
>          - 97,82% sys_read
>             - 96,97% extract_entropy_user
>                  89,44% powernv_get_random_long
>                  4,63% sha_transform
>                  2,07% extract_buf
>            1,15% _raw_spin_lock_irqsave
>            0,51% extract_buf
> 
> (This is "perf record dd if=/dev/urandom of=/dev/null bs=512").
> 
> Can you copy the contents of tools/perf/.config-detected here?

FWIW it works fine for me here with latest Linus tree and your suggested
change to fix compilation:

--- a/tools/perf/arch/powerpc/util/unwind-libdw.c
+++ b/tools/perf/arch/powerpc/util/unwind-libdw.c
@@ -1,7 +1,7 @@
 #include <elfutils/libdwfl.h>
-#include "../../util/util.h"
 #include "../../util/unwind-libdw.h"
 #include "../../util/perf_regs.h"
+#include "../../util/event.h"

 /* See backends/ppc_initreg.c and backends/ppc_regs.c in elfutils.  */
 static const int special_regs[3][2] = {

Thanks,

Paolo

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] perf: libdw support for powerpc Paolo Bonzini <pbonzini@redhat.com> - 2017-05-18 19:10 +0200
  Re: [PATCH] perf: libdw support for powerpc "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com> - 2017-05-18 20:30 +0200
    Re: [PATCH] perf: libdw support for powerpc Paolo Bonzini <pbonzini@redhat.com> - 2017-05-18 20:50 +0200
      Re: [PATCH] perf: libdw support for powerpc Paolo Bonzini <pbonzini@redhat.com> - 2017-05-19 10:30 +0200

csiph-web