Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp4061239imm; Thu, 17 May 2018 21:35:22 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoI9tvtJmxMJZNsU+Q782d9EjsUcuzDf/z3VeiZf2pOsL5b3YNp55kvgSQLtZLqddyI/HSs X-Received: by 2002:a17:902:bd46:: with SMTP id b6-v6mr7951121plx.170.1526618121988; Thu, 17 May 2018 21:35:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526618121; cv=none; d=google.com; s=arc-20160816; b=wp/fgdlJVYXd49C5FTM/NbUdpcq5VKt+NGLyxjneEMmorecDl5co9Wtc7XeE1Qxd/V Ye/ZzMq6jDXSPPX2CckW1COMQqMdp3OCoVXGis7CsINPL/yU9UTVMTyWr3Jsp8GKyuYS sdMp18qD3FXSV7iY6q7d1m9hs3Y/rRciiMBc58rlXTxARCVhALDldj22tMJOl4oDKttX +LgIZec28hPzTNo1vRfIRtOIU33lJXVPsjPvjRWPnSqiJ3lZ9pnYt6AA6XNKsc1sgjCI 38tz9Wifwr9wzBc0btojiP2+QT96WMTqSmu9eXf10UAA5GY29PlcCsFzqjqJtzWzMZZP uOGQ== 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:arc-authentication-results; bh=LtIw7m4S4rPbFdG8Cun4UIpPrgAZ2JfwrfMGbV9XPXY=; b=lTPMIYj0p4KesHWcI9yXKIfjUbYWvePUXmVbe1/nl3ow3FsxN8UwQrDsrG4sDTBFcF +ecR1oxeQH2XHPx4GR9RxcwBs9vQNQRDyU1EqPNuNmXKhkU7aW18vnLdt8UISK4hw3ut Tnc++rr6NIGkctjUOrKQTv7s9M2O6163LWayUaLytrNkeS4/CwFEzs+I1tYeIl21tfUU sYNS2JuajbmdprP+WnT3cDHAUzJd2INToosYYnfDfBCK2HlOelNvS1Glu3XJAESAZqDO WqOQiW/ygFrw2ZWLV40dWA5yyzjGN5s69WA+/H1ajlwJkofJk5f0lXaPMwTEx+ASO3/k smjA== 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 m3-v6si6582868plt.71.2018.05.17.21.35.07; Thu, 17 May 2018 21:35:21 -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 S1751448AbeEREdv (ORCPT + 99 others); Fri, 18 May 2018 00:33:51 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:43384 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751112AbeEREdu (ORCPT ); Fri, 18 May 2018 00:33:50 -0400 Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w4I4Stqc008459 for ; Fri, 18 May 2018 00:33:49 -0400 Received: from e06smtp15.uk.ibm.com (e06smtp15.uk.ibm.com [195.75.94.111]) by mx0b-001b2d01.pphosted.com with ESMTP id 2j1pwb1wsg-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 18 May 2018 00:33:49 -0400 Received: from localhost by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 18 May 2018 05:33:48 +0100 Received: from b06cxnps4075.portsmouth.uk.ibm.com (9.149.109.197) by e06smtp15.uk.ibm.com (192.168.101.145) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 18 May 2018 05:33:46 +0100 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w4I4XkJB7143806; Fri, 18 May 2018 04:33:46 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5340B52043; Fri, 18 May 2018 04:23:52 +0100 (BST) Received: from [9.124.31.207] (unknown [9.124.31.207]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTP id 4155F5203F; Fri, 18 May 2018 04:23:51 +0100 (BST) Subject: Re: [PATCH 1/2] perf script: Show virtual addresses instead of offsets To: Arnaldo Carvalho de Melo , jolsa@redhat.com Cc: Sandipan Das , linux-kernel@vger.kernel.org, naveen.n.rao@linux.vnet.ibm.com References: <20180517063326.6319-1-sandipan@linux.vnet.ibm.com> <20180517195957.GD18538@kernel.org> From: Ravi Bangoria Date: Fri, 18 May 2018 10:03:44 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180517195957.GD18538@kernel.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 18051804-0020-0000-0000-0000041E7BA0 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18051804-0021-0000-0000-000042B3A21C Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-05-18_02:,, 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=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1805180047 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Arnaldo, We already have a binary offset handy in perf code but there is no way to dump it with perf script. We can derive it from symname+symoff but that's a manual work. Will it be good to have a '-F binoff' option? Ravi On 05/18/2018 01:29 AM, Arnaldo Carvalho de Melo wrote: > Em Thu, May 17, 2018 at 12:03:25PM +0530, Sandipan Das escreveu: >> When perf data is recorded with the call-graph option enabled, >> the callchain shown by perf script shows the binary offsets of >> the symbols as the ip. This is incorrect for kernel symbols as >> the ip values are always off by a fixed offset depending on the >> architecture. If the offsets from the start of the symbols are >> printed, they are also incorrect for both kernel and userspace >> symbols. >> >> Without the call-graph option, the callchain shows the virtual >> addresses of the symbols rather than their binary offsets. The >> offsets printed in this case are also correct. >> >> This fixes the inconsistency in perf script's output. > > Thanks, tested and applied, > > - Arnaldo >