[Lldb-commits] [PATCH] D110893: [lldb] Refactor statistics (NFC)
Pavel Labath via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Oct 1 01:04:16 PDT 2021
labath added a comment.
Some general thoughts:
- instead of throwing patches around in might be good to have a discussion thread to determine all the requirements and figure out the general direction
- it would be better to have a series of smaller patches (like this one) instead one big patch implementing everything
================
Comment at: lldb/include/lldb/Utility/Analytics.h:43
+private:
+ std::vector<unsigned> m_counters;
+ bool m_collecting_analytics = false;
----------------
This assumes all statistics can be represented as integers. Here's an idea how that could be done with a flexible type representation <https://godbolt.org/z/j6f3bhP8P>.
================
Comment at: lldb/source/Utility/Analytics.cpp:40-41
+#include "lldb/Utility/Metrics.def"
+ case Metric::MaxID:
+ llvm_unreachable("invalid metric");
+ }
----------------
You could get rid of these if you made MaxID a synonym for the highest valued entry.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110893/new/
https://reviews.llvm.org/D110893
More information about the lldb-commits
mailing list