[Lldb-commits] [PATCH] D112691: Include target settings in "statistics dump" output.

Jim Ingham via lldb-commits lldb-commits at lists.llvm.org
Thu Oct 28 15:40:53 PDT 2021



> On Oct 28, 2021, at 3:18 PM, Greg Clayton via Phabricator <reviews at reviews.llvm.org> wrote:
> 
> clayborg added a comment.
> 
> In D112691#3095010 <https://reviews.llvm.org/D112691#3095010>, @jingham wrote:
> 
>> Do you care about the history of these settings?  After all, the problem might arise because someone set a setting then unset it.  Your statistics approach wouldn't catch that.  If you are really trying to build an architecture where we can track this sort of problem down, then you might need more of a history approach, where the settings and certain other changes in the state of the debugger mark epochs, and you aggregate data into those epochs?
> 
> Personally I find most people set the important settings once and them leave them alone for the debug session. History of settings and timings could be nice, but we have no infrastructure to associate timestamps with events in the debug session right now, that being said it could be added.

Yeah, I don't know that it's necessary to get too far out before we see a variety of actual uses of this feature.  I was mostly speculating on potential issues... 

> 
> If we don't want this in the statistics dump I can fully understand, though I do like a one stop command people can run when they want to report issues that may involve performance or other things going wrong with the debug session.

I can see wanting to dump statistics at various points in the running of a process, maybe triggered by breakpoints, for instance.  In that case I wouldn't want to dump the settings data - if it is indeed redundant (see above) every time.  Having the settings as a separate emission would make that possible.  And just like we add gdb-remote as a convenience, it would be fine to have some low level commands that you can reassemble and then a portmanteau command that generates a "good for most purposes" report.

Also, we already have "settings read" and "settings write" so adding another way to dump them seems redundant.  You are dumping a subset, but the "settings write" command can do that as well.  If the format's not one you like, I think we should be able to change that as the successful round trip is the main thing.

Jim


> 
> 
> Repository:
>  rG LLVM Github Monorepo
> 
> CHANGES SINCE LAST ACTION
>  https://reviews.llvm.org/D112691/new/
> 
> https://reviews.llvm.org/D112691
> 



More information about the lldb-commits mailing list