All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com>,
	kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: acme@kernel.org, Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>,
	linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] perf: libdw support for powerpc
Date: Fri, 19 May 2017 10:20:48 +0200	[thread overview]
Message-ID: <24a6080b-c0bb-9965-013c-60b4368c649c@redhat.com> (raw)
In-Reply-To: <be48f6fe-0f0e-8667-0ad0-65e00904f008@redhat.com>



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

      reply	other threads:[~2017-05-19  8:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-18 17:00 [PATCH] perf: libdw support for powerpc Paolo Bonzini
2017-05-18 18:19 ` Naveen N. Rao
2017-05-18 18:19   ` Naveen N. Rao
2017-05-18 18:48   ` Paolo Bonzini
2017-05-19  8:20     ` Paolo Bonzini [this message]

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=24a6080b-c0bb-9965-013c-60b4368c649c@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=acme@kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=naveen.n.rao@linux.vnet.ibm.com \
    --cc=ravi.bangoria@linux.vnet.ibm.com \
    /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.