public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: Mark Wielaard <mjw@redhat.com>
To: Hemant Kumar <hemant@linux.vnet.ibm.com>
Cc: systemtap@sourceware.org, naveen.n.rao@linux.vnet.ibm.com,
	       ulrich.weigand@de.ibm.com, uweigand@gcc.gnu.org,
	anton@samba.org,        fche@redhat.com
Subject: Re: [PATCH v4 3/3] Fix: Priotirize symbol table lookup for ppc64le
Date: Wed, 22 Apr 2015 13:48:00 -0000	[thread overview]
Message-ID: <1429710516.1938.73.camel@bordewijk.wildebeest.org> (raw)
In-Reply-To: <1429525764-23471-3-git-send-email-hemant@linux.vnet.ibm.com>

On Mon, 2015-04-20 at 15:59 +0530, Hemant Kumar wrote:
> PPC64 ELF ABI v2 has a Global entry point and a local entry point
> for the functions. We need the Local entry point in order to probe
> these functions. However, the DIE for these functions in debuginfo
> return the function.entrypc which is same as the global entry point.
> The local entry point is not encoded in the debuginfo of the ELFs. The
> offset to local entry point is however encoded in the st_other field
> of these symbols in the symbol table.
> We need to use this field to adjust the sym.st_value to actually point
> to the local entry point instead of the global entry point.
> 
> This patch is in relation to this bug :
> https://sourceware.org/bugzilla/show_bug.cgi?id=17638
> 
> So, while adding symbols to the sym_table, we add an offset of
> PPC64_LOCAL_ENTRY_OFFSET(sym.st_other) to st_value.
> And when the function address is queried in query_dwarf_func(), we give
> priority to the cached sym_table, where we can retrieve the adjusted
> entry address of the function. If we don't get any address from the
> symbol table, then we proceed to get from the debuginfo.
> 
> Macro definition PPC64_LOCAL_ENTRY_OFFSET has been picked up from glibc.
> It won't be defined if we are building systemtap on a machine having
> older elf.h and hence, won't recognize PPC64_LOCAL_ENTRY_OFFSET.

Looks good. Pushed with one tiny change (in the commit message):
s/Priotirize/Prioritize/

Thanks,

Mark

  reply	other threads:[~2015-04-22 13:48 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-20 10:30 [PATCH v4 1/3] systemtap/tapsets.cxx: Fix dwarfless probes on multiple static functions Hemant Kumar
2015-04-20 10:30 ` [RFC PATCH 2/3] Test " Hemant Kumar
2015-04-20 11:18   ` Hemant Kumar
2015-04-22 21:21   ` Mark Wielaard
2015-04-20 10:31 ` [PATCH v4 3/3] Fix: Priotirize symbol table lookup for ppc64le Hemant Kumar
2015-04-22 13:48   ` Mark Wielaard [this message]
2015-04-22 14:30     ` Hemant Kumar
2015-04-22 13:40 ` [PATCH v4 1/3] systemtap/tapsets.cxx: Fix dwarfless probes on multiple static functions Mark Wielaard
2015-04-22 14:36   ` Hemant Kumar
2015-04-23 14:22     ` Mark Wielaard
2015-04-24 19:33       ` Mark Wielaard

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=1429710516.1938.73.camel@bordewijk.wildebeest.org \
    --to=mjw@redhat.com \
    --cc=anton@samba.org \
    --cc=fche@redhat.com \
    --cc=hemant@linux.vnet.ibm.com \
    --cc=naveen.n.rao@linux.vnet.ibm.com \
    --cc=systemtap@sourceware.org \
    --cc=ulrich.weigand@de.ibm.com \
    --cc=uweigand@gcc.gnu.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).