From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752522AbbFZPfp (ORCPT ); Fri, 26 Jun 2015 11:35:45 -0400 Received: from mga11.intel.com ([192.55.52.93]:16027 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752163AbbFZPfh (ORCPT ); Fri, 26 Jun 2015 11:35:37 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,685,1427785200"; d="scan'208";a="514717952" Message-ID: <558D7145.3030403@intel.com> Date: Fri, 26 Jun 2015 18:35:33 +0300 From: Adrian Hunter User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Will Deacon CC: "acme@redhat.com" , "linux-kernel@vger.kernel.org" , Kristina Martsenko , Vladimir Nikulichev , Namhyung Kim , luto@amacapital.net Subject: Re: [PATCH] perf tools: don't adjust symbols in vDSO References: <1435162623-20075-1-git-send-email-will.deacon@arm.com> <558C02DD.4010700@intel.com> <20150626122308.GC9791@arm.com> <558D59D1.1040102@intel.com> <20150626145835.GD9791@arm.com> In-Reply-To: <20150626145835.GD9791@arm.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 26/06/2015 5:58 p.m., Will Deacon wrote: > (CC'ing Andy, since the removal of VDSO_PRELINK is user-visible here) > On Fri, Jun 26, 2015 at 02:55:29PM +0100, Adrian Hunter wrote: >> On 26/06/15 15:23, Will Deacon wrote: >>> On Thu, Jun 25, 2015 at 02:32:13PM +0100, Adrian Hunter wrote: >>>> On 24/06/15 19:17, Will Deacon wrote: >>>>> Commit 922d0e4d9f04 ("perf tools: Adjust symbols in VDSO") changed the >>>>> ELF symbol parsing so that the vDSO is treated the same as ET_EXEC and >>>>> ET_REL binaries despite being an ET_DYN. >>>>> >>>>> This causes objdump, which expects relative addresses, not to produce >>>>> any output in conjunction with perf annotate, which cheerfully passes >>>>> absolute addresses when trying to disassemble vDSO functions. >>>>> >>>>> This patch avoids marking the vDSO as requiring adjustment of symbol >>>>> addresses, allowing the relative program counter to be used instead. >>>>> >>>>> Cc: Vladimir Nikulichev >>>>> Cc: Adrian Hunter >>>>> Cc: Namhyung Kim >>>>> Reported-by: Kristina Martsenko >>>>> Signed-off-by: Will Deacon >>>>> --- >>>>> >>>>> Not sure why I've just started seeing this, but it appears to affect >>>>> both x86 and arm64. Also, if I revert the patch above then the issue >>>>> it supposedly fixed doesn't resurface. Maybe it was just masking another >>>>> bug that has since been addressed? >>>> >>>> No the problem still appears on older kernels. >>> >>> Can you be more specific, please? I tried with a 3.16 kernel (that I happen >> >> 3.13 Ubuntu kernel > > So I just tried that on a core2 box and it's broken even without my patch: > > # ./perf record -e cycles:u ./vdso-test > [...] > # ./perf report > [...] > # Overhead Command Shared Object Symbol > # ........ ......... ................. ........................ > # > 99.70% vdso-test [vdso] [.] __vdso_clock_gettime Annotation is broken but the symbol gets resolved.