From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752962AbcHOTsT (ORCPT ); Mon, 15 Aug 2016 15:48:19 -0400 Received: from mail.kernel.org ([198.145.29.136]:42216 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752208AbcHOTsR (ORCPT ); Mon, 15 Aug 2016 15:48:17 -0400 Date: Mon, 15 Aug 2016 16:48:11 -0300 From: Arnaldo Carvalho de Melo To: "Wangnan (F)" Cc: Anton Blanchard , Peter Zijlstra , Ingo Molnar , "Naveen N. Rao" , Ravi Bangoria , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] perf symbols: Fix annotation of objects with debuginfo files Message-ID: <20160815194811.GC20972@kernel.org> References: <20160812163505.4fa6a699@kryten> <20160813115533.6de17912@kryten> <57B16BAB.2010003@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <57B16BAB.2010003@huawei.com> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.6.2 (2016-07-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Mon, Aug 15, 2016 at 03:13:47PM +0800, Wangnan (F) escreveu: > > > On 2016/8/13 9:55, Anton Blanchard wrote: > > From: Anton Blanchard > > > > Commit 73cdf0c6ea9c ("perf symbols: Record text offset in dso > > to calculate objdump address") started storing the offset of > > the text section for all DSOs: > > > > if (elf_section_by_name(elf, &ehdr, &tshdr, ".text", NULL)) > > dso->text_offset = tshdr.sh_addr - tshdr.sh_offset; > > > > Unfortunately this breaks debuginfo files, because we need to calculate > > the offset of the text section in the associated executable file. As a > > result perf annotate returns junk for all debuginfo files. > > > > Fix this by using runtime_ss->elf which should point at the executable > > when parsing a debuginfo file. > > > > Cc: stable@vger.kernel.org # v4.6+ > > Fixes: 73cdf0c6ea9c ("perf symbols: Record text offset in dso to calculate objdump address") > > Signed-off-by: Anton Blanchard > > I don't quite understand the debuginfo problem. I tested > this patch follow steps recorded in commit 99e87f7 and > see no problem. > > Tested-by: Wang Nan Thanks, applied. - Arnaldo