clayborg added a comment.

In D112691#3093889 <https://reviews.llvm.org/D112691#3093889>, @JDevlieghere 
wrote:

> I understand the need for something like this to make some of the statistics 
> more meaningful, but this is stretching the notion of statistics. 
> Conceptually, this is approaching something like a dump of the debugger for 
> issue/performance analysis. I think that idea is really exciting, and from 
> that perspective there's a lot more useful information we could add to it. 
> Long term, I can see this output be something that we ask users to include in 
> every bug report.

That is kind of what I am going for with this command. One main issue is when 
breakpoints fail to resolve we often don't know why, and knowing if we a) have 
debug info enabled and b) have the right settings to remap things really will 
help. I was thinking the same thing though: this info is not really statistics.

Would adding a "--target-state" option that would only include target stuff if 
requested make more sense? See my comment below as well

> TL;DR: Can we make this more generic and keep the separation between 
> statistics/metrics and a more general concept that includes these target 
> settings?

I am open to ideas on how to do this kind of thing. We can always gather this 
information on our own or with a separate command.

We could do a "target read" and "target write" just like we do for breakpoints? 
The idea would be to serialize all settings needed for a target into JSON and 
be able to load a target from JSON. This could be really handy for bug reports. 
If we have a command that does this, we could easily add an option to the 
"statistics dump" command to include this state with --target-state so we can 
still get it all in one place, but the user must ask for it? The description 
for --target-state could be something like:

  -t (--target-state)
      Include the serialization of the target in this information to help with 
being able to reproduce the conditions that led to the statistics

Lemme know what you think.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D112691

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to