Commit 87fc406
Automerge: [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)
```File tree
3 files changed
+42
-10
lines changed- lldb
- include/lldb/Target
- source/Target
- test/API/commands/statistics/basic
3 files changed
+42
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
| 123 | + | |
123 | 124 | | |
124 | 125 | | |
125 | 126 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| 74 | + | |
74 | 75 | | |
75 | 76 | | |
76 | 77 | | |
| |||
293 | 294 | | |
294 | 295 | | |
295 | 296 | | |
296 | | - | |
| 297 | + | |
| 298 | + | |
297 | 299 | | |
298 | 300 | | |
299 | 301 | | |
| |||
309 | 311 | | |
310 | 312 | | |
311 | 313 | | |
| 314 | + | |
312 | 315 | | |
313 | 316 | | |
314 | 317 | | |
| |||
318 | 321 | | |
319 | 322 | | |
320 | 323 | | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
321 | 327 | | |
322 | 328 | | |
323 | | - | |
| 329 | + | |
324 | 330 | | |
325 | 331 | | |
326 | | - | |
| 332 | + | |
327 | 333 | | |
328 | 334 | | |
329 | 335 | | |
| |||
393 | 399 | | |
394 | 400 | | |
395 | 401 | | |
396 | | - | |
397 | | - | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
398 | 405 | | |
399 | 406 | | |
400 | 407 | | |
| |||
407 | 414 | | |
408 | 415 | | |
409 | 416 | | |
| 417 | + | |
410 | 418 | | |
411 | 419 | | |
412 | 420 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
| 162 | + | |
| 163 | + | |
162 | 164 | | |
163 | 165 | | |
164 | 166 | | |
| |||
168 | 170 | | |
169 | 171 | | |
170 | 172 | | |
| 173 | + | |
| 174 | + | |
171 | 175 | | |
172 | 176 | | |
173 | 177 | | |
174 | 178 | | |
175 | 179 | | |
176 | 180 | | |
177 | 181 | | |
178 | | - | |
179 | | - | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
180 | 188 | | |
181 | 189 | | |
182 | 190 | | |
183 | 191 | | |
184 | 192 | | |
185 | | - | |
186 | | - | |
187 | | - | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
188 | 211 | | |
189 | 212 | | |
190 | 213 | | |
| |||
0 commit comments