public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@redhat.com>
To: Stephane Eranian <eranian@google.com>
Cc: LKML <linux-kernel@vger.kernel.org>, Jiri Olsa <jolsa@redhat.com>,
	Namhyung Kim <namhyung@kernel.org>,
	David Ahern <dsahern@gmail.com>,
	Peter Zijlstra <peterz@infradead.org>,
	"mingo@elte.hu" <mingo@elte.hu>
Subject: Re: [BUG] perf report: fails to symbolize when vaddr is non zero for shared objects
Date: Tue, 16 Jun 2015 11:34:01 -0300	[thread overview]
Message-ID: <20150616143401.GA2548@redhat.com> (raw)
In-Reply-To: <CABPqkBTPruhg+B3N899vEJtAsd8ihDs+oMjOB_C8Xs=ZZE-FDQ@mail.gmail.com>

Em Tue, Jun 16, 2015 at 12:03:01AM -0700, Stephane Eranian escreveu:
> Hi,
> 
> It has been brought to my attention that on systems where the text
> of shared libs is not loaded with a zero virtual address, perf report
> fails to symbolize
> correctly samples. This is true of older versions of perf and also the latest
> in tip.git.
> 
> I looked at symbol-elf.c and I did not see a place where the vaddr was taken
> into account from the program headers in the case of ET_DYN. I see it for
> ET_EXE, though.
> 
> $ readelf -e lib.so
>   Type:                              DYN (Shared object file)
>   ....
>   Type          Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
>  LOAD           0x000000 0x0000d000 0x0000d000 0x73657c 0x73657c R E 0x1000
> 
> If you get samples in the shared lib, they will be off, possibly
> attributed to the wrong
> functions.
> 
> Could this be fixed quickly?

You tell me, do you have a patch to propose? :-)

- Arnaldo

  reply	other threads:[~2015-06-16 14:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-16  7:03 [BUG] perf report: fails to symbolize when vaddr is non zero for shared objects Stephane Eranian
2015-06-16 14:34 ` Arnaldo Carvalho de Melo [this message]
2015-06-17 18:54   ` Stephane Eranian
2015-06-17 19:24     ` Arnaldo Carvalho de Melo

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=20150616143401.GA2548@redhat.com \
    --to=acme@redhat.com \
    --cc=dsahern@gmail.com \
    --cc=eranian@google.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox