This is the mail archive of the mailing list for the elfutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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

On 09/20/2013 12:13 AM, Mark Wielaard wrote:
> I had been pondering exposing a public DIE tree walk function, since
> there are some tricky corner cases to take care of. If you have a
> particular need/design it would be interesting to compare notes. Would
> something like the __libdw_visit_scopes interface be generic enough?

I think a function *like* that would be nice, but it's current form is a
bit ugly for public consumption.  :)

I don't really have any particular needs, as we do ok in stap with our
own iteration now.  It would probably be a little bit faster just by
INTUSE calls, and embodying a correct walk in the library seems like a
good thing in general.

BTW, another thing I noticed, which I mentioned on IRC, is that the
static function classify_die() is doing a lot more work than
visit_scopes actually needs.  The classify_die()==imported check could
be a single tag comparison, and then the second call is squashing
match/match_inline/walk down to the same action, so that distinction is
also meaningless.

It's a bit of a micro-optimization, but I did see real gains by
simplifying this when I played with your new dwarf_getfuncs.  I'll see
about whipping up a patch and informal timing stats next week...


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]