[Lldb-commits] [PATCH] D116255: [lldb] [Process/FreeBSDKernel] Support finding all processes
Pavel Labath via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Dec 30 05:35:58 PST 2021
labath added a comment.
In D116255#3213665 <https://reviews.llvm.org/D116255#3213665>, @mgorny wrote:
> In D116255#3213612 <https://reviews.llvm.org/D116255#3213612>, @labath wrote:
>
>> That would deal with the code coverage, but it still leaves us with a fairly large core file, and a lot of uninteresting tests obscuring the output.
>>
>> How do you generate these core files? Do you actually create a fresh core dump or you just recompute the "interesting" portions from a master file you have around? If you make the changes the the master core file, then they would get automatically picked up during the recomputation.
>
> I do recompute them from master copies (which I finally need to upload somewhere) but the recomputation is really dumb and unaware of the file format.
I am aware how the recomputation works. My point is that if you hack the "master" copy (quotes because you probably still want to keep the original master around) then you only need to redo the hacks after when you're regenerating the master. At that point you'll also need to update all the test expectations, so it doesn't seem like too much extra work. (In fact, I wouldn't be surprised if we just end up adding a new core file instead of updating the old one).
> I suppose I could just hack LLDB to stop after grabbing the first N threads but… the first non-dump on-CPU thread is no. 200. Finishing on that will probably make the core smaller but not sure how much smaller. I'll try in a minute.
You may still need to do some hex editing to avoid ending the list with a dangling pointer...
>> Alternatively, maybe there is a way to capture a core file without so many processes. Either killing off everything before the core file is written, or by making sure the other processes are never started (something like `init=/bin/bash` on linux)?
>
> The vast majority of threads are kernel threads. At a quick glance, only about 20 threads look like userspace.
yikes. And I thought linux was bad..
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D116255/new/
https://reviews.llvm.org/D116255
More information about the lldb-commits
mailing list