-
Notifications
You must be signed in to change notification settings - Fork 15.2k
In statistics dump --summary
, add back the targets
section
#97004
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In statistics dump --summary
, add back the targets
section
#97004
Conversation
Summary: Test Plan: Reviewers: Subscribers: Tasks: Tags:
@llvm/pr-subscribers-lldb Author: None (royitaqi) ChangesChange#95075 accidentally removed the Updated the description for the options. VerificationManually verified the fix by running
The expected result is that 1 and 3 give the same sections, while 2 is missing the Appendix: Manual Test Output
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…97004) # Change llvm#95075 accidentally removed the `targets` section from `statistics dump --summary`. Adding it back, by setting the default value to `true` in `StatisticsOptions::GetIncludeTargets()`. Updated the description for the options. Updated tests. # Verification Manually verified the fix by running `statist dump --summary` and comparing three versions of LLDB (in commit order): 1. Before llvm#95075 2. After llvm#95075 3. After this fix The expected result is that 1 and 3 give the same sections, while 2 is missing the `targets` section when in summary mode. The output (see Appendix) matches the expectation. # Appendix: Manual Test Output ## `statistics dump --summary` of 1 ``` (lldb) statistics dump --summary { "memory": { "strings": { "bytesTotal": 724992, "bytesUnused": 714547, "bytesUsed": 10445 } }, "targets": [ { "sourceMapDeduceCount": 0, "totalSharedLibraryEventHitCount": 0 } ], "totalDebugInfoByteSize": 597, "totalDebugInfoEnabled": 1, "totalDebugInfoIndexLoadedFromCache": 0, "totalDebugInfoIndexSavedToCache": 0, "totalDebugInfoIndexTime": 0.00070699999999999995, "totalDebugInfoParseTime": 2.5999999999999998e-05, "totalModuleCount": 1, "totalModuleCountHasDebugInfo": 1, "totalModuleCountWithIncompleteTypes": 0, "totalModuleCountWithVariableErrors": 0, "totalSymbolTableIndexTime": 0.000223, "totalSymbolTableParseTime": 0.00025799999999999998, "totalSymbolTableStripped": 0, "totalSymbolTablesLoadedFromCache": 0, "totalSymbolTablesSavedToCache": 0 } (lldb) ``` ## `statistics dump --summary` of 3 Should be the same as above. ``` (lldb) statistics dump --summary { "memory": { "strings": { "bytesTotal": 516096, "bytesUnused": 510353, "bytesUsed": 5743 } }, "targets": [ { "sourceMapDeduceCount": 0, "totalSharedLibraryEventHitCount": 0 } ], "totalDebugInfoByteSize": 597, "totalDebugInfoEnabled": 1, "totalDebugInfoIndexLoadedFromCache": 0, "totalDebugInfoIndexSavedToCache": 0, "totalDebugInfoIndexTime": 0.0022139999999999998, "totalDebugInfoParseTime": 0.00031700000000000001, "totalModuleCount": 1, "totalModuleCountHasDebugInfo": 1, "totalModuleCountWithIncompleteTypes": 0, "totalModuleCountWithVariableErrors": 0, "totalSymbolTableIndexTime": 0.0014499999999999999, "totalSymbolTableParseTime": 0.001848, "totalSymbolTableStripped": 0, "totalSymbolTablesLoadedFromCache": 0, "totalSymbolTablesSavedToCache": 0 } (lldb) ``` ## `statistics dump --summary` of 2 Should be missing the `targets` section. ``` (lldb) statistics dump --summary { "memory": { "strings": { "bytesTotal": 716800, "bytesUnused": 705887, "bytesUsed": 10913 } }, "totalDebugInfoByteSize": 597, "totalDebugInfoEnabled": 1, "totalDebugInfoIndexLoadedFromCache": 0, "totalDebugInfoIndexSavedToCache": 0, "totalDebugInfoIndexTime": 0.001374, "totalDebugInfoParseTime": 0.000174, "totalModuleCount": 1, "totalModuleCountHasDebugInfo": 1, "totalModuleCountWithIncompleteTypes": 0, "totalModuleCountWithVariableErrors": 0, "totalSymbolTableIndexTime": 0.00068300000000000001, "totalSymbolTableParseTime": 0.0010139999999999999, "totalSymbolTableStripped": 0, "totalSymbolTablesLoadedFromCache": 0, "totalSymbolTablesSavedToCache": 0 } (lldb) ``` Co-authored-by: royshi <royshi@meta.com>
Summary: This is to temporarily fix the test `TestVSCode`, before [PR llvm#97004](llvm#97004) can be upstreamed and pulled into `toolchain/llvm-sand/main`. The bug was that a previous PR ([llvm#95075](llvm#95075)) accidentally removed the `targets` section from `statistics dump --summary`, which this test relies on. The fix in [PR llvm#97004](llvm#97004) reverts that behavior, while the temporary fix in this diff just explicitly adds an option to make sure that the `targets` section is generated. This diff *can (but doesn't have to)* be reverted after [PR llvm#97004](llvm#97004) has been merged and pulled into `llvm-sand`. Test Plan: Manually tested after applying this diff on top of the release candidate that I'm working on. Reviewers: jeffreytan, #lldb_team Subscribers: gclayton, #lldb_team Differential Revision: https://phabricator.intern.facebook.com/D59139567
Summary: This is to temporarily fix the test `TestVSCode`, before [PR llvm#97004](llvm#97004) can be upstreamed and pulled into `toolchain/llvm-sand/main`. The bug was that a previous PR ([llvm#95075](llvm#95075)) accidentally removed the `targets` section from `statistics dump --summary`, which this test relies on. The fix in [PR llvm#97004](llvm#97004) reverts that behavior, while the temporary fix in this diff just explicitly adds an option to make sure that the `targets` section is generated. This diff *can (but doesn't have to)* be reverted after [PR llvm#97004](llvm#97004) has been merged and pulled into `llvm-sand`. Test Plan: Manually tested after applying this diff on top of the release candidate that I'm working on. Reviewers: jeffreytan, #lldb_team Subscribers: gclayton, #lldb_team Differential Revision: https://phabricator.intern.facebook.com/D59139567
Change
#95075 accidentally removed the
targets
section fromstatistics dump --summary
. Adding it back, by setting the default value totrue
inStatisticsOptions::GetIncludeTargets()
.Updated the description for the options.
Updated tests.
Verification
Manually verified the fix by running
statist dump --summary
and comparing three versions of LLDB (in commit order):statistics dump
to control what sections are dumped #95075statistics dump
to control what sections are dumped #95075The expected result is that 1 and 3 give the same sections, while 2 is missing the
targets
section when in summary mode. The output (see Appendix) matches the expectation.Appendix: Manual Test Output
statistics dump --summary
of 1statistics dump --summary
of 3Should be the same as above.
statistics dump --summary
of 2Should be missing the
targets
section.