Received: by 2002:ac0:a679:0:0:0:0:0 with SMTP id p54csp367017imp; Thu, 21 Feb 2019 03:07:41 -0800 (PST) X-Google-Smtp-Source: AHgI3IbzJoM1C/NcSGV3r9hD4WxGJBUkR1QnHd2T/Rkl/xyPCT2QhkLNvtAPmeZtYhCflcf1Yc8O X-Received: by 2002:a62:f51d:: with SMTP id n29mr32524694pfh.21.1550747261594; Thu, 21 Feb 2019 03:07:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550747261; cv=none; d=google.com; s=arc-20160816; b=1Barwug7mdCJtAmE/b2e7a7GlddaG5QsJMV8Gzyt3G3RNWXOJLr1d50MHw4pfRiTWI s24LVU6iTupGoEQJ6zFjRu5mrNPl4yURcaLK1WAJ8OXUCxwLwfGUeaEDeMwlSRVc3Ymn yFvCpJVc1sb3uoOXH2hHKCRvii2Q6ufDz9MJph5DI7Vs4h9oEuTek1tg9YuMZ6TpDLwH gdsSm0lFvXVhjDRGB0jRnWaehM4d8NxnNDkQbzS4RXe8+t3O9jxmVbaCqflH+AgMsHmI K/phEw0vCZmk6RerszBsUQpEIeOyxJ6LyhJLW8ftGrdj3Su0oT8uwjNsmFb5D4kVdc+u mcvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=cE+MDT0555iB8vxnAdT+zBcvmOnlzq5ZEv7IRz1GyLQ=; b=ePNCrnZYY/+y0B3x5b3KVyfcNTMOmgrbqqnWgCHTSCwCAtpueQmeB+46hGciGwjLyq 0uO2xdw/9833CSytoSPWteuJt+XfCjC6nh9UosDfTpLcER5LxTaSxJO8JYM8lOKmJKrq +4G2kZOA1jamQpJ3n4ce2hAyxupAX6o5sDJ6EK2xtCbSL2W8OnjqUsAi6pMWAFNWZjKl aMMt+oXyY6S+T0W0H8+/BDrYXNDr2j2J9MG7MQyCkmV+aSmubC6qPX1hv8Tvr1X1ftJg v9Y21FcWCu9fXpMPxqGSayvaL7YY2IEGNjEKYieDIda5tNJz7GjsX2cKMsCx2kNgcWE/ tNMQ== 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x67si20619975pfb.255.2019.02.21.03.07.24; Thu, 21 Feb 2019 03:07:41 -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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727071AbfBULGC (ORCPT + 99 others); Thu, 21 Feb 2019 06:06:02 -0500 Received: from mx1.redhat.com ([209.132.183.28]:36776 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725823AbfBULGC (ORCPT ); Thu, 21 Feb 2019 06:06:02 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 079AC882F2; Thu, 21 Feb 2019 11:06:02 +0000 (UTC) Received: from krava (unknown [10.43.17.20]) by smtp.corp.redhat.com (Postfix) with SMTP id 4726C6014E; Thu, 21 Feb 2019 11:06:00 +0000 (UTC) Date: Thu, 21 Feb 2019 12:05:59 +0100 From: Jiri Olsa To: Wei Li Cc: peterz@infradead.org, mingo@redhat.com, acme@kernel.org, alexander.shishkin@linux.intel.com, namhyung@kernel.org, yao.jin@linux.intel.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] perf: fix getting source line failure in annotate Message-ID: <20190221110559.GF10990@krava> References: <20190221095716.39529-1-liwei391@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190221095716.39529-1-liwei391@huawei.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Thu, 21 Feb 2019 11:06:02 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 21, 2019 at 05:57:16PM +0800, Wei Li wrote: SNIP > liwei@euler:~/main_code/hulk_work/hulk/tools/perf$ sudo ./perf record ./common_while_1 > [ perf record: Woken up 2 times to write data ] > [ perf record: Captured and wrote 0.488 MB perf.data (12500 samples) ] > liwei@euler:~/main_code/hulk_work/hulk/tools/perf$ sudo ./perf annotate -l -s hotspot_1 --stdio > > Sorted summary for file /home/liwei/main_code/hulk_work/hulk/tools/perf/common_while_1 > ---------------------------------------------- > > 33.34 common_while_1.c:5 > 33.34 common_while_1.c:6 > 33.32 common_while_1.c:7 > Percent | Source code & Disassembly of common_while_1 for cycles:ppp (12482 samples, percent: local period) > ----------------------------------------------------------------------------------------------------------------- > : > : > : > : Disassembly of section .text: > : > : 00000000000005fa : > : hotspot_1(): > : void hotspot_1(void) > : { > 0.00 : 5fa: push %rbp > 0.00 : 5fb: mov %rsp,%rbp > : volatile int i; > : > : for (i = 0; i < 0x10000000; i++); > 0.00 : 5fe: movl $0x0,-0x4(%rbp) > 0.00 : 605: jmp 610 > 0.00 : 607: mov -0x4(%rbp),%eax > common_while_1.c:5 4.70 : 60a: add $0x1,%eax > 4.89 : 60d: mov %eax,-0x4(%rbp) > common_while_1.c:5 19.03 : 610: mov -0x4(%rbp),%eax > common_while_1.c:5 4.72 : 613: cmp $0xfffffff,%eax > 0.00 : 618: jle 607 > : for (i = 0; i < 0x10000000; i++); > 0.00 : 61a: movl $0x0,-0x4(%rbp) > 0.00 : 621: jmp 62c > 0.00 : 623: mov -0x4(%rbp),%eax > common_while_1.c:6 4.54 : 626: add $0x1,%eax > 4.73 : 629: mov %eax,-0x4(%rbp) > common_while_1.c:6 19.54 : 62c: mov -0x4(%rbp),%eax > common_while_1.c:6 4.54 : 62f: cmp $0xfffffff,%eax > ... > > Fixes: 425859ff0de33 ("perf annotate: No need to calculate notes->start twice") Acked-by: Jiri Olsa thanks, jirka