Received: by 2002:ac0:a679:0:0:0:0:0 with SMTP id p54csp826568imp; Thu, 21 Feb 2019 12:03:07 -0800 (PST) X-Google-Smtp-Source: AHgI3IaUMigoQ5rTgqdTWAZPtml9x3DEhS+XeEBriD+sWnN8mPgYpca+QsxTYCvGHJccX6Yeq4HT X-Received: by 2002:a17:902:2e01:: with SMTP id q1mr293316plb.240.1550779387169; Thu, 21 Feb 2019 12:03:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550779387; cv=none; d=google.com; s=arc-20160816; b=OyC7oWJwQCSJtIrz4cLq0Kg0UcCj2HJrhRYPPFnfbYH82GvGaofsoroHUIN0sD5bC1 vaZsPkulHD2iG9oYPUhCPw1pr55WwYeB3HLKZXAFecfSCLgFJGggcEp/yB2FkXjZKw9H bU22rlR+yqsKKWKCfu7IUHVUaOMI/zOWPrWAoHJ0qvSqN/NbQ1t+xXcY8JDNymhb3HMs SG2cuzrTvhadgVM5qtMaomJOzCRuHuhBwCZROHzFb+dpw3yMfuuSxThuJRoyCoUmj8T5 I4CtiZRWgE2UVsy31hLlCa+tLcrcDnSV571F9RxzyfBCBXVNV5ugvp3rBSBdLZii9wHM nYjA== 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:dkim-signature; bh=bU0mkESCFSfpR/VQtnvGpnThKcec2zC/n7d/GAH6lSw=; b=EkZMeRTXewDjtKbGN9mBRTNy59I9vT773EmSQl+5tcpesrWZzm8n1ZxV9Ycf9Gd8jW +deYkAkhWjt9fwjN+uoYvFcW+ICmNbYfaE5Q+D1GrZvrYDhs3tNrnRzhEBMD0HGx9jzG KSAXOiytVLqpAj9z0gEwTRRUB8uV0P9ecoVAdqGqXjPRxw5smFnbdbjCk716t/NNQ+we XRc3SK39ZMIL5l9J0ZbNgoSTTMuaCbiQCT4thWKhUaNUPPhlKf5rA8hIVIdCcHQj8UHu 5964zrpZ5sg091es0PsZFttYqUk0LpCLTg44Hc3Qp2EiL5VM9TRbmYSiWdH1lsAfImbd mhuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Hed6d4nV; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d34si18882681pld.290.2019.02.21.12.02.50; Thu, 21 Feb 2019 12:03:07 -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; dkim=pass header.i=@kernel.org header.s=default header.b=Hed6d4nV; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726492AbfBUUCX (ORCPT + 99 others); Thu, 21 Feb 2019 15:02:23 -0500 Received: from mail.kernel.org ([198.145.29.99]:55902 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726220AbfBUUCW (ORCPT ); Thu, 21 Feb 2019 15:02:22 -0500 Received: from quaco.ghostprotocols.net (177-59-142-252.3g.claro.net.br [177.59.142.252]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7057120836; Thu, 21 Feb 2019 20:02:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1550779341; bh=WTKDTr2v0ygCzAtrSj1n4A83MC3rN5fX8gxVTO5OxZU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Hed6d4nVbVqH3V2NxCcjkexUJDtudPYVuQiRLotrhO3f4Bt1v20NURuQJjrkraRgz e5YtmrA8Mx0Z5tXV/nfy2tLwCQo0K0ma8X/n758iJ2HnDiCgJH5KcWZ/FDYf69wJO+ kDrovkOJReA5IrzSG/+OVALu0fO32NKvIcWt/h3E= Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 49E0B4039C; Thu, 21 Feb 2019 17:02:17 -0300 (-03) Date: Thu, 21 Feb 2019 17:02:17 -0300 From: Arnaldo Carvalho de Melo To: Wei Li Cc: Jiri Olsa , peterz@infradead.org, mingo@redhat.com, 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: <20190221200217.GG9755@kernel.org> References: <20190221095716.39529-1-liwei391@huawei.com> <20190221110559.GF10990@krava> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190221110559.GF10990@krava> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Thu, Feb 21, 2019 at 12:05:59PM +0100, Jiri Olsa escreveu: > 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 Tested and applied. Thanks for the Fixes: tag! - Arnaldo