[all-commits] [llvm/llvm-project] a2154b: Cache the manual DWARF index out to the LLDB cache...

Greg Clayton via All-commits all-commits at lists.llvm.org
Tue Dec 28 11:00:46 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a2154b19515304f42000160bed820630c3780db8
      https://github.com/llvm/llvm-project/commit/a2154b19515304f42000160bed820630c3780db8
  Author: Greg Clayton <gclayton at fb.com>
  Date:   2021-12-28 (Tue, 28 Dec 2021)

  Changed paths:
    M lldb/include/lldb/Symbol/SymbolFile.h
    M lldb/include/lldb/Symbol/Symtab.h
    M lldb/include/lldb/Target/Statistics.h
    M lldb/source/Plugins/SymbolFile/DWARF/DIERef.cpp
    M lldb/source/Plugins/SymbolFile/DWARF/DIERef.h
    M lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp
    M lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.h
    M lldb/source/Plugins/SymbolFile/DWARF/NameToDIE.cpp
    M lldb/source/Plugins/SymbolFile/DWARF/NameToDIE.h
    M lldb/source/Symbol/Symtab.cpp
    M lldb/source/Target/Statistics.cpp
    M lldb/test/API/commands/statistics/basic/TestStats.py
    A lldb/test/API/functionalities/module_cache/debug_index/TestDebugIndexCache.py
    A lldb/test/API/functionalities/module_cache/debug_index/exe.yaml
    M lldb/test/API/functionalities/module_cache/simple_exe/TestModuleCacheSimple.py
    M lldb/unittests/SymbolFile/DWARF/CMakeLists.txt
    A lldb/unittests/SymbolFile/DWARF/DWARFIndexCachingTest.cpp

  Log Message:
  -----------
  Cache the manual DWARF index out to the LLDB cache directory when the LLDB index cache is enabled.

This patch add the ability to cache the manual DWARF indexing results to disk for faster subsequent debug sessions. Manual DWARF indexing is time consuming and causes all DWARF to be fully parsed and indexed each time you debug a binary that doesn't have an acceptable accelerator table. Acceptable accelerator tables include .debug_names in DWARF5 or Apple accelerator tables.

This patch breaks up testing by testing all of the encoding and decoding of required C++ objects in a gtest unit test, and then has a test to verify the debug info cache is generated correctly.

This patch also adds the ability to track when a symbol table or DWARF index is loaded or saved to the cache in the "statistics dump" command. This is essential to know in statistics as it can help explain why a debug session was slower or faster than expected.

Reviewed By: labath, wallace

Differential Revision: https://reviews.llvm.org/D115951




More information about the All-commits mailing list