[Lldb-commits] [PATCH] D117914: [lldb] Add ConstString memory usage statistics

Greg Clayton via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Jan 21 12:47:16 PST 2022


clayborg added inline comments.


================
Comment at: lldb/source/Target/Statistics.cpp:72
+  obj.try_emplace<int64_t>("bytesAllocated", stats.GetBytesAllocated());
+  obj.try_emplace<int64_t>("bytesWasted", stats.GetBytesWasted());
+  return obj;
----------------
Maybe "bytesUnallocated" instead of "bytesWasted"?


================
Comment at: lldb/source/Target/Statistics.cpp:228
       {"modules", std::move(json_modules)},
+      {"strings", string_stats.ToJSON()},
       {"totalSymbolTableParseTime", symtab_parse_time},
----------------
"constStrings" maybe? or "stringPool"? "strings" makes it seem like we are tracking all strings in LLDB

Do we want another top level key here for "memory" that we can slowly add things to? It would be nice to know how much memory symbols tables consume, DWARF data structures like the DIE vectors, and many others things. So maybe adding a "memory" key/value pair at the top here might be a good idea?

```
"memory": {"strings": ..., "symtab": ..., "dwarf": .... }
```


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D117914/new/

https://reviews.llvm.org/D117914



More information about the lldb-commits mailing list