Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752578AbdFMLwi convert rfc822-to-8bit (ORCPT ); Tue, 13 Jun 2017 07:52:38 -0400 Received: from wildebeest.demon.nl ([212.238.236.112]:37328 "EHLO gnu.wildebeest.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752259AbdFMLwh (ORCPT ); Tue, 13 Jun 2017 07:52:37 -0400 X-Greylist: delayed 472 seconds by postgrey-1.27 at vger.kernel.org; Tue, 13 Jun 2017 07:52:36 EDT Message-ID: <1497354282.3755.201.camel@klomp.org> Subject: Re: [PATCH v2] perf: libdw support for powerpc [ping] From: Mark Wielaard To: Ravi Bangoria Cc: Paolo Bonzini , linux-kernel@vger.kernel.org, acme@kernel.org, "Naveen N. Rao" , linuxppc-dev@lists.ozlabs.org Date: Tue, 13 Jun 2017 13:44:42 +0200 In-Reply-To: <593E81ED.8060606@linux.vnet.ibm.com> References: <1496312681-20133-1-git-send-email-pbonzini@redhat.com> <593E81ED.8060606@linux.vnet.ibm.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Mailer: Evolution 3.12.11 (3.12.11-22.el7) Mime-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2572 Lines: 60 Hi Ravi, On Mon, 2017-06-12 at 17:28 +0530, Ravi Bangoria wrote: > 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. I see the same on very short runs. But when doing a slightly longer run, even just using ls -lahR, which does some more work, then I do see user backtraces. They are still missing for some of the early samples though. It is as if there is a stack/memory address mismatch when the probe is "too early" in ld.so. Could you do a test run on some program that does some more work to see if you never get any user stack traces, or if you only not get them for some specific probes? Thanks, Mark