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 1/3] systemtap/tapsets.cxx: Fix dwarfless probes on multiple static functions
Date: Wed, 22 Apr 2015 13:40:00 -0000	[thread overview]
Message-ID: <1429710017.1938.71.camel@bordewijk.wildebeest.org> (raw)
In-Reply-To: <1429525764-23471-1-git-send-email-hemant@linux.vnet.ibm.com>

Hi Hemant,

On Mon, 2015-04-20 at 15:59 +0530, Hemant Kumar wrote:
> With multiple static functions with same names in an ELF and in absence
> of dwarf, if we probe on one of the functions, then systemtap places
> probe only on one static function ignoring the rest. This is because the
> mapping between the symbol names and their func_info is a simple map
> which doesn't allow insertion of another symbol with the same name.
> 
> This patch fixes this issue by changing this map to a multimap which
> allows duplicate entries for the same symbol name. lookup_symbol code
> will return a set of func_info * instead of a single descriptor for a
> function name.
> 
> We also need to fix other areas in the code where lookup_symbol() and
> lookup_symbol_address() are being called so as to look for a set of
> func_info's and a list of Dwarf_Addr's respectively, instead of a single
> descriptor.

Looks good. I pushed this with one tiny change:

@@ -8242,6 +8242,8 @@ symbol_table::purge_syscall_stubs()
   if (!addrs || addrs->empty())
     return;
   /* Highly unlikely that multiple symbols named "sys_ni_syscall" may exist */
+  if (addrs->size() > 1)
+    cerr << _("Multiple 'sys_ni_syscall' symbols found.");
   Dwarf_Addr stub_addr = addrs->front();

Just so that if this highly unlikely scenario does occur we get a
warning something is fishy.

Thanks,

Mark

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

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-20 10:30 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
2015-04-22 14:30     ` Hemant Kumar
2015-04-22 13:40 ` Mark Wielaard [this message]
2015-04-22 14:36   ` [PATCH v4 1/3] systemtap/tapsets.cxx: Fix dwarfless probes on multiple static functions 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=1429710017.1938.71.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).