All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adrian Hunter <adrian.hunter@intel.com>
To: Will Deacon <will.deacon@arm.com>
Cc: "acme@redhat.com" <acme@redhat.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Kristina Martsenko <Kristina.Martsenko@arm.com>,
	Vladimir Nikulichev <nvs@tbricks.com>,
	Namhyung Kim <namhyung@kernel.org>,
	luto@amacapital.net
Subject: Re: [PATCH] perf tools: don't adjust symbols in vDSO
Date: Fri, 26 Jun 2015 18:35:33 +0300	[thread overview]
Message-ID: <558D7145.3030403@intel.com> (raw)
In-Reply-To: <20150626145835.GD9791@arm.com>

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 <nvs@tbricks.com>
>>>>> Cc: Adrian Hunter <adrian.hunter@intel.com>
>>>>> Cc: Namhyung Kim <namhyung@kernel.org>
>>>>> Reported-by: Kristina Martsenko <kristina.martsenko@arm.com>
>>>>> Signed-off-by: Will Deacon <will.deacon@arm.com>
>>>>> ---
>>>>>
>>>>> 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.


      parent reply	other threads:[~2015-06-26 15:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-24 16:17 [PATCH] perf tools: don't adjust symbols in vDSO Will Deacon
2015-06-25 13:32 ` Adrian Hunter
2015-06-26 12:23   ` Will Deacon
2015-06-26 13:55     ` Adrian Hunter
2015-06-26 14:58       ` Will Deacon
2015-06-26 15:18         ` Andy Lutomirski
2015-06-26 15:29           ` Will Deacon
2015-06-26 15:44             ` Andy Lutomirski
2015-06-27  9:03               ` Will Deacon
2015-06-26 15:35         ` Adrian Hunter [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=558D7145.3030403@intel.com \
    --to=adrian.hunter@intel.com \
    --cc=Kristina.Martsenko@arm.com \
    --cc=acme@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=namhyung@kernel.org \
    --cc=nvs@tbricks.com \
    --cc=will.deacon@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.