Page MenuHomeFreeBSD

Avoid .debug_str lookups.
ClosedPublic

Authored by markj on Jun 25 2019, 4:24 PM.
Tags
None
Referenced Files
F111812834: D20759.diff
Sat, Mar 8, 5:49 PM
F111767952: D20759.id.diff
Sat, Mar 8, 3:12 AM
Unknown Object (File)
Tue, Mar 4, 10:28 AM
Unknown Object (File)
Fri, Feb 21, 4:07 PM
Unknown Object (File)
Jan 29 2025, 7:04 AM
Unknown Object (File)
Dec 31 2024, 9:34 PM
Unknown Object (File)
Dec 30 2024, 1:32 AM
Unknown Object (File)
Oct 31 2024, 3:17 PM
Subscribers

Details

Summary

libdwarf caches a string table handle, use that instead. This provides
a noticeable speedup when iterating through DIEs, since we would
otherwise do a linear search of all of the DWARF sections looking for
".debug_str" using strcmp().

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Presumably _dwarf_strtab_init is guaranteed to be called?

Presumably _dwarf_strtab_init is guaranteed to be called?

The only way it won't be called is if an earlier error occurs during initialization. If there is no string table, then the assertion in the removed code would fail.

This revision is now accepted and ready to land.Jun 25 2019, 7:58 PM