Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2076930imm; Tue, 2 Oct 2018 20:36:10 -0700 (PDT) X-Google-Smtp-Source: ACcGV62J1nozP62nWKFfKqzeV7sqXBMmWSLQNetrH4nOZ04tEkW2Ijy+hxGAk6z5SllIzzRzTtZu X-Received: by 2002:a17:902:d88b:: with SMTP id b11-v6mr3422058plz.136.1538537770649; Tue, 02 Oct 2018 20:36:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538537770; cv=none; d=google.com; s=arc-20160816; b=Drf4tNQSnGFcglsKC6hQ5BiR+NlYswuyTCdWG2ZufiCFCYTJVxsCI0VqCG+6kiWS/p sX8ntJcpBsU1ojNB6tSp0PHNm2UT/oBB7wSTHtrTgtyrBZjU36xVkARtaBMv//0SZsms aMt1gwlvUJ3zfsfNuDlkqNO5jU/tWaz1by1WBpF9oGiiySRGn/oiZPGrbYLywcRf1lRM 22V+b8gXmjBYtHE/O08fYYUBWl1P7Kcu2q4FkT0+wgF1Mjcqe9Ji7VNJuy0hzXnUCqH/ EUH/iFejRpL8Iweh5pwG2KylIEtX9G2g41S9aXdJ2JjSviXe49L5/PrqMMJN0bEBS43x uncQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date:from :references:cc:to:subject; bh=zbgXA7lhw3YVUHTz5N/E3coJIBfBpVHtATx623UQKYQ=; b=YWK7pcABfheQQzf5btjEtVxswK44PhrGOnZdWK5+MHFCoTryDbXH5LVktO8c23xYCO Z4Zc7ZXVJrdgpujXs0SDT5DE2oJtzNKoJ9FDbkQGVPKP0L8T8uuLnLLLVct/J97ASaLF g3BZVZGU5pkS/cCrCMq7eMNWIsj7TRvVhDp3XY8UQH3VRoq0aCaqiIym30D7CES2uZhE YWEjCJxTcAACRJJUetnGE23bmhQYXnvkTtJK0d56hFjhyKx6aoSWjDMR4OXJ5DPJnr4v wMKU1sFysD/ML2umA9+AsuLQcFg0cQFS/xQ3t2l9baLLP+ptYYhGxEnMaaKu2nluhFEi YvEA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t7-v6si80276pfh.3.2018.10.02.20.35.52; Tue, 02 Oct 2018 20:36:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726548AbeJCKWR (ORCPT + 99 others); Wed, 3 Oct 2018 06:22:17 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:54468 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726162AbeJCKWR (ORCPT ); Wed, 3 Oct 2018 06:22:17 -0400 Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w933YKX6006109 for ; Tue, 2 Oct 2018 23:35:45 -0400 Received: from e06smtp01.uk.ibm.com (e06smtp01.uk.ibm.com [195.75.94.97]) by mx0a-001b2d01.pphosted.com with ESMTP id 2mvjdx6dnr-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 02 Oct 2018 23:35:45 -0400 Received: from localhost by e06smtp01.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 3 Oct 2018 04:35:44 +0100 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp01.uk.ibm.com (192.168.101.131) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 3 Oct 2018 04:35:40 +0100 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w933Zd4b655640 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 3 Oct 2018 03:35:39 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 845A111C04C; Wed, 3 Oct 2018 06:35:16 +0100 (BST) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5179E11C05B; Wed, 3 Oct 2018 06:35:15 +0100 (BST) Received: from [9.124.35.153] (unknown [9.124.35.153]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 3 Oct 2018 06:35:15 +0100 (BST) Subject: Re: [PATCH] perf record: use unmapped IP for inline callchain cursors To: Arnaldo Carvalho de Melo , Milian Wolff Cc: Ravi Bangoria , Jiri Olsa , Jin Yao , Linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org References: <20181002073949.3297-1-milian.wolff@kdab.com> <20181002153236.GD3541@kernel.org> From: Ravi Bangoria Date: Wed, 3 Oct 2018 09:05:37 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20181002153236.GD3541@kernel.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 18100303-4275-0000-0000-000002C42B85 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18100303-4276-0000-0000-000037CF3CD0 Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-10-03_01:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1810030036 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/02/2018 09:02 PM, Arnaldo Carvalho de Melo wrote: > Em Tue, Oct 02, 2018 at 09:39:49AM +0200, Milian Wolff escreveu: >> Only use the mapped IP to find inline frames, but keep >> using the unmapped IP for the callchain cursor. This >> ensures we properly show the unmapped IP when displaying >> a frame we received via the dso__parse_addr_inlines API >> for a module which does not contain sufficient debug symbols >> to show the srcline. > > So, the patch came mangled, I fixed it up, please check, I'm adding Ravi > to the CC list, so that he can check as well and retest, right Ravi? > > - Arnaldo > > From d9ddee9653d5676130471de9bc688fc7ec7b4fc4 Mon Sep 17 00:00:00 2001 > From: Milian Wolff > Date: Tue, 2 Oct 2018 09:39:49 +0200 > Subject: [PATCH 1/1] perf record: use unmapped IP for inline callchain cursors > > Only use the mapped IP to find inline frames, but keep using the unmapped IP > for the callchain cursor. This ensures we properly show the unmapped IP when > displaying a frame we received via the dso__parse_addr_inlines API for a module > which does not contain sufficient debug symbols to show the srcline. > > Before: > > $ perf record -e cycles:u --call-graph ls > $ perf script > ... > ls 12853 2735.563911: 43354 cycles:u: > 17878 __GI___tunables_init+0xffff01d1d63a0118 (/usr/lib/ld-2.28.so) > 19ee9 _dl_sysdep_start+0xffff01d1d63a02e9 (/usr/lib/ld-2.28.so) > 3087 _dl_start+0xffff01d1d63a0287 (/usr/lib/ld-2.28.so) > 2007 _start+0xffff01d1d63a0007 (/usr/lib/ld-2.28.so) > > After: > > $ perf script > ... > ls 12853 2735.563911: 43354 cycles:u: > 7f1714e46878 __GI___tunables_init+0x118 (/usr/lib/ld-2.28.so) > 7f1714e48ee9 _dl_sysdep_start+0x2e9 (/usr/lib/ld-2.28.so) > 7f1714e32087 _dl_start+0x287 (/usr/lib/ld-2.28.so) > 7f1714e31007 _start+0x7 (/usr/lib/ld-2.28.so) With current perf/urgent: $ sudo ./perf record --call-graph=dwarf -e probe_libc:inet_pton -- ping -6 -c 1 ::1 $ sudo ./perf script ping 4109 [011] 767269.031273: probe_libc:inet_pton: (7fff944cb458) 15b458 __inet_pton+0xffff0000d7920008 (inlined) 10feb3 gaih_inet.constprop.7+0xffff0000d7920f43 (/usr/lib64/libc-2.26. 110a13 __GI_getaddrinfo+0xffff0000d7920163 (inlined) 13c752d6f _init+0xbfb (/usr/bin/ping) 2371f generic_start_main.isra.0+0xffff0000d792013f (/usr/lib64/libc-2 2391b __libc_start_main+0xffff0000d79200bb (/usr/lib64/libc-2.26.so) With this patch: $ sudo ./perf script ping 4109 [011] 767269.031273: probe_libc:inet_pton: (7fff944cb458) 7fff944cb458 __inet_pton+0x8 (inlined) 7fff9447feb3 gaih_inet.constprop.7+0xf43 (/usr/lib64/libc-2.26.so) 7fff94480a13 __GI_getaddrinfo+0x163 (inlined) 13c752d6f _init+0xbfb (/usr/bin/ping) 7fff9439371f generic_start_main.isra.0+0x13f (/usr/lib64/libc-2.26.so) 7fff9439391b __libc_start_main+0xbb (/usr/lib64/libc-2.26.so) LGTM. Tested-by: Ravi Bangoria