[Lldb-commits] [PATCH] Improve stability of ProcessMonitor -- use a thread-safe queue instead of file descriptors with unchecked read/write calls to transfer Operation* between threads.

Greg Clayton gclayton at apple.com
Fri Sep 13 16:50:04 PDT 2013

I am assuming the ownership of the "Operation*" objects is not assumed to be handled by the new Queue class since it is a queue of pointers that won't get freed?

Other than that it looks ok to me, but I haven't done much with ProcessMonitor so another linux expert would be good to consult.


On Sep 13, 2013, at 3:25 PM, Daniel Malea <daniel.malea at intel.com> wrote:

> This commit simplifies the Linux ProcessMonitor:
> - DoOperation() and ServeOperation() no longer depend on file descriptors!
> - remove EnableIPC() helper. ProcessMonitor will not have to run as a separate process.
> - added a semaphore to signal when an operation is complete (previously signaling happened through a file descriptor)
> - under heavy stress tests (i.e. running tests while compiling) we noticed that the previous ProcessMonitor implementation would break because the read/write
>  calls were not error-checked, causing LLDB to hang.
> Add lldb_private::Queue class:
> - implemented on top of lldb's Mutex and Condition classes
> - supports pop(), push() and empty() from multiple threads
> http://llvm-reviews.chandlerc.com/D1682
> Files:
>  include/lldb/Host/Queue.h
>  source/Plugins/Process/Linux/ProcessMonitor.cpp
>  source/Plugins/Process/Linux/ProcessMonitor.h
> <D1682.1.patch>_______________________________________________
> lldb-commits mailing list
> lldb-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits

More information about the lldb-commits mailing list