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

2022-01-24 Thread Jonas Devlieghere via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGcd8122b27f8f: [lldb] Add ConstString memory usage statistics (authored by JDevlieghere). Herald added a project: LLDB. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.ll

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

2022-01-24 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere added a comment. In D117914#3267657 , @clayborg wrote: > Yep! Looks good. > > As a follow up patch it would be great to ask the SymbolFile classes to break > down some memory usage. I know in the SymbolFileDWARF we have each DWARFUnit > tha

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

2022-01-24 Thread Greg Clayton via Phabricator via lldb-commits
clayborg accepted this revision. clayborg added a comment. Yep! Looks good. As a follow up patch it would be great to ask the SymbolFile classes to break down some memory usage. I know in the SymbolFileDWARF we have each DWARFUnit that may or may not parse the unit DIE or all of the DIEs. These

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

2022-01-24 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere added a comment. @clayborg Does the latest scheme look good to you? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117914/new/ https://reviews.llvm.org/D117914 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://list

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

2022-01-21 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere updated this revision to Diff 402104. JDevlieghere added a comment. "memory": { "strings": { "bytesTotal": 3145728, "bytesUnused": 1088812, "bytesUsed": 2056916 } }, CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117914/new/ https://reviews.llvm

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

2022-01-21 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere added a comment. In D117914#3262467 , @kastiglione wrote: > I find "Unallocated" ambiguous. To the Allocator, maybe it's not, but to VM > it is. What about Total/Used/Unused? Note that the docs for `BytesAllocated` > say it can be used to

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

2022-01-21 Thread Dave Lee via Phabricator via lldb-commits
kastiglione added a comment. I find "Unallocated" ambiguous. To the Allocator, maybe it's not, but to VM it is. What about Total/UsedUnused? Note that the docs for `BytesAllocated` say it can be used to calculated "wasted" space. /// How many bytes we've allocated. /// /// Used so that we

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

2022-01-21 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere updated this revision to Diff 402093. JDevlieghere marked 3 inline comments as done. JDevlieghere added a comment. Put string statistics under memory: "memory": { "strings": { "bytesAllocated": 2056916, "bytesTotal": 3145728, "bytesUnallocated": 1088812 }

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

2022-01-21 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere added inline comments. Comment at: lldb/source/Target/Statistics.cpp:228 {"modules", std::move(json_modules)}, + {"strings", string_stats.ToJSON()}, {"totalSymbolTableParseTime", symtab_parse_time}, clayborg wrote: > "constStrings"

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

2022-01-21 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added inline comments. Comment at: lldb/include/lldb/Utility/ConstString.h:415-416 +size_t GetBytesWasted() const { return total_memory - bytes_allocated; } +size_t total_memory; +size_t bytes_allocated; + }; CHANGES SINCE LAST ACTION h

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

2022-01-21 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added inline comments. Comment at: lldb/source/Target/Statistics.cpp:72 + obj.try_emplace("bytesAllocated", stats.GetBytesAllocated()); + obj.try_emplace("bytesWasted", stats.GetBytesWasted()); + return obj; Maybe "bytesUnallocated" instead of "bytesW

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

2022-01-21 Thread Dave Lee via Phabricator via lldb-commits
kastiglione accepted this revision. kastiglione added a comment. This revision is now accepted and ready to land. nice CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117914/new/ https://reviews.llvm.org/D117914 ___ lldb-commits mailing list ll

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

2022-01-21 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere added inline comments. Comment at: lldb/include/lldb/Utility/ConstString.h:409 /// in memory. static size_t StaticMemorySize(); I purposely didn't use this function for the reasons explained in the summary. It seems like a few classes im

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

2022-01-21 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere created this revision. JDevlieghere added reviewers: clayborg, labath. JDevlieghere requested review of this revision. Add statistics about the memory usage of the string pool. I'm particularly interested in the memory used by the allocator, i.e. the number of bytes actually used by