|
Revision tags: llvmorg-20.1.0, llvmorg-20.1.0-rc3, llvmorg-20.1.0-rc2, llvmorg-20.1.0-rc1, llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init, llvmorg-14.0.6, llvmorg-14.0.5, llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2 |
|
| #
7b81192d |
| 20-Apr-2022 |
Jeffrey Tan <[email protected]> |
Introduce new symbol on-demand for debug info
This diff introduces a new symbol on-demand which skips loading a module's debug info unless explicitly asked on demand. This provides significant perfo
Introduce new symbol on-demand for debug info
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"
The feature works by creating a new SymbolFileOnDemand class for each module which wraps the actual SymbolFIle subclass as member variable. By default, most virtual methods on SymbolFileOnDemand are skipped so that it looks like there is no debug info for that module. But once the module's debug info is explicitly requested to be enabled (in the conditions mentioned below) SymbolFileOnDemand will allow all methods to pass through and forward to the actual SymbolFile which would hydrate module's debug info on-demand.
In an 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 debug info will be on-demand parsed and indexed.
Some follow-ups for this feature: * Add a command that allows users to load debug info explicitly while using a new or existing command when this feature is enabled * Add settings for "never load any of these executables in Symbols On Demand" that takes a list of globs * Add settings for "always load the the debug info for executables in Symbols On Demand" that takes a list of globs * Add a new column in "image list" that shows up by default when Symbols On Demand is enable to show the status for each shlib like "not enabled for this", "debug info off" and "debug info on" (with a single character to short string, not the ones I just typed)
Differential Revision: https://reviews.llvm.org/D121631
show more ...
|
|
Revision tags: llvmorg-14.0.1, llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2 |
|
| #
3db7cc1b |
| 10-Feb-2022 |
Greg Clayton <[email protected]> |
Fix a double debug info size counting in top level stats for "statistics dump".
This mainly affects Darwin targets (macOS, iOS, tvOS and watchOS) when these targets don't use dSYM files and the debu
Fix a double debug info size counting in top level stats for "statistics dump".
This mainly affects Darwin targets (macOS, iOS, tvOS and watchOS) when these targets don't use dSYM files and the debug info was in the .o files. All modules, including the .o files that are loaded by the debug maps, were in the global module list. This was great because it allows us to see each .o file and how much it contributes. There were virtual functions on the SymbolFile class to fetch the symtab/debug info parse and index times, and also the total debug info size. So the main executable would add all of the .o file's stats together and report them as its own data. Then the "totalDebugInfoSize" and many other "totalXXX" top level totals were all being added together. This stems from the fact that my original patch only emitted the modules for a target at the start of the patch, but as comments from the reviews came in, we switched to emitting all of the modules from the global module list.
So this patch fixes it so when we have a SymbolFileDWARFDebugMap that loads .o files, the main executable will have no debug info size or symtab/debug info parse/index times, but each .o file will have its own data as a separate module. Also, to be able to tell when/if we have a dSYM file I have added a "symbolFilePath" if the SymbolFile for the main modules path doesn't match that of the main executable. We also include a "symbolFileModuleIdentifiers" key in each module if the module does have multiple lldb_private::Module objects that contain debug info so that you can track down the information for a module and add up the contributions of all of the .o files.
Tests were added that are labeled with @skipUnlessDarwin and @no_debug_info_test that test all of this functionality so it doesn't regress.
For a module with a dSYM file, we can see the "symbolFilePath" is included: ``` "modules": [ { "debugInfoByteSize": 1070, "debugInfoIndexLoadedFromCache": false, "debugInfoIndexSavedToCache": false, "debugInfoIndexTime": 0, "debugInfoParseTime": 0, "identifier": 4873280600, "path": "/Users/gclayton/Documents/src/lldb/main/Debug/lldb-test-build.noindex/commands/statistics/basic/TestStats.test_dsym_binary_has_symfile_in_stats/a.out", "symbolFilePath": "/Users/gclayton/Documents/src/lldb/main/Debug/lldb-test-build.noindex/commands/statistics/basic/TestStats.test_dsym_binary_has_symfile_in_stats/a.out.dSYM/Contents/Resources/DWARF/a.out", "symbolTableIndexTime": 7.9999999999999996e-06, "symbolTableLoadedFromCache": false, "symbolTableParseTime": 7.8999999999999996e-05, "symbolTableSavedToCache": false, "triple": "arm64-apple-macosx12.0.0", "uuid": "E1F7D85B-3A42-321E-BF0D-29B103F5F2E3" }, ``` And for the DWARF in .o file case we can see the "symbolFileModuleIdentifiers" in the executable's module stats: ``` "modules": [ { "debugInfoByteSize": 0, "debugInfoIndexLoadedFromCache": false, "debugInfoIndexSavedToCache": false, "debugInfoIndexTime": 0, "debugInfoParseTime": 0, "identifier": 4603526968, "path": "/Users/gclayton/Documents/src/lldb/main/Debug/lldb-test-build.noindex/commands/statistics/basic/TestStats.test_no_dsym_binary_has_symfile_identifiers_in_stats/a.out", "symbolFileModuleIdentifiers": [ 4604429832 ], "symbolTableIndexTime": 7.9999999999999996e-06, "symbolTableLoadedFromCache": false, "symbolTableParseTime": 0.000112, "symbolTableSavedToCache": false, "triple": "arm64-apple-macosx12.0.0", "uuid": "57008BF5-A726-3DE9-B1BF-3A9AD3EE8569" }, ``` And the .o file for 4604429832 looks like: ``` { "debugInfoByteSize": 1028, "debugInfoIndexLoadedFromCache": false, "debugInfoIndexSavedToCache": false, "debugInfoIndexTime": 0, "debugInfoParseTime": 6.0999999999999999e-05, "identifier": 4604429832, "path": "/Users/gclayton/Documents/src/lldb/main/Debug/lldb-test-build.noindex/commands/statistics/basic/TestStats.test_no_dsym_binary_has_symfile_identifiers_in_stats/main.o", "symbolTableIndexTime": 0, "symbolTableLoadedFromCache": false, "symbolTableParseTime": 0, "symbolTableSavedToCache": false, "triple": "arm64-apple-macosx" } ```
Differential Revision: https://reviews.llvm.org/D119400
show more ...
|
|
Revision tags: llvmorg-14.0.0-rc1, llvmorg-15-init |
|
| #
cd8122b2 |
| 24-Jan-2022 |
Jonas Devlieghere <[email protected]> |
[lldb] Add ConstString memory usage statistics
Add statistics about the memory usage of the string pool. I'm particularly interested in the memory used by the allocator, i.e. the number of bytes act
[lldb] Add ConstString memory usage statistics
Add statistics about the memory usage of the string pool. I'm particularly interested in the memory used by the allocator, i.e. the number of bytes actually used by the allocator it self as well as the number of bytes allocated through the allocator.
Differential revision: https://reviews.llvm.org/D117914
show more ...
|
|
Revision tags: llvmorg-13.0.1, llvmorg-13.0.1-rc3 |
|
| #
4f89157b |
| 17-Jan-2022 |
Pavel Labath <[email protected]> |
[lldb] Make StatsDuration thread-safe
std::chrono::duration types are not thread-safe, and they cannot be concurrently updated from multiple threads. Currently, we were doing such a thing (only) in
[lldb] Make StatsDuration thread-safe
std::chrono::duration types are not thread-safe, and they cannot be concurrently updated from multiple threads. Currently, we were doing such a thing (only) in the DWARF indexing code (DWARFUnit::ExtractDIEsRWLocked), but I think it can easily happen that someone else tries to update another statistic like this without bothering to check for thread safety.
This patch changes the StatsDuration type from a simple typedef into a class in its own right. The class stores the duration internally as std::atomic<uint64_t> (so it can be updated atomically), but presents it to its users as the usual chrono type (duration<float>).
Differential Revision: https://reviews.llvm.org/D117474
show more ...
|
|
Revision tags: llvmorg-13.0.1-rc2 |
|
| #
a2154b19 |
| 28-Dec-2021 |
Greg Clayton <[email protected]> |
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
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
show more ...
|
|
Revision tags: llvmorg-13.0.1-rc1 |
|
| #
dbd36e1e |
| 12-Nov-2021 |
Greg Clayton <[email protected]> |
Add the stop count to "statistics dump" in each target's dictionary.
It is great to know how many times the target has stopped over its lifetime as each time the target stops, and possibly resumes w
Add the stop count to "statistics dump" in each target's dictionary.
It is great to know how many times the target has stopped over its lifetime as each time the target stops, and possibly resumes without the user seeing it for things like shared library loading and signals that are not notified and auto continued, to help explain why a debug session might be slow. This is now included as "stopCount" inside each target JSON.
Differential Revision: https://reviews.llvm.org/D113810
show more ...
|
| #
13005564 |
| 28-Oct-2021 |
Greg Clayton <[email protected]> |
Add unix signal hit counts to the target statistics.
Android and other platforms make wide use of signals when running applications and this can slow down debug sessions. Tracking this statistic can
Add unix signal hit counts to the target statistics.
Android and other platforms make wide use of signals when running applications and this can slow down debug sessions. Tracking this statistic can help us to determine why a debug session is slow.
The new data appears inside each target object and reports the signal hit counts:
"signals": [ { "SIGSTOP": 1 }, { "SIGUSR1": 1 } ],
Differential Revision: https://reviews.llvm.org/D112683
show more ...
|
| #
fb254968 |
| 27-Oct-2021 |
Greg Clayton <[email protected]> |
Add breakpoint resolving stats to each target.
This patch adds breakpoints to each target's statistics so we can track how long it takes to resolve each breakpoint. It also includes the structured d
Add breakpoint resolving stats to each target.
This patch adds breakpoints to each target's statistics so we can track how long it takes to resolve each breakpoint. It also includes the structured data for each breakpoint so the exact breakpoint details are logged to allow for reproduction of slow resolving breakpoints. Each target gets a new "breakpoints" array that contains breakpoint details. Each breakpoint has "details" which is the JSON representation of a serialized breakpoint resolver and filter, "id" which is the breakpoint ID, and "resolveTime" which is the time in seconds it took to resolve the breakpoint. A snippet of the new data is shown here:
"targets": [ { "breakpoints": [ { "details": {...}, "id": 1, "resolveTime": 0.00039291599999999999 }, { "details": {...}, "id": 2, "resolveTime": 0.00022679199999999999 } ], "totalBreakpointResolveTime": 0.00061970799999999996 } ]
This provides full details on exactly how breakpoints were set and how long it took to resolve them.
Differential Revision: https://reviews.llvm.org/D112587
show more ...
|
| #
2887d9fd |
| 26-Oct-2021 |
Greg Clayton <[email protected]> |
Add new key/value pairs to the module statistics for "statistics dump".
The new key/value pairs that are added to each module's stats are: "debugInfoByteSize": The size in bytes of debug info for ea
Add new key/value pairs to the module statistics for "statistics dump".
The new key/value pairs that are added to each module's stats are: "debugInfoByteSize": The size in bytes of debug info for each module. "debugInfoIndexTime": The time in seconds that it took to index the debug info. "debugInfoParseTime": The time in seconds that debug info had to be parsed.
At the top level we add up all of the debug info size, parse time and index time with the following keys: "totalDebugInfoByteSize": The size in bytes of all debug info in all modules. "totalDebugInfoIndexTime": The time in seconds that it took to index all debug info if it was indexed for all modules. "totalDebugInfoParseTime": The time in seconds that debug info was parsed for all modules.
Differential Revision: https://reviews.llvm.org/D112501
show more ...
|
| #
c571988e |
| 21-Oct-2021 |
Greg Clayton <[email protected]> |
Add modules stats into the "statistics dump" command.
The new module stats adds the ability to measure the time it takes to parse and index the symbol tables for each module, and reports modules sta
Add modules stats into the "statistics dump" command.
The new module stats adds the ability to measure the time it takes to parse and index the symbol tables for each module, and reports modules statistics in the output of "statistics dump" along with the path, UUID and triple of the module. The time it takes to parse and index the symbol tables are also aggregated into new top level key/value pairs at the target level.
Differential Revision: https://reviews.llvm.org/D112279
show more ...
|
| #
d7b33853 |
| 20-Oct-2021 |
Greg Clayton <[email protected]> |
Modify "statistics dump" to dump JSON.
This patch is a smaller version of a previous patch https://reviews.llvm.org/D110804.
This patch modifies the output of "statistics dump" to be able to get st
Modify "statistics dump" to dump JSON.
This patch is a smaller version of a previous patch https://reviews.llvm.org/D110804.
This patch modifies the output of "statistics dump" to be able to get stats from the current target. It adds 3 new stats as well. The output of "statistics dump" is now emitted as JSON so that it can be used to track performance and statistics and the output could be used to populate a database that tracks performance. Sample output looks like:
(lldb) statistics dump { "expressionEvaluation": { "failures": 0, "successes": 0 }, "firstStopTime": 0.34164492800000001, "frameVariable": { "failures": 0, "successes": 0 }, "launchOrAttachTime": 0.31969605400000001, "targetCreateTime": 0.0040863039999999998 }
The top level keys are:
"expressionEvaluation" which replaces the previous stats that were emitted as plain text. This dictionary contains the success and fail counts. "frameVariable" which replaces the previous stats for "frame variable" that were emitted as plain text. This dictionary contains the success and fail counts. "targetCreateTime" contains the number of seconds it took to create the target and load dependent libraries (if they were enabled) and also will contain symbol preloading times if that setting is enabled. "launchOrAttachTime" is the time it takes from when the launch/attach is initiated to when the first private stop occurs. "firstStopTime" is the time in seconds that it takes to stop at the first stop that is presented to the user via the LLDB interface. This value will only have meaning if you set a known breakpoint or stop location in your code that you want to measure as a performance test.
This diff is also meant as a place to discuess what we want out of the "statistics dump" command before adding more funcionality. It is also meant to clean up the previous code that was storting statistics in a vector of numbers within the lldb_private::Target class.
Differential Revision: https://reviews.llvm.org/D111686
show more ...
|