Files
clang-p2996/lldb/source/Target
royitaqi c873ca2597 [lldb] Add symbol/table count into statistics (#136226)
# New stats

The following stats are added and are available in both "statistics
dump" command and in python API.

1. In summary:
1. Add `totalSymbolsLoaded`. The total number of symbols loaded in all
modules.
2. Add `totalSymbolTablesLoaded `. The total number symbol tables loaded
in all modules.
2. In each module's stats:
1. Add `symbolsLoaded`. The number of symbols loaded in the current
module.


# Example

Example `statistics dump` output:
```
(lldb) statistics dump
{
  ...,
  "modules": [
    {
      "path": "/Users/<username>/demo/simple/a.out",
      "symbolsLoaded": 6,
      ...
    },
    ...
  ],
  ...
  "totalSymbolTablesLoaded": 42,
  "totalSymbolsLoaded": 32198
}
```

# Tests

**Manual test**: Built and ran lldb on a helloworld program. Ran
`statistics dump`. Verified the above stats.

**Unit test**: Ran the following tests:
```
$ bin/lldb-dotest -p TestStats.py ~/llvm-sand/external/llvm-project/lldb/test/API/commands/statistics/basic/
...
Ran 18 tests in 192.676s

OK (skipped=3)
```
2025-04-21 11:36:26 -07:00
..