[Lldb-commits] [PATCH] D112279: Add modules stats into the "statistics dump" command.
Greg Clayton via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Oct 22 17:26:35 PDT 2021
clayborg added a comment.
After reading Jonas' comment about the module information being at the wrong level, I came up with a solution I think will work well. Instead of "statistics dump" emitting a dictionary for a single target when --all isn't specified, and then emitting a dictionary with a top level "targets" array when it is, we can always emit the top level dictionary that is equivalent to the DebuggerStats object. This top level dictionary will contain "modules" which is the global list of all modules that is currently loaded into LLDB, including all .o files from DWARF in .o, "targets" which is a list of target JSON stats, and then the total symbol table index/parse times are aggregated at this top level instead of in the target. The actual output now looks like:
{
"modules": [
{
"identifier": 5837856648,
"path": "/Users/gclayton/Documents/src/args/build/a.out",
"symbolTableIndexTime": 1.4625e-05,
"symbolTableParseTime": 0.00064383300000000001,
"triple": "arm64-apple-macosx11.0.0",
"uuid": "B7F60DCD-68BF-3F2D-AE27-85253725636A"
},
{
"identifier": 5837128360,
"path": "/usr/lib/dyld",
"symbolTableIndexTime": 0.011349625,
"symbolTableParseTime": 0.0066760420000000001,
"triple": "arm64e-apple-macosx11.6.0",
"uuid": "38657979-1ABE-3C9A-BF64-EF3B746216AB"
},
],
"targets": [
{
"expressionEvaluation": {
"failures": 0,
"successes": 0
},
"firstStopTime": 0.35298558299999999,
"frameVariable": {
"failures": 0,
"successes": 0
},
"launchOrAttachTime": 0.33194058300000001,
"moduleIdentifiers": [
5837856648,
5837128360
],
"targetCreateTime": 0.16910445800000001
}
],
"totalSymbolTableIndexTime": 0.048417122000000014,
"totalSymbolTableParseTime": 0.076428670000000004
}
Then each "target contains a "moduleIdentifiers" array, that identify the modules that are currently part of that target. Each module JSON now has a new "identifier" that can be matched up. We can't use the "UUID" from the module since not all modules have UUIDs.
Jonas, does this alleviate your concerns and fix the representation for the statistics?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D112279/new/
https://reviews.llvm.org/D112279
More information about the lldb-commits
mailing list