HomeFreeBSD

libdwarf: Use the cached strtab pointer when reading string attributes.

Description

libdwarf: Use the cached strtab pointer when reading string attributes.

Previously we would perform a linear search of the DWARF section
list for ".debug_str". However, libdwarf always caches a pointer to
the strtab image in its debug descriptor. Using it gives a modest
performance improvement when iterating over the attributes of each
DIE.

Reviewed by: emaste
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D20759

Details

Provenance
markjAuthored on
Reviewer
emaste
Differential Revision
D20759: Avoid .debug_str lookups.
Parents
rS349423: elfcopy: Provide a size hint when creating the section string table.
Branches
Unknown
Tags
Unknown