[PATCH] libdw: Make dwarf_getfuncs find all (defining) DW_TAG_subprogram DIEs.

Mark Wielaard mjw at redhat.com
Sun Sep 22 20:06:25 UTC 2013


On Fri, Sep 20, 2013 at 06:49:49PM -0700, Josh Stone wrote:
> On 09/20/2013 06:55 AM, Mark Wielaard wrote:
> > But it still doesn't seem to find as many probes as you do:
> > Pass 2: analyzed script: 72231 probe(s) [...]
> > 
> > Of course this does much more than just finding the defining
> > subprograms. So we might not be comparing the exact same thing. Could
> > you post you systemtap patch somewhere? I am just using the packaged
> > systemtap-2.3-1.fc19.x86_64 on itself with LD_LIBRARY_PATH pointing to a
> > elfutils git build with the below patch.
> 
> I think the apparent difference in your new patch is some oddity in
> stap's git master.  With your new patch for elfutils.git w/ stap-2.3, I
> also get 72231, and w/ stap.git I get 75713.
> 
> The additions in stap.git look fishy.  There are a lot with pc=0, which
> shouldn't happen, like:
> probe abort@@GLIBC_2.2.5@:-1 process=/usr/bin/stap reloc=.dynamic pc=0x0
> 
> Then some have no file:line info, but these might be fine, like:
> probe _fini@:-1 process=/usr/bin/stap reloc=.dynamic pc=0x1edf14
> 
> But anyway, it doesn't appear to be an elfutils issue.

I replicated your results with systemtap git. I think these new probes
don't come from the DWARF code, but come from the function table fallback
code (the distro stap binary has a minisymtab added, which triggers this
code path). Looks like that code correctly adds some probes for symbols
that have a defined address, but should also filter out those that it
cannot resolve.

Thanks,

Mark


More information about the elfutils-devel mailing list