Received: by 10.223.164.202 with SMTP id h10csp4694057wrb; Wed, 29 Nov 2017 10:17:05 -0800 (PST) X-Google-Smtp-Source: AGs4zMY9dGwv4FagGqgTX81ICOvMJXmHutu7HMWTmXJa/zn51rhMCqukyOb7JhND+C5R2X4CPRi6 X-Received: by 10.98.198.73 with SMTP id m70mr3867234pfg.92.1511979425048; Wed, 29 Nov 2017 10:17:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511979425; cv=none; d=google.com; s=arc-20160816; b=sx5lGknXyjxOjOvoA/IS9M6SeRNg9kKm0/URt4VbkaLijbSpO6QjmxfS+U4PGKvPAY XrztneH/GBSjbCipQUJkO5C0WZCcUMafv8gFw+Vt0Fs9l3E0y3pNZaZ91/DFeZe0Q1Pu d7wmcZGlMbsNvOj5xgmB0sDd376Yk8PpnqEwGa1p7CrmSx97AgxrlUJrdiwrdE08lLyE dxKAXFamkfzLWcS5XpB4cRX9bEMAXDp7PpgJNbWkJZF1BGwy/EZr5QXP9lbnV5WqZlVj xOha0WWmVm8EvaK6uXlZgho6dWq1ddN4hfHXZjiwLkPtun0fP0oUtlYIezHHKIJZmn6Q XEHw== 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-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :from:references:cc:to:subject:arc-authentication-results; bh=6F+WGj0i3z8JXuwDhReuCOqH2Zs2w7Gl0zWNpch17zw=; b=d790KZU3DwMgVAY8ahR4V2rZSjD/PGbTcZrF7Yn42Fx6JPQGe4v/zKryR9fR7LTgtt ZzE3VYdxttNDfPfNvSji8F5AFKJk8kU339DiobI1gv6vO547/vEyo8+qVlmvHioUNFr+ NZiaz1MPHuwmfJOJZ6xGC6kSN/VAuUmzI7/HfsEUcwHH0bpWlyC5eYz2SJo0hBwOQ3Cf qb5p5E2hmOwX1HDZflByjIDHQBMPkexeOoB8QKqgx+Ko25icOvxPZ8bbZ8jM3K6H17an Z+1S54adYTK8ETaUBuTmb9E3//dPrfWKevT3XfNNQLWSlN9Z1Ne+YrjZZI9FFMOvQpwK wIyg== 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 f9si1605877plo.553.2017.11.29.10.16.54; Wed, 29 Nov 2017 10:17:05 -0800 (PST) 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 S1754167AbdK2NXi (ORCPT + 70 others); Wed, 29 Nov 2017 08:23:38 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:59964 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753315AbdK2NXg (ORCPT ); Wed, 29 Nov 2017 08:23:36 -0500 Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id vATDKaCV070162 for ; Wed, 29 Nov 2017 08:23:36 -0500 Received: from e06smtp10.uk.ibm.com (e06smtp10.uk.ibm.com [195.75.94.106]) by mx0a-001b2d01.pphosted.com with ESMTP id 2ehvqrb4au-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Wed, 29 Nov 2017 08:23:35 -0500 Received: from localhost by e06smtp10.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 29 Nov 2017 13:23:34 -0000 Received: from b06cxnps4075.portsmouth.uk.ibm.com (9.149.109.197) by e06smtp10.uk.ibm.com (192.168.101.140) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 29 Nov 2017 13:23:31 -0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id vATDNUNo34210036; Wed, 29 Nov 2017 13:23:30 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1E2DCA4057; Wed, 29 Nov 2017 13:18:03 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7CCE3A4040; Wed, 29 Nov 2017 13:18:00 +0000 (GMT) Received: from [9.79.224.165] (unknown [9.79.224.165]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 29 Nov 2017 13:18:00 +0000 (GMT) Subject: Re: [PATCH] perf annotate: Fix objdump comment parsing for Intel mov dissassembly To: Thomas Richter Cc: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, acme@kernel.org, brueckner@linux.vnet.ibm.com, schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com, Ravi Bangoria References: <20171128075632.72182-1-tmricht@linux.vnet.ibm.com> From: Ravi Bangoria Date: Wed, 29 Nov 2017 18:54:02 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171128075632.72182-1-tmricht@linux.vnet.ibm.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US X-TM-AS-GCONF: 00 x-cbid: 17112913-0040-0000-0000-000003F3F893 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17112913-0041-0000-0000-000025F6DADE Message-Id: <69859e3b-cb22-a536-79ca-ffc44c3f86a8@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-11-29_05:,, 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 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1711290172 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/28/2017 01:26 PM, Thomas Richter wrote: > The command 'perf annotate' parses the output of objdump and also > investigates the comments produced by objdump. For example the > output of objdump produces (on x86): > > 23eee: 4c 8b 3d 13 01 21 00 mov 0x210113(%rip),%r15 > # 234008 > > and the function mov__parse() is called to investigate the complete > line. Mov__parse() breaks this line into several parts and finally > calls function comment__symbol() to parse the data after the comment > character '#'. Comment__symbol() expects a hexadecimal address followed > by a symbol in '<' and '>' brackets. > > However the 2nd parameter given to function comment__symbol() > always points to the comment character '#'. The address parsing > always returns 0 because the character '#' is not a digit and > strtoull() fails without being noticed. > > Fix this by advancing the second parameter to function comment__symbol() > by one byte before invocation and add an error check after strtoull() > has been called. Yeah, looks like it fails to get correct value in 'addrp'. Can you please show the difference in perf annotate output before and after patch. Thanks, Ravi From 1585413937346233957@xxx Wed Nov 29 15:15:52 +0000 2017 X-GM-THRID: 1585295770389440484 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread