]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
libdwarf: Use the cached strtab pointer when reading string attributes.
authormarkj <markj@FreeBSD.org>
Wed, 26 Jun 2019 16:38:30 +0000 (16:38 +0000)
committermarkj <markj@FreeBSD.org>
Wed, 26 Jun 2019 16:38:30 +0000 (16:38 +0000)
commit5d0da7a52e3c13b53a506ecdbbaa31656f5584a9
tree8fe28cbe79d24677c2c2904d7c5c95d5fe4a5b6e
parentda2dec8da831406f7939e510bca816e7fc21ea49
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
contrib/elftoolchain/libdwarf/libdwarf_attr.c