[Lldb-commits] [PATCH] D62634: Improve DWARF parsing and accessing by 1% to 2%

Greg Clayton via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed May 29 16:16:34 PDT 2019


clayborg created this revision.
clayborg added reviewers: labath, JDevlieghere, aprantl.

When LLDB first started we didn't have our mmap of the DWARF data done correctly and if the backing file would change we would get live changes as the file changed and it would cause problems. We now mmap correctly and do not run into these issues.  There was legacy code in DWARFDebugInfoEntry::GetAbbreviationDeclarationPtr(...) that would always extract the abbrev index each time the function was called to verify that DWARF data hadn't changed and a warning was emitted if it did. We no longer need this and the code was removed. The other thing this function did when it parsed the abbrev index was give us the offset of the first attribute bytes by adding the LEB128 size to the offset. This required an extra parameter to DWARFDebugInfoEntry::GetAbbreviationDeclarationPtr(...) which is now removed. I added "lldb::offset_t DWARFDebugInfoEntry::GetFirstAttributeOffset() const" which calculates this when we need it and modified all sites that need the offset to call it.

Now that we aren't decoding and verifying the abbrev index, it speeds up DWARF access by 1% to 2%.


https://reviews.llvm.org/D62634

Files:
  source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
  source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62634.202076.patch
Type: text/x-patch
Size: 4639 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190529/b01953c6/attachment.bin>


More information about the lldb-commits mailing list