[Lldb-commits] [PATCH] D62630: Fix a regression in DWARF access speed caused by svn revision 356190

Greg Clayton via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed May 29 14:33:40 PDT 2019

clayborg created this revision.
clayborg added reviewers: labath, JDevlieghere, zturner, aadsm.
Herald added a subscriber: aprantl.

The issue was caused by the error checking code that was added. It was incorrectly adding an extra abbreviation when DWARFEnumState::Complete was received since it would push an extra abbreviation onto the list with the abbreviation code of zero. This cause m_idx_offset to be set to UINT32_MAX and caused every DWARFDebugInfoEntry that would try to get its DWARFAbbreviationDeclaration from the CU's DWARFAbbreviationDeclarationSet to always linearly search the abbreviation set for a given abbreviation code. Easy to see why this would cause things to be slow.

This regression was caused by: https://reviews.llvm.org/D59370. I asked to ensure there was no regression is parsing or access speed, but that must not have been done. In my test with 40 DWARF files trying to set a breakpoint by function name and in a header file, I see a 8% speed improvement with this fix.

There was no regression in correctness, just very inefficient access.

Added full unit testing for DWARFAbbreviationDeclarationSet parsing to ensure this doesn't regress.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62630.202055.patch
Type: text/x-patch
Size: 12318 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190529/8c0a9856/attachment.bin>

More information about the lldb-commits mailing list