[Lldb-commits] [PATCH] D110804: Add a new command "target metrics".

Jim Ingham via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Sep 30 15:12:00 PDT 2021


jingham added a comment.

In D110804#3035052 <https://reviews.llvm.org/D110804#3035052>, @clayborg wrote:

> Ok, so how does this sound:
>
> - This new command will replace the existing "statistics dump" command and emit JSON only by default
> - The "statistics enable/disable" will stay in place and allow expensive metric gathering to be enabled/disabled if needed. If the gathering is really cheap for certain metrics, then nothing needs to happen for "statistics enable/disable"
> - By default we will emit stats for the current target, and options can be added in the future to enable dumping for all targets and for debugger level stuff
>
> Let me know if this sounds ok to everyone!?

This sounds fine to me.

I would mildly argue for adding the --target-id to start with.  That should be super-cheap to implement since you just have to look up the target in the debugger.  The reason I think it's a little important is that it is the way that you tell that the statistics you are dumping are debugger-wide or target specific.  If --breakpoints supports the --target-id, then I know right away it's a target specific statistic, etc...  So having this in place from the start will help somebody else who comes along to add some debugger-wide stats.

But I am not insisting on this.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D110804



More information about the lldb-commits mailing list