While looking at performance for Mark's form-len patch, I found a few areas that I felt could be cleaned up a bit.
1. die->abbrev initialization was duplicated in a few places. 2. dwarf_hasattr needn't look at the die at all, just abbrev. 3. CU start/end boundaries don't need to be computed from section data every time -- just remember them in Dwarf_CU. These patches get me back down to about 71s for "varlocs -k >/dev/null". :) --- libdw/ChangeLog | 19 +++++++++++++++++++ libdw/dwarf_child.c | 47 ++++++++++++++++++----------------------------- libdw/dwarf_cuoffset.c | 4 ++-- libdw/dwarf_dieoffset.c | 4 ++-- libdw/dwarf_getattrs.c | 21 ++++++++------------- libdw/dwarf_hasattr.c | 42 ++++++++++++++++++++++++++++++++++++++---- libdw/dwarf_haschildren.c | 20 ++++---------------- libdw/dwarf_siblingof.c | 6 ++---- libdw/dwarf_tag.c | 20 +++++--------------- libdw/libdwP.h | 28 +++++++++++++++++++++++++++- libdw/libdw_findcu.c | 6 +++++- 11 files changed, 130 insertions(+), 87 deletions(-)