linuxppc-dev.lists.ozlabs.org archive mirror
 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: Thu, 18 May 2017 20:48:55 +0200	[thread overview]
Message-ID: <be48f6fe-0f0e-8667-0ad0-65e00904f008@redhat.com> (raw)
In-Reply-To: <1495131092.c1jiws8vlt.astroid@naverao1-tp.none>



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?

>> diff --git a/tools/perf/arch/powerpc/util/unwind-libdw.c
>> b/tools/perf/arch/powerpc/util/unwind-libdw.c
>> new file mode 100644
>> index 0000000..c61e1d8
>> --- /dev/null
>> +++ b/tools/perf/arch/powerpc/util/unwind-libdw.c
>> @@ -0,0 +1,73 @@
>> +#include <elfutils/libdwfl.h>
>> +#include "../../util/util.h"
>> +#include "../../util/unwind-libdw.h"
>> +#include "../../util/perf_regs.h"
> 
> As an aside, we also need to include "event.h", without which there are
> a few compile errors.

Oops, I was compiling this on 4.11.  Sorry.

Paolo

  reply	other threads:[~2017-05-18 18:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20170518170018.10507-1-pbonzini@redhat.com>
2017-05-18 18:19 ` [PATCH] perf: libdw support for powerpc Naveen N. Rao
2017-05-18 18:48   ` Paolo Bonzini [this message]
2017-05-19  8:20     ` Paolo Bonzini

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=be48f6fe-0f0e-8667-0ad0-65e00904f008@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 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).