Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751706AbdFPEVq (ORCPT ); Fri, 16 Jun 2017 00:21:46 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:58527 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750873AbdFPEVp (ORCPT ); Fri, 16 Jun 2017 00:21:45 -0400 Subject: Re: [PATCH v2] perf: libdw support for powerpc [ping] To: Mark Wielaard , Milian Wolff , Paolo Bonzini References: <1496312681-20133-1-git-send-email-pbonzini@redhat.com> <1497354282.3755.201.camel@klomp.org> <59400ADD.4090709@linux.vnet.ibm.com> <3621613.kMnvz8Tm3d@milian-kdab2> <1497525392.3755.307.camel@klomp.org> Cc: linux-kernel@vger.kernel.org, acme@kernel.org, "Naveen N. Rao" , linuxppc-dev@lists.ozlabs.org, Ravi Bangoria From: Ravi Bangoria Date: Fri, 16 Jun 2017 09:51:23 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <1497525392.3755.307.camel@klomp.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 17061604-0044-0000-0000-00000352A71F X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00007240; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000212; SDB=6.00875439; UDB=6.00435872; IPR=6.00655528; BA=6.00005423; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00015845; XFM=3.00000015; UTC=2017-06-16 04:21:42 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17061604-0045-0000-0000-00000780AD14 Message-Id: <59435CC3.9080007@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-06-16_01:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1703280000 definitions=main-1706160070 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1837 Lines: 52 Works like a charm with Milian's patch. Acked-by: Ravi Bangoria Note: I still see very minor differences between libunwind and libdw. Also, second last function gets repeated two times in every callchain but it can be fixed later on. Otherwise all looks good! Thanks, -Ravi On Thursday 15 June 2017 04:46 PM, Mark Wielaard wrote: > On Thu, 2017-06-15 at 10:46 +0200, Milian Wolff wrote: >> Just a quick question: Have you guys applied my recent patch: >> >> commit 5ea0416f51cc93436bbe497c62ab49fd9cb245b6 >> Author: Milian Wolff >> Date: Thu Jun 1 23:00:21 2017 +0200 >> >> perf report: Include partial stacks unwound with libdw >> >> So far the whole stack was thrown away when any error occurred before >> the maximum stack depth was unwound. This is actually a very common >> scenario though. The stacks that got unwound so far are still >> interesting. This removes a large chunk of differences when comparing >> perf script output for libunwind and libdw perf unwinding. >> >> If not, then this could explain the issue you are seeing. > Thanks! No, I didn't have that patch (*) yet. It makes a huge > difference. With that, Paolo's patch and the elfutils libdw powerpc64 > fallback unwinder patch, it looks like I get user stack traces for > everything now on ppc64le. > > Cheers, > > Mark > > (*) It just this one-liner, but what a difference that makes: > > --- a/tools/perf/util/unwind-libdw.c > +++ b/tools/perf/util/unwind-libdw.c > @@ -224,7 +224,7 @@ int unwind__get_entries(unwind_entry_cb_t cb, void *arg, > > err = dwfl_getthread_frames(ui->dwfl, thread->tid, frame_callback, ui); > > - if (err && !ui->max_stack) > + if (err && ui->max_stack != max_stack) > err = 0; > > /* >