Performance of libdw

Roland McGrath roland at hack.frob.com
Fri Jul 12 21:03:04 UTC 2013


> So readelf.c could be considered to use dwfl_module_addrsym "wrongly"
> since in general it will call it for lots of different addresses. We
> should probably build a search table. And maybe even do that not just
> in readelf.c but add it to libdwfl for use with dwfl_module_addrsym
> directly?

That seems reasonable.  I don't think it's worth writing such code to be
used only by readelf (except as a prototype).  The libdw layer should not
do anything more resource-hungry than what it already does (arguably the
line info support there is too eagerly resource-hungry already).  But it's
very reasonable for libdwfl.  We should first do a survey of known uses of
dwfl*addrsym.  If it has significant use where it's just done once or twice
rather than many times, then perhaps it's wiser to add a new interface that
sorts/caches for optimized lookup.


Thanks,
Roland


More information about the elfutils-devel mailing list