From: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: linux-kernel@vger.kernel.org, acme@kernel.org,
"Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com>,
linuxppc-dev@lists.ozlabs.org, mark@klomp.org
Subject: Re: [PATCH v2] perf: libdw support for powerpc [ping]
Date: Mon, 12 Jun 2017 17:28:37 +0530 [thread overview]
Message-ID: <593E81ED.8060606@linux.vnet.ibm.com> (raw)
In-Reply-To: <a44cf3bd-e868-a8d5-4518-2bea76be7f8f@redhat.com>
Hi Paolo,
Thanks for the patch and really sorry for being late. I was quite busy
with few other things.
On Friday 09 June 2017 06:00 PM, Paolo Bonzini wrote:
>
> On 01/06/2017 12:24, Paolo Bonzini wrote:
>> Porting PPC to libdw only needs an architecture-specific hook to move
>> the register state from perf to libdw.
>>
>> The ARM and x86 architectures already use libdw, and it is useful to
>> have as much common code for the unwinder as possible. Mark Wielaard
>> has contributed a frame-based unwinder to libdw, so that unwinding works
>> even for binaries that do not have CFI information. In addition,
>> libunwind is always preferred to libdw by the build machinery so this
>> cannot introduce regressions on machines that have both libunwind and
>> libdw installed.
>>
>> Cc: acme@kernel.org
>> Cc: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
>> Cc: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
>> Cc: linuxppc-dev@lists.ozlabs.org
>> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>> ---
>> v1->v2: fix for 4.11->4.12 changes
> Ravi, Naveen, any reviews?
So, I tested this patch along with Mark's patch[1] on elfutils an looks
like it's not working. Steps on what I did:
After applying Mark's patch on upstream elfutils:
$ aclocal
$ autoheader
$ autoconf
$ automake --add-missing
$ ./configure
$ make
$ make install DESTDIR=/home/ravi/elfutils-git
After applying your patch on upstream perf:
$ make
$ ./perf record --call-graph=dwarf ls
$ LD_LIBRARY_PATH=/home/ravi/elfutils-git/usr/local/lib:\
/home/ravi/elfutils-git/usr/local/lib/elfutils/:$LD_LIBRARY_PATH \
./perf script
ls 44159 1800.878468: 191408 cycles:u:
ls 44159 1800.878673: 419356 cycles:u:
8a97c hpte_need_flush (/usr/lib/debug/lib/modules/4.11.0-3.el7.ppc64le/vmlinux)
835f4 flush_hash_page (/usr/lib/debug/lib/modules/4.11.0-3.el7.ppc64le/vmlinux)
8acec hpte_need_flush (/usr/lib/debug/lib/modules/4.11.0-3.el7.ppc64le/vmlinux)
3468f4 ptep_clear_flush (/usr/lib/debug/lib/modules/4.11.0-3.el7.ppc64le/vmlinux)
328b10 wp_page_copy (/usr/lib/debug/lib/modules/4.11.0-3.el7.ppc64le/vmlinux)
32ebe4 do_wp_page (/usr/lib/debug/lib/modules/4.11.0-3.el7.ppc64le/vmlinux)
33434c __handle_mm_fault (/usr/lib/debug/lib/modules/4.11.0-3.el7.ppc64le/vmlinux)
335040 handle_mm_fault (/usr/lib/debug/lib/modules/4.11.0-3.el7.ppc64le/vmlinux)
7bf94 do_page_fault (/usr/lib/debug/lib/modules/4.11.0-3.el7.ppc64le/vmlinux)
1a4f8 handle_page_fault (/usr/lib/debug/lib/modules/4.11.0-3.el7.ppc64le/vmlinux)
ls 44159 1800.878961: 430876 cycles:u:
ls 44159 1800.879195: 423785 cycles:u:
ls 44159 1800.879360: 427359 cycles:u:
Here I don't see userspace callchain getting unwound. Please let me know
if I'm doing anything wrong. Same perf.data with libunwind:
ls 44159 1800.878468: 191408 cycles:u:
20380 _dl_sysdep_start (/usr/lib64/ld-2.17.so)
1c7f _dl_start_final (/usr/lib64/ld-2.17.so)
5ce7 _dl_start (/usr/lib64/ld-2.17.so)
1937 _start (/usr/lib64/ld-2.17.so)
ls 44159 1800.878673: 419356 cycles:u:
8a97c hpte_need_flush (/usr/lib/debug/lib/modules/4.11.0-3.el7.ppc64le/vmlinux)
835f4 flush_hash_page (/usr/lib/debug/lib/modules/4.11.0-3.el7.ppc64le/vmlinux)
8acec hpte_need_flush (/usr/lib/debug/lib/modules/4.11.0-3.el7.ppc64le/vmlinux)
3468f4 ptep_clear_flush (/usr/lib/debug/lib/modules/4.11.0-3.el7.ppc64le/vmlinux)
328b10 wp_page_copy (/usr/lib/debug/lib/modules/4.11.0-3.el7.ppc64le/vmlinux)
32ebe4 do_wp_page (/usr/lib/debug/lib/modules/4.11.0-3.el7.ppc64le/vmlinux)
33434c __handle_mm_fault (/usr/lib/debug/lib/modules/4.11.0-3.el7.ppc64le/vmlinux)
335040 handle_mm_fault (/usr/lib/debug/lib/modules/4.11.0-3.el7.ppc64le/vmlinux)
7bf94 do_page_fault (/usr/lib/debug/lib/modules/4.11.0-3.el7.ppc64le/vmlinux)
1a4f8 handle_page_fault (/usr/lib/debug/lib/modules/4.11.0-3.el7.ppc64le/vmlinux)
7cd4 _dl_map_object_from_fd (/usr/lib64/ld-2.17.so)
b24b _dl_map_object (/usr/lib64/ld-2.17.so)
12b3b openaux (/usr/lib64/ld-2.17.so)
159bf _dl_catch_error (/usr/lib64/ld-2.17.so)
13323 _dl_map_object_deps (/usr/lib64/ld-2.17.so)
3feb dl_main (/usr/lib64/ld-2.17.so)
2045b _dl_sysdep_start (/usr/lib64/ld-2.17.so)
1c7f _dl_start_final (/usr/lib64/ld-2.17.so)
5ce7 _dl_start (/usr/lib64/ld-2.17.so)
1937 _start (/usr/lib64/ld-2.17.so)
ls 44159 1800.878961: 430876 cycles:u:
dcb8 check_match.10245 (/usr/lib64/ld-2.17.so)
e55b do_lookup_x (/usr/lib64/ld-2.17.so)
e8d7 _dl_lookup_symbol_x (/usr/lib64/ld-2.17.so)
10493 _dl_relocate_object (/usr/lib64/ld-2.17.so)
4cf7 dl_main (/usr/lib64/ld-2.17.so)
2045b _dl_sysdep_start (/usr/lib64/ld-2.17.so)
1c7f _dl_start_final (/usr/lib64/ld-2.17.so)
5ce7 _dl_start (/usr/lib64/ld-2.17.so)
1937 _start (/usr/lib64/ld-2.17.so)
ls 44159 1800.879195: 423785 cycles:u:
960a0 malloc (/usr/lib64/libc-2.17.so)
32a53 _nl_intern_locale_data (/usr/lib64/libc-2.17.so)
3337f _nl_load_locale_from_archive (/usr/lib64/libc-2.17.so)
323b3 _nl_find_locale (/usr/lib64/libc-2.17.so)
31b93 setlocale (/usr/lib64/libc-2.17.so)
2a8b _init (/usr/bin/ls)
2497f generic_start_main.isra.0 (/usr/lib64/libc-2.17.so)
24b73 __libc_start_main (/usr/lib64/libc-2.17.so)
ls 44159 1800.879360: 427359 cycles:u:
a42b8 get_next_seq (/usr/lib64/libc-2.17.so)
a54ff __strcoll_l (/usr/lib64/libc-2.17.so)
[1] https://sourceware.org/ml/elfutils-devel/2017-q2/msg00223.html
next prev parent reply other threads:[~2017-06-12 11:58 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-01 10:24 [PATCH v2] perf: libdw support for powerpc Paolo Bonzini
2017-06-09 12:30 ` [PATCH v2] perf: libdw support for powerpc [ping] Paolo Bonzini
2017-06-12 11:58 ` Ravi Bangoria [this message]
2017-06-13 11:44 ` Mark Wielaard
2017-06-13 11:44 ` Mark Wielaard
2017-06-13 15:55 ` Ravi Bangoria
2017-06-15 8:46 ` Milian Wolff
2017-06-15 11:16 ` Mark Wielaard
2017-06-15 11:16 ` Mark Wielaard
2017-06-16 4:21 ` Ravi Bangoria
2017-06-21 1:06 ` Arnaldo Carvalho de Melo
2017-06-21 1:31 ` Mark Wielaard
2017-06-21 1:07 ` Arnaldo Carvalho de Melo
2017-06-21 8:16 ` Milian Wolff
2017-06-21 12:48 ` Arnaldo Carvalho de Melo
2017-06-21 14:19 ` Milian Wolff
2017-06-21 14:33 ` Arnaldo Carvalho de Melo
2017-06-15 12:13 ` [PATCH v2] perf: libdw support for powerpc Jiri Olsa
2017-06-20 21:53 ` Arnaldo Carvalho de Melo
2017-06-21 18:19 ` [tip:perf/core] perf unwind: Support " tip-bot for 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=593E81ED.8060606@linux.vnet.ibm.com \
--to=ravi.bangoria@linux.vnet.ibm.com \
--cc=acme@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mark@klomp.org \
--cc=naveen.n.rao@linux.vnet.ibm.com \
--cc=pbonzini@redhat.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.