This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [PATCH v4 1/3] systemtap/tapsets.cxx: Fix dwarfless probes on multiple static functions
- From: Mark Wielaard <mjw at redhat dot com>
- To: Hemant Kumar <hemant at linux dot vnet dot ibm dot com>
- Cc: systemtap at sourceware dot org, naveen dot n dot rao at linux dot vnet dot ibm dot com, ulrich dot weigand at de dot ibm dot com, uweigand at gcc dot gnu dot org, anton at samba dot org, fche at redhat dot com
- Date: Fri, 24 Apr 2015 21:33:07 +0200
- Subject: Re: [PATCH v4 1/3] systemtap/tapsets.cxx: Fix dwarfless probes on multiple static functions
- Authentication-results: sourceware.org; auth=none
- References: <1429525764-23471-1-git-send-email-hemant at linux dot vnet dot ibm dot com> <1429710017 dot 1938 dot 71 dot camel at bordewijk dot wildebeest dot org> <5537B1CA dot 8030302 at linux dot vnet dot ibm dot com> <1429798891 dot 1938 dot 97 dot camel at bordewijk dot wildebeest dot org>
On Thu, 2015-04-23 at 16:21 +0200, Mark Wielaard wrote:
> On Wed, 2015-04-22 at 20:05 +0530, Hemant Kumar wrote:
> > On 04/22/2015 07:10 PM, Mark Wielaard wrote:
> > > @@ -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.
> > >
> > Right! looks good.
>
> And I am glad we did add that warning.
> Martin found it triggered on ppc64be (ELFv1 ABI).
And then Martin found another issue on ppc64be (ELFv1 ABI) when
systemtap was using an older elfutils (< 0.158). Again it was mostly
harmless, but somewhat inefficient. Fixed as follows:
commit f80d9cdb30789aecac4727ae87b22c373900e6ca
Author: Mark Wielaard <mjw@redhat.com>
Date: Fri Apr 24 19:59:32 2015 +0200
Filter out descriptor/SHN_UNDEF symbols in
symbol_table::lookup_symbol.
With newer elfutils (>= 0.158) function descriptor symbols get
resolved to their actual function entry address. With older elfutils
we mark such symbols as descriptor through reject_section (because
their address will match the .opd). Filter these symbols out in
symbol_table::lookup_symbol and symbol_table::lookup_symbol_address.
None of the callers want these SHN_UNDEF/descriptor symbol
(addresses).
This solves another instance of Multiple 'sys_ni_syscall' symbols
found warning on ppc64[be] with older elfutils.
Cheers,
Mark