[Lldb-commits] [PATCH] D121631: Introduce new symbol on-demand for debug info

jeffrey tan via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Mar 14 11:41:23 PDT 2022


yinghuitan created this revision.
yinghuitan added reviewers: clayborg, aadsm, jingham.
Herald added subscribers: arphaman, mgorny.
Herald added a project: All.
yinghuitan requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added subscribers: lldb-commits, sstefan1.
Herald added a project: LLDB.

This diff introduces a new symbol on-demand which skips
loading a module's debug info unless explicitly asked on
demand. This provides significant performance improvement
for application with dynamic linking mode which has large
number of modules.
The feature can be turned on with:
 "settings set symbols.load-on-demand true"

In internal benchmark, we are seeing more than 95% improvement
for a 3000 modules application.

Currently we are providing several ways to on demand hydrate
a module's debug info:

- Source line breakpoint: matching in supported files
- Stack trace: resolving symbol context for an address
- Symbolic breakpoint: symbol table match guided promotion
- Global variable: symbol table match guided promotion

In all above situations the module's module will be on-demand
parsed and indexed.

To ensure the feature works by default for most situations the
diff introduces a new ondemand debug info test category. Most of
the tests are working by default except the tests that query for
type info which are not loaded.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D121631

Files:
  include/lldb/Symbol/SymbolFileOnDemand.h
  lldb/include/lldb/Core/ModuleList.h
  lldb/include/lldb/Symbol/SymbolFile.h
  lldb/include/lldb/Symbol/SymbolFileOnDemand.h
  lldb/include/lldb/Target/Statistics.h
  lldb/include/lldb/Utility/LLDBLog.h
  lldb/packages/Python/lldbsuite/test/builders/builder.py
  lldb/packages/Python/lldbsuite/test/lldbtest.py
  lldb/packages/Python/lldbsuite/test/test_categories.py
  lldb/source/Core/CoreProperties.td
  lldb/source/Core/Module.cpp
  lldb/source/Core/ModuleList.cpp
  lldb/source/Plugins/SymbolFile/DWARF/DWARFIndex.cpp
  lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.cpp
  lldb/source/Symbol/CMakeLists.txt
  lldb/source/Symbol/CompileUnit.cpp
  lldb/source/Symbol/SymbolFile.cpp
  lldb/source/Symbol/SymbolFileOnDemand.cpp
  lldb/source/Target/Statistics.cpp
  lldb/source/Utility/LLDBLog.cpp
  lldb/test/API/functionalities/breakpoint/breakpoint_ids/TestBreakpointIDs.py
  lldb/test/API/functionalities/find-line-entry/TestFindLineEntry.py
  lldb/test/API/functionalities/limit-debug-info/TestLimitDebugInfo.py
  lldb/test/API/functionalities/show_location/TestShowLocationDwarf5.py
  lldb/test/API/functionalities/type_get_module/TestTypeGetModule.py
  lldb/test/API/lang/c/enum_types/TestEnumTypes.py
  lldb/test/API/lang/c/global_variables/TestGlobalVariables.py
  lldb/test/API/lang/c/shared_lib/TestSharedLib.py
  lldb/test/API/lang/c/shared_lib_stripped_symbols/TestSharedLibStrippedSymbols.py
  lldb/test/API/lang/c/sizeof/TestCSizeof.py
  lldb/test/API/lang/c/unicode/TestUnicodeSymbols.py
  lldb/test/API/lang/cpp/breakpoint-commands/TestCPPBreakpointCommands.py
  lldb/test/API/lang/cpp/enum_types/TestCPP11EnumTypes.py
  lldb/test/API/lang/cpp/namespace_definitions/TestNamespaceDefinitions.py
  lldb/test/API/lang/cpp/sizeof/TestCPPSizeof.py
  lldb/test/API/lang/cpp/template-function/TestTemplateFunctions.py
  lldb/test/Shell/SymbolFile/OnDemand/Inputs/basic.cpp
  lldb/test/Shell/SymbolFile/OnDemand/Inputs/lib.cpp
  lldb/test/Shell/SymbolFile/OnDemand/Inputs/lib.h
  lldb/test/Shell/SymbolFile/OnDemand/Inputs/shared.cpp
  lldb/test/Shell/SymbolFile/OnDemand/shared-lib-globals.test
  lldb/test/Shell/SymbolFile/OnDemand/shared-lib.test
  lldb/test/Shell/SymbolFile/OnDemand/source-breakpoint.test
  lldb/test/Shell/SymbolFile/OnDemand/symbolic-breakpoint.test

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D121631.415174.patch
Type: text/x-patch
Size: 70174 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220314/4301f3e8/attachment-0001.bin>


More information about the lldb-commits mailing list