This is the mail archive of the
elfutils-devel@sourceware.org
mailing list for the elfutils project.
Re: Performance of libdw
- From: Roland McGrath <roland at hack dot frob dot com>
- To: elfutils-devel at lists dot fedorahosted dot org
- Date: Fri, 12 Jul 2013 14:03:04 -0700
- Subject: Re: Performance of libdw
> 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